[Insight-users] Problem with Demons deformable registration

Tom Vercauteren tom.vercauteren at m4x.org
Fri May 28 13:33:59 EDT 2010


Hi Xuan

You are using a HistogramMatchingImageFilter in your code. It would be
worth checking that it is not this step that produces the constant
value images. You should write down the image produced by this filter.

As a side note, do you actually need the histogram matching? If your
images are discrete labels, you should not change their intensities
before doing the registration.

Hope this helps,
Tom

On Fri, May 28, 2010 at 19:20, Xuan Zhao <xuanaux at gmail.com> wrote:
> Hi, Luis
>
> Thank you so much for your detailed analysis. Here is my implementation.
>
>> A)  What pixel type are you using for the image types
>>       in the template instantiation of the Demons filter ?
>
> The type of input image is unsigned short. And I casted the image to
> float as the instantiation type of Demons filter. Cause I notice that
> examples are mostly in float type.
>
>
>> B)   Have you verified the content of the resampled moving
>>       image after the rigid registration ?
>>       It could well be that such image is outside of the
>>       extent of the fixed image and it was resampled to
>>       an empty value
>
> I did verify the resampled moving image after the rigid registration.
> I wrote the resampled image to DICOM files and it seems correct.
>
>> C)  What value are you using for the Default pixel value
>>       in the Resample Image filter ?
>>       (after the rigid registration )
>
> The default pixel value in the resampled image filter is 0.
>
>> D)   For how many iterations is the Demons filter running ?
>
> I used only one iteration for the Demons filter just for simplicity.
> Because images are first rigidly registered so there is large overlap
> between them. So I think even one iteration should work although the
> deformation maybe very small. I tried using more iterations (up to 10
> because it took really long time for each iteration) and the resulting
> image is still constant.
>
>> E)    Please try writing the image to a file format different
>>        from DICOM (for example, .mha, .vtk, .nrrd, .nii) and
>>        use a standard image application (such as Slicer)
>>        to look at the content of the image.   That will help us
>>        rule out DICOM (or not) as the source of the problem.
>
> I definitely could try this. But as I mentioned, I wrote resampled
> image to DICOM files, they are correct. So I think the DICOM part
> should not be the problem.
>
> Actually, I am thinking would the problem caused by the different
> orientations of two images, in which one is in supine position and
> another is in prone. But it is still confusing since the rigid
> registration works well. Anyway, I will check details regarding this.
>
> Regards,
> Xuan
>
> On Fri, May 28, 2010 at 7:45 AM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>
>> Hi Xuanaux,
>>
>>
>> A)  What pixel type are you using for the image types
>>       in the template instantiation of the Demons filter ?
>>
>>
>> B)   Have you verified the content of the resampled moving
>>       image after the rigid registration ?
>>       It could well be that such image is outside of the
>>       extent of the fixed image and it was resampled to
>>       an empty value
>>
>>
>> C)  What value are you using for the Default pixel value
>>       in the Resample Image filter ?
>>       (after the rigid registration )
>>
>> D)   For how many iterations is the Demons filter running ?
>>
>>
>> E)    Please try writing the image to a file format different
>>        from DICOM (for example, .mha, .vtk, .nrrd, .nii) and
>>        use a standard image application (such as Slicer)
>>        to look at the content of the image.   That will help us
>>        rule out DICOM (or not) as the source of the problem.
>>
>>
>>
>>    Please let us know,
>>
>>
>>          Thanks
>>
>>
>>             Luis
>>
>>
>> --------------------------------------------------------------------------------
>> On Wed, May 26, 2010 at 6:13 PM, xuanaux <xuanaux at gmail.com> wrote:
>>>
>>> Hi, guys
>>>
>>> I am trying to use Demons registration filter to register two 3-D volume
>>> images of heart. Heart volume images were segmented from CT scans of whole
>>> body. Rigid registration was first applied to make a global registration
>>> of
>>> two images. Transformed moving image and original fixed image were used as
>>> moving and fixed images of Demons algorithm. However, when I write back
>>> the
>>> resulting image to the DICOM files, the resulting image has constant value
>>> of 1024, which is apparently not correct. I did check the two inputs
>>> images
>>> to the Demons filter. They have the same origin, orientation and spacing.
>>> I
>>> have no idea what is going wrong.
>>>
>>> Could any one give me any suggestion of the possible problem? Thanks in
>>> advance!
>>>
>>> Attached please find the code of Demons registration part.
>>>
>>> http://itk-insight-users.2283740.n2.nabble.com/file/n5106037/code-Demons.txt
>>> code-Demons.txt
>>> --
>>> View this message in context:
>>> http://itk-insight-users.2283740.n2.nabble.com/Problem-with-Demons-deformable-registration-tp5106037p5106037.html
>>> Sent from the ITK Insight Users mailing list archive at Nabble.com.
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list