[Insight-developers] Change in ITK[master]: COMP: attempts to fix gdcm function hiding warnings

Luis Ibanez luis.ibanez at kitware.com
Mon Mar 7 17:41:35 EST 2011


Hi Mark,


1)  Whenever you need to find a test, just grep for the
    name of the test from the top of the ITK source tree.

     The commands:

       cd   ~/src/ITK

       grep   -r -n  itkGDCMImageIOTest3  *


will show you that this test is in the file:

    Testing/Code/IO/CMakeLists.txt

in line 1057.

If you open that file,
you will find the test defined
in lines 1057-1063.

You will also find the tests

itkGDCMImageIOTest1
itkGDCMImageIOTest2

in lines 1047-1066



2)  Whenever you want to execute a single test,
     go to the binary directory where you
     built ITK and type:

              ctest  -R    name-of-test

    where "name-of-test" can be a regular expression.

    In this case, you can run specifically:

       ctest    -R   itkGDCMImageIOTest3


     and if you want to see a verbose output, add -V

       ctest    -R   itkGDCMImageIOTest3    -V


     If you want to see the test command without running it,
     add   -V  -N

       ctest    -R   itkGDCMImageIOTest3    -V  -N


     If you want to run a set of tests,
     use the regular expression,
     for example:

                         ctest    -R   itkGDCM

      will run all the tests that start with "itkGDCM..."


      for more options of ctest, type

                   ctest    --help




This test is ON by default, there is nothing particularly
special about.  It reads a DICOM file from the
Testing/Data/Input directory and writes it out to
several different outputs.



   Luis


---------------------------------------------------------
On Mon, Mar 7, 2011 at 2:16 PM, Mark Roden <mmroden at gmail.com> wrote:
> Hi Luis,
>
> Where can I find the itkGDCMImageIOTest3 test?  I've switched to
> XCode, which seems to be an easier way to get at the test suite
> programs, but all I can find are itkGDCMImageIOTest1 and
> itkGDCMImageIOTest2 in the IOCxxTests.  Is there some switch I have to
> turn on for this test?
>
> Thanks,
> Mark
>
> On Sat, Mar 5, 2011 at 4:50 PM, Mark Roden <mmroden at gmail.com> wrote:
>> Hi Luis,
>>
>> OK, now I've spent quite a bit of time trying to fix this patch and
>> this failing test with no luck. There has to be a better way.
>>
>> How can I find just this test to run it from the command line?  I've
>> cmade everything using unix makefiles on my mac using Bradley
>> Lowecamp's switches to expose warnings:
>>
>> Cxx : -Wall -Wextra -Wunused -Wpointer-arith -Winvalid-pch
>> -Wcast-align -Woverloaded-virtual -Wshadow -Wwrite-strings
>> -Wstrict-null-sentinel
>> C: -Wall -Wextra -Wunused -Wpointer-arith -Winvalid-pch -Wcast-align
>> -Wno-deprecated-declarations -Wno-uninitialized
>>
>> I then run make with default options on, as well as testing and
>> examples.  Everything builds, no tests are produced (or are they in
>> some directory that I don't know about).
>>
>> In what may not be a related error, if I turn on anything in gdcm (ie,
>> gdcm testing), I'll get these cmake errors:
>>
>> CMake Error at Utilities/gdcm/CMakeLists.txt:510 (SUBDIRS):
>>  subdirs Incorrect SUBDIRS command.  Directory: Testing does not exists.
>>
>>
>> If you want to build the test suite, you must set GDCM_DATA_ROOT
>> (advanced option) to the full path name of the gdcmData directory; if
>> you don't want, disable GDCM_BUILD_TESTING.
>> What is gdcmData? Please read:
>> http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=General_questions#What_is_gdcmData_.3F
>> CMake Error at Utilities/gdcm/Utilities/CMakeLists.txt:54 (SUBDIRS):
>>  subdirs Incorrect SUBDIRS command.  Directory: gdcmmd5 does not exists.
>>
>>
>> Configuring incomplete, errors occurred!
>>
>> The second error makes sense, since I haven't put the gdcm testing
>> data in their yet (do I need that for the failing test for this
>> patch?).  But what's the deal with that first error?  The 'Testing'
>> directory does 'exists' (sic) in the cmake target directory.
>>
>> If I set the testing directory to be the directory from the gdcm root,
>> CMake now reports:
>> CMake Error at Utilities/gdcm/CMakeLists.txt:510 (SUBDIRS):
>>  subdirs Incorrect SUBDIRS command.  Directory: Testing does not exists.
>>
>>
>> CMake Error at Utilities/gdcm/Utilities/CMakeLists.txt:54 (SUBDIRS):
>>  subdirs Incorrect SUBDIRS command.  Directory: gdcmmd5 does not exists.
>>
>>
>> Configuring incomplete, errors occurred!
>>
>> If this is related to the failing test, then I'll need to fix it in
>> order to fix the test, right?
>>
>> I'd like to just run  directly so that I can fix that particular test
>> (and perhaps develop further tests that check codecs other than jpeg).
>>
>> Thanks,
>> Mark
>>
>>
>> On Fri, Mar 4, 2011 at 9:58 AM, Code Review <review at kitware.com> wrote:
>>> From Mathieu Malaterre <mathieu.malaterre at gmail.com>:
>>>
>>> Mathieu Malaterre has posted comments on this change.
>>>
>>> Change subject: COMP: attempts to fix gdcm function hiding warnings
>>> ......................................................................
>>>
>>>
>>> Patch Set 1: Fails; I would prefer that you didn't submit this
>>>
>>> --
>>> To view, visit http://review.source.kitware.com/1120
>>> To unsubscribe, visit http://review.source.kitware.com/settings
>>>
>>> Gerrit-MessageType: comment
>>> Gerrit-Change-Id: I413102b25d1c9eee60eace2585c2f857ad564a67
>>> Gerrit-PatchSet: 1
>>> Gerrit-Project: ITK
>>> Gerrit-Branch: master
>>> Gerrit-Owner: Mark Roden <mmroden at gmail.com>
>>> Gerrit-Reviewer: Hans J. Johnson <hans-johnson at uiowa.edu>
>>> Gerrit-Reviewer: Luis Ibanez <luis.ibanez at kitware.com>
>>> Gerrit-Reviewer: Mathieu Malaterre <mathieu.malaterre at gmail.com>
>>>
>>
>


More information about the Insight-developers mailing list