[Insight-users] inverting a deformation field - problem
Tim Bhatnagar
tim.bhatnagar at gmail.com
Mon Dec 9 09:29:37 EST 2013
Hey Brad,
So in most of the DeformableRegistration examples that come in the ITK
package, this line is present when creating an output image to
qualitatively see how registration went:
warper->SetInput( movingImageReader->GetOutput() );
which makes it seem like the field generated from the registration process
(also input into this filter) is designed to take the movingImage and warp
it to look like the FixedImage. This is what I have found by running the
process over and over. If I switch the line to read
warper->SetInput( fixedImageReader->GetOutput() );
I get an output image that does not looked like either my fixed or moving
input. Does this still line up with your explanation?
All regions and domains were set to be exactly the same between fixed and
moving data sets. There are significant deformations between data sets,
though.
I'm never certain what data to share... what should I typically include in
these emails? my cxx file? my input data?
Thanks very much for your help,
Tim
On Mon, Dec 9, 2013 at 6:18 AM, Bradley Lowekamp <brad at lowekamp.net> wrote:
> Hello,
>
> I am working on integrating displacement fields into SimpleITK right now,
> so in just a couple days I should be able easily demonstrate this in
> SimpleITK Notebooks.
>
> To use you WarpFilter on a results a a registration, you will be
> resampling the fixed image onto the moving image, as the is the direction
> of the transform.
>
> Have you been able to use the following example:
>
>
> http://www.itk.org/Doxygen/html/Filtering_2WarpImageFilter1_8cxx-example.html#_a4
>
> With the command line arguments as "FixedImage" DisplacementFieldImage"
> "OutputImage"?
>
> Does the moving and fixed image have the same domain prior to registration
> or is there an additional large transformation going on with the
> displacement field?
>
> Also if you could share your data or a small test case illustrating the
> problem this may help others more extensively help you.
>
> Brad
>
> On Dec 9, 2013, at 9:06 AM, Tim Bhatnagar <tim.bhatnagar at gmail.com> wrote:
>
> I appreciate the response, Brad.
>
> Can you tell me how the implementation of the 'WarpImageFilter' works,
> such that when I input my Demons-generated displacement field, and my
> 'movingImage' (from Demons) as input, I get what looks like my 'fixedImage'
> (from Demons) as output... making me think that the displacement field is
> actually mapping my movingImage into my fixedImage?
>
> Also, I use Paraview to visualize my field, and when visualized, it
> illustrates what you are suggesting (the mapping that would take fixed ->
> moving). But how then, does the WarpFilter use the SAME FIELD to warp my
> movingImage into a very nice estimation of my fixedImage?
>
> Sorry if any of that is convoluted..
>
>
> On Mon, Dec 9, 2013 at 6:00 AM, Bradley Lowekamp <brad at lowekamp.net>wrote:
>
>> Hello,
>>
>> It not uncommon for resampling-type algorithms to have some points be
>> mapped out side the the domain. This is why a boundary condition and
>> extrapolators are used. If there are just a limited number of pixel being
>> mapped out side, then the simplest way be by to just check if the pixel is
>> within the image's region.
>>
>> ITK's registration frameworks solve for a transform which maps from the
>> "Fixed" image to the "Moving" image. This is well described int Chapter
>> Eight of the old Software guide:
>>
>> http://www.itk.org/ItkSoftwareGuide.pdf
>>
>> Brad
>>
>> On Dec 8, 2013, at 6:38 PM, Tim Bhatnagar <tim.bhatnagar at gmail.com>
>> wrote:
>>
>> Hello,
>>
>> I've created a displacement field via Demons non-rigid registration. I am
>> now trying to create the inverse (using
>> InverseDisplacementFieldImageFilter), but when I am using the indexes to
>> ascribe the inverted field, my program crashes mid-way through, because it
>> appears I am trying to call a *negative* index (specifically, the 3rd
>> index parameter.. the 'z'-parameter).
>>
>> I don't do anything to the displacement field except write it to a vtk
>> file before i invert it.. can anyone suggest a solution? I thought I could
>> try and specify the 'direction' of the field, but I'm not sure where in my
>> pipeline I can set the direction of the *inverted* displacement field...
>>
>> sorry if that's messy.. any thoughts would be appreciated!
>>
>> Thanks,
>>
>> Tim
>>
>> --
>> Tim Bhatnagar
>> PhD Candidate
>> Orthopaedic Injury Biomechanics Group
>> Department of Mechanical Engineering
>> University of British Columbia
>>
>> Rm 5000 - 818 West 10th Ave.
>> Vancouver, BC
>> Canada
>> V5Z 1M9
>>
>> Ph: (604) 675-8845
>> Fax: (604) 675-8820
>> Web: oibg.mech.ubc.ca
>> _____________________________________
>> 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.php
>>
>> 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
>>
>>
>>
>
>
> --
> Tim Bhatnagar
> PhD Candidate
> Orthopaedic Injury Biomechanics Group
> Department of Mechanical Engineering
> University of British Columbia
>
> Rm 5000 - 818 West 10th Ave.
> Vancouver, BC
> Canada
> V5Z 1M9
>
> Ph: (604) 675-8845
> Fax: (604) 675-8820
> Web: oibg.mech.ubc.ca
>
>
>
--
Tim Bhatnagar
PhD Candidate
Orthopaedic Injury Biomechanics Group
Department of Mechanical Engineering
University of British Columbia
Rm 5000 - 818 West 10th Ave.
Vancouver, BC
Canada
V5Z 1M9
Ph: (604) 675-8845
Fax: (604) 675-8820
Web: oibg.mech.ubc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131209/99f27d4d/attachment.htm>
More information about the Insight-users
mailing list