View Issue Details

IDProjectCategoryView StatusLast Update
0002026Slicer4Core: Extensionspublic2012-05-15 19:07
Reporterpinter Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.1.1Fixed in VersionSlicer 4.1.1 
Summary0002026: Review "DoseVolumeHistogram" and "DoseAccumulation" extension
Description

See https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/src/DoseVolumeHistogram/

and https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/src/DoseAccumulation/

TagsNo tags attached.

Activities

jcfr

jcfr

2012-05-11 18:46

administrator   ~0004347

Last edited: 2012-05-11 18:51

Since these two extensions are of "EXTENSION_HAS_ONLY_ONE_MODULE" style, I would recommend to use the following syntax instead:

// ---------------------------

Module name (usually identique to the directory name)

set(MODULE_NAME DoseAccumulation) # Do not use 'project()' - See SlicerConfig.cmake
set(MODULE_TITLE "Dose Accumulation")

if(NOT Slicer_SOURCE_DIR)
set(MODULE_HOMEPAGE "https://www.assembla.com/spaces/slicerrt")
set(MODULE_CATEGORY "Radiotherapy")
set(MODULE_ICONURL "http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Extensions/Testing/LoadableExtensionTemplate/Resources/Icons/LoadableExtensionTemplate.png?revision=19437&view=co")
set(MODULE_STATUS "Beta")
set(MODULE_CONTRIBUTORS "Csaba Pinter, Andras Lasso, Kevin Wang")
set(MODULE_DESCRIPTION "Accumulate dose volumes")
set(MODULE_SCREENSHOTURLS "https://www.assembla.com/spaces/slicerrt/documents/bhB--4vSSr4BSNacwqjQWU/download/bhB--4vSSr4BSNacwqjQWU?notinline=true")
set(MODULE_DEPENDS "NA") # Specified as a space separated list or 'NA' if any
endif()

then the call to "slicerMacroBuildQtModule" would be change into:

slicerMacroBuildQtModule(
NAME ${MODULE_NAME}
TITLE ${MODULE_TITLE}
[..]

jcfr

jcfr

2012-05-11 18:49

administrator   ~0004348

I would also remove all comments that resume to be redundant with the name of the variable (I also updated the extension template to match that convention few weeks ago).

In your case, I would remove all these comments:

Module name (usually identique to the directory name)

Build module sub libraries

Additional includes - Current{source,binary} and Slicer{Libs,Base} already included

Source files

Headers that should run through moc

UI files

Additional Target libraries

Resources

jcfr

jcfr

2012-05-11 18:50

administrator   ~0004349

I would also use the "block separator":

#-----------------------------------------------------------------------------

consistently in the two extensions.

jcfr

jcfr

2012-05-11 18:50

administrator   ~0004350

In DoseAccumulation, the call to:

include(SlicerEnableExtensionTesting)

in not required anymore.

jcfr

jcfr

2012-05-11 18:52

administrator   ~0004351

Make sure to use:
cmake_minimum_required(VERSION 2.8.7)

consistently in both extension

jcfr

jcfr

2012-05-11 18:53

administrator   ~0004352

Declaring the EXTENSION_DEPENDS or MODULE_DEPENDS is now optional.

You could remove:

set(EXTENSION_DEPENDS "NA")

or

set(MODULE_DEPENDS "NA")

pinter

pinter

2012-05-11 18:59

developer   ~0004354

Thank you for the review and the comments!
I generated both modules with the python module generator, and most of the differences are due to the fact that I did these a few months apart.
I'll address these issues shortly.

jcfr

jcfr

2012-05-11 19:00

administrator   ~0004355

Last edited: 2012-05-11 19:01

In Testing/Cxx/CMakeLists.txt:

You shouldn't have to declare the macro SIMPLE_TEST. One is now included globally. See https://github.com/Slicer/Slicer/blob/master/CMake/SlicerMacroSimpleTest.cmake

In your case, it should probably be renamed into SIMPLE_TEST_WITH_DATA.

Even better, the one enclosed could be specialized for Slicer and committed into the trunk :) For now it's just a copy of the one I added in CTK [1]

