[Insight-developers] ITK Image orientation fixes with regards to Demons filters
Hans Johnson
hans-johnson at uiowa.edu
Sat Nov 15 11:55:05 EST 2008
Bill,
I am testing much of the Demons related code with our BRAINSDemonWarp
application:
http://testing.psychiatry.uiowa.edu/CDash/viewTest.php?onlypassed&buildid=32
04
svn checkout --username developername \
https://www.nitrc.org/svn/brainsdemonwarp
I am using images that have different Directions, Spacing, Size, and Origins
(see dump of files at bottom of this e-mail). And all the functions that I
touch are now passing when using oriented images (around 70% code coverage
last time I checked).
=================================
..... Ooops, now that I think of it, we use and test itkFastSymmetricDemons,
and not itkSymmetricDemons. Perhaps there is still a bug in
itkSymmetricDemons.
Hans
[hjohnson at buildbox-2 regression_suite_Thirion]$
~/src/brains2/MacOSX/FAST/src/bin/nifti_tool -disp_hdr -infiles
ANON0006_20_T1_*.nii.gz
header file 'ANON0006_20_T1_dbg_splayed.nii.gz', num_fields = 43
all fields:
name offset nvals values
------------------- ------ ----- ------
sizeof_hdr 0 1 348
data_type 4 10
db_name 14 18
extents 32 1 0
session_error 36 1 0
regular 38 1 r
dim_info 39 1 0
dim 40 8 3 117 109 103 0 0 0 0
intent_p1 56 1 0.0
intent_p2 60 1 0.0
intent_p3 64 1 0.0
intent_code 68 1 0
datatype 70 1 16
bitpix 72 1 32
slice_start 74 1 0
pixdim 76 8 1.0 1.7 1.8 1.9 0.0 0.0 0.0 0.0
vox_offset 108 1 352.0
scl_slope 112 1 1.0
scl_inter 116 1 0.0
slice_end 120 1 0
slice_code 122 1 0
xyzt_units 123 1 2
cal_max 124 1 0.0
cal_min 128 1 0.0
slice_duration 132 1 0.0
toffset 136 1 0.0
glmax 140 1 0
glmin 144 1 0
descrip 148 80
aux_file 228 24
qform_code 252 1 2
sform_code 254 1 1
quatern_b 256 1 0.0
quatern_c 260 1 0.707107
quatern_d 264 1 0.707107
qoffset_x 268 1 99.449997
qoffset_y 272 1 -98.099998
qoffset_z 276 1 -97.849998
srow_x 280 4 -1.7 0.0 0.0 -0.0
srow_y 296 4 0.0 0.0 1.9 -0.0
srow_z 312 4 0.0 1.8 0.0 -194.399994
intent_name 328 16
magic 344 4 n+1
header file 'ANON0006_20_T1_sag_twisted.nii.gz', num_fields = 43
all fields:
name offset nvals values
------------------- ------ ----- ------
sizeof_hdr 0 1 348
data_type 4 10
db_name 14 18
extents 32 1 0
session_error 36 1 0
regular 38 1 r
dim_info 39 1 0
dim 40 8 3 111 99 91 0 0 0 0
intent_p1 56 1 0.0
intent_p2 60 1 0.0
intent_p3 64 1 0.0
intent_code 68 1 0
datatype 70 1 4
bitpix 72 1 16
slice_start 74 1 0
pixdim 76 8 -1.0 2.0 2.1 2.2 0.0 0.0 0.0 0.0
vox_offset 108 1 352.0
scl_slope 112 1 1.0
scl_inter 116 1 0.0
slice_end 120 1 0
slice_code 122 1 0
xyzt_units 123 1 2
cal_max 124 1 0.0
cal_min 128 1 0.0
slice_duration 132 1 0.0
toffset 136 1 0.0
glmax 140 1 0
glmin 144 1 0
descrip 148 80
aux_file 228 24
qform_code 252 1 2
sform_code 254 1 1
quatern_b 256 1 0.5
quatern_c 260 1 0.5
quatern_d 264 1 0.5
qoffset_x 268 1 111.0
qoffset_y 272 1 -103.949997
qoffset_z 276 1 -100.099998
srow_x 280 4 0.0 -0.0 -2.2 99.0
srow_y 296 4 2.0 0.0 0.0 -110.0
srow_z 312 4 0.0 2.1 -0.0 -102.899994
intent_name 328 16
magic 344 4 n+1
On 11/15/08 7:56 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
> Hans,
>
> I modified the SymmetricForcesDemonsRegistrationTest to set a
> direction for both fixed and moving. I made the directions the same
> for both fixed and moving. I use a simple rotation matrix for the
> directions. When I do this, the test fails.
>
> I have not checked in the new test. Have you tried the new code with
> images that have non-identity directions?
>
> Bill
>
> On Sat, Nov 15, 2008 at 7:54 AM, Hans Johnson <hans-johnson at uiowa.edu> wrote:
>> Tom,
>>
>> I wanted to bring to your attention some bug fixes with regards to using ITK
>> oriented images and Demons registration.
>>
>> These were the updates that occurred:
>> http://www.cdash.org/CDash/viewUpdate.php?buildid=214181
>> To fix this bug:
>> http://public.kitware.com/dashboard.php?name=itk
>>
>> And these changes allowed all tests to pass with regards our
>> DemonsRegistration algorithm
>>
http://testing.psychiatry.uiowa.edu/CDash/viewTest.php?onlypassed&buildid=317>>
8
>>
>> This can even register 2 data sets where the the Origins, Spacing, Size, and
>> Directions are all different in each image.
>>
>> Hans
>>
>>
>> On 10/21/08 11:33 AM, "Tom Vercauteren" <tom.vercauteren at m4x.org> wrote:
>>
>> Hi Hans,
>>
>> Thanks for the heads up! I wasn't aware of that work and it looks
>> definitely better than what I was proposing.
>>
>> As apparently there already is a community working on maintaining and
>> improving the demons tools on www.nitrc.org, of course it makes sense
>> to keep the development there.
>>
>> I just hope we can manage to keep the work on the core filters within
>> ITK. Then having only a copy of the command-line tools within
>> InsightApplications would be fine.
>>
>> I need to look into the details of BrainDemonsWarp www.nitrc.org to
>> see how we can combine things.
>>
>> Best,
>> Tom
>>
>> On Tue, Oct 21, 2008 at 5:59 PM, Hans Johnson <hans-johnson at uiowa.edu>
>> wrote:
>>> Tom,
>>>
>>> Your work on diffeomorphic demons is fabulous. We have been working hard
>>> to
>>> incorporate your diffeomorphic work into our existing demons registration
>>> application. We have a version that is compatible with your version at
>>> the
>>> command line level, but also has some other advantages: 1) Tested each
>>> night on multiple platforms to above 70% code coverage, 2) additional
>>> documentation to complement your documents, 3) a code dashboard for
>>> following managing the development process, 4) It is built with the
>>> Slicer3
>>> command line execution model, 5) Tested and cleaned up with valgrind, 6)
>>> Available and registered with www.nitrc.org.
>>>
>>>
>>> http://testing.psychiatry.uiowa.edu/CDash/index.php?project=BRAINSDemonWarp
>>> http://www.nitrc.org/projects/brainsdemonwarp/
>>> http://www.nitrc.org/docman/view.php/151/480/BRAINSDemonWarp.pdf
>>>
>>> I am hoping that we can collaborate to combine our two tools documentation
>>> and executables so that we can provide better tools to the registration
>>> community. I agree that making these tools more widely available is a
>>> good
>>> goal, and I would support including a copy of the tool in
>>> InsightApplications, but I would prefer to use www.nitrc.org to manage the
>>> development environment surrounding the development process and bug fixes
>>> for future versions of the tools.
>>>
>>> Please let me know you thoughts.
>>>
>>> Regards,
>>> Hans
>>> --
>>> Hans J. Johnson, Ph.D.
>>> Hans-johnson at uiowa.edu
>>>
>>> 278 GH
>>> The University of Iowa
>>> Iowa City, IA 52241
>>> (319) 353 8587
>>>
>>>
>>>> From: Tom Vercauteren <tom.vercauteren at gmail.com>
>>>> Reply-To: <tom.vercauteren at m4x.org>
>>>> Date: Tue, 21 Oct 2008 17:31:38 +0200
>>>> To: ITK <insight-developers at itk.org>
>>>> Subject: [Insight-developers] Policy for adding an application
>>>> toInsightApplications
>>>>
>>>> Hi,
>>>>
>>>> I am wondering what the policy is for adding new applications to
>>>> InsightApplications.
>>>>
>>>> Now that all the filters from the diffeomorphic demons insight journal
>>>> submission have been integrated to ITK, I thought it might be worth
>>>> adding the demons command-line tool to InsightApplications.
>>>>
>>>> The code consists of a single c++ file with some CMake and testing
>>>> stuff. It uses metaCommand to parse the command-line arguments and has
>>>> a few options as shown below.
>>>>
>>>> Would there be an interest in committing that to InsightApplications
>>>> or to the ITK registration examples?
>>>>
>>>> Regards,
>>>> Tom
>>>>
>>>> $ ./DemonsRegistration
>>>> Option FixedImageFile is required but not defined
>>>> Option MovingImageFile is required but not defined
>>>> Command tags:
>>>> -f --fixed-image < filename >
>>>> = Fixed image filename
>>>> -m --moving-image < filename >
>>>> = Moving image filename
>>>> [ -b --input-field < filename > ]
>>>> = Input field filename
>>>> [ -p --input-transform < filename > ]
>>>> = Input transform filename
>>>> [ -o --output-image < filename > ]
>>>> = Output image filename
>>>> With: filename (Default = output.mha)
>>>> [ -O --output-field [ filename ] ]
>>>> = Generate the output field and optionally specify a filename
>>>> With: filename (Default = OUTPUTIMAGENAME-field.mha)
>>>> [ -r --true-field < filename > ]
>>>> = Specify a "true" field to compare the registration result with
>>>> (useful for synthetic experiments)
>>>> [ -i --num-iterations < uintvect > ]
>>>> = List of number of iterations for each multi-scale pyramid
>>>> level < UINTx...xUINT >
>>>> With: uintvect (Default = 15x10x5)
>>>> [ -s --def-field-sigma < floatval > ]
>>>> = Smoothing sigma for the deformation field (pixel units).
>>>> Setting it value below 0.5 means no smoothing will be performed
>>>> With: floatval (Default = 1.5)
>>>> [ -g --up-field-sigma < floatval > ]
>>>> = Smoothing sigma for the update field (pixel units). Setting it
>>>> below 0.5 means no smoothing will be performed
>>>> With: floatval (Default = 0.0)
>>>> [ -l --max-step-length < floatval > ]
>>>> = Maximum length of an update vector (pixel units). Setting it
>>>> to 0 implies no restrictions will be made on the step length
>>>> With: floatval (Default = 2.0)
>>>> [ -a --update-rule < type > ]
>>>> = Type of update rule. 0: s <- s o exp(u) (diffeomorphic), 1: s
>>>> <- s + u (additive, ITK basic), 2: s <- s o (Id+u) (compositive,
>>>> Thirion's proposal?)
>>>> With: type (Default = 0)
>>>> [ -t --gradient-type < type > ]
>>>> = Type of gradient used for computing the demons force. 0 is
>>>> symmetrized, 1 is fixed image, 2 is warped moving image, 3 is mapped
>>>> moving image
>>>> With: type (Default = 0)
>>>> [ -e --use-histogram-matching ]
>>>> = Use histogram matching prior to registration (e.g. for
>>>> different MR scanners)
>>>> [ -d --verbose [ intval ] ]
>>>> = Algorithm verbosity (debug level)
>>>> With: intval (Default = 1)
>>>> _______________________________________________
>>>> Insight-developers mailing list
>>>> Insight-developers at itk.org
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>>
>>>
>>> Notice: This UI Health Care e-mail (including attachments) is covered by
>>> the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
>>> confidential and may be legally privileged. If you are not the intended
>>> recipient, you are hereby notified that any retention, dissemination,
>>> distribution, or copying of this communication is strictly prohibited.
>>> Please reply to the sender that you have received the message in error,
>>> then delete it. Thank you.
>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
More information about the Insight-developers
mailing list