[1] https://github.com/commontk/CTK/blob/master/CMake/ctkMacroSimpleTestWithData.cmake

2012-05-11 19:00

 

SlicerMacroSimpleTestWithData.cmake (2,255 bytes)
jcfr

jcfr

2012-05-11 19:03

administrator   ~0004356

You could consider looking at [1] for the format of "Testing/Cxx/CMakeLists.txt"

[1] https://github.com/Slicer/Slicer/blob/master/Extensions/Testing/LoadableExtensionTemplate/Testing/Cxx/CMakeLists.txt

jcfr

jcfr

2012-05-15 08:05

administrator   ~0004398

I noticed you updated the CMakeLists.txt, this is great :)

Make sure to specify the contributors using the following syntax:

Firstname1 Lastname1 ([SubOrg1, ]Org1), Firstname2 Lastname2 ([SubOrg2, ]Org2)

For example: Jane Roe (Superware), John Doe (Lab1, Nowhere), Joe Bloggs (Noware)

This will allow us later to link contributor with their associated organization.

pinter

pinter

2012-05-15 09:18

developer   ~0004400

Thank you for your help, JC!
Now I think the CMake files in these modules are in good health :)

jcfr

jcfr

2012-05-15 09:27

administrator   ~0004401

Few remarks still:

  • contributors: see note 4398

  • Comment: # Do not use 'project()' - See SlicerConfig.cmake is not in "DoseAccumulation" CMakeLists.txt

pinter

pinter

2012-05-15 12:49

developer   ~0004410

Sorry, I didn't notice your comment about the contributors. Should be OK now.

jcfr

jcfr

2012-05-15 17:55

administrator   ~0004426

Thanks Csaba for considering my remarks and updating the CMakeLists.txt files. If you don't have any other questions, I believe the issue can be closed.

pinter

pinter

2012-05-15 19:07

developer   ~0004429

Thanks for your help!
I try and keep them conform to the latest templates from now on.

Issue History

Date Modified Username Field Change
2012-05-11 18:40 jcfr New Issue
2012-05-11 18:40 jcfr Status new => assigned
2012-05-11 18:40 jcfr Assigned To => jcfr
2012-05-11 18:40 jcfr Target Version => Slicer 4.1.1
2012-05-11 18:46 jcfr Note Added: 0004347
2012-05-11 18:49 jcfr Note Added: 0004348
2012-05-11 18:50 jcfr Note Added: 0004349
2012-05-11 18:50 jcfr Note Added: 0004350
2012-05-11 18:51 jcfr Note Edited: 0004347
2012-05-11 18:52 jcfr Note Added: 0004351
2012-05-11 18:53 jcfr Note Added: 0004352
2012-05-11 18:54 jcfr Reporter jcfr => pinter
2012-05-11 18:59 pinter Note Added: 0004354
2012-05-11 19:00 jcfr Note Added: 0004355
2012-05-11 19:00 jcfr File Added: SlicerMacroSimpleTestWithData.cmake
2012-05-11 19:01 jcfr Note Edited: 0004355
2012-05-11 19:03 jcfr Note Added: 0004356
2012-05-15 08:05 jcfr Note Added: 0004398
2012-05-15 09:18 pinter Note Added: 0004400
2012-05-15 09:27 jcfr Note Added: 0004401
2012-05-15 12:49 pinter Note Added: 0004410
2012-05-15 17:55 jcfr Note Added: 0004426
2012-05-15 17:55 jcfr Status assigned => resolved
2012-05-15 17:55 jcfr Fixed in Version => Slicer 4.1.1
2012-05-15 17:55 jcfr Resolution open => fixed
2012-05-15 19:07 pinter Note Added: 0004429
2012-05-15 19:07 pinter Status resolved => closed