[Insight-users] generating a whole displacement field by combining two halves, generated separately

Seth Gilchrist seth at mech.ubc.ca
Tue Apr 30 20:26:20 EDT 2013


Hi Tim,
Another way to do this that might be faster is to create an image of zeros
with a region large enough to hold the two images (maybe templated off the
original image used in the registrations), then use the AddImageFilter to
place each sub image into the larger one. You would have to do it component
by component using VectorImageToImageAdapter on one end and the
JoinImageFilter on the other.

Create Output Image -> VectorImageToImageAdapter into components ->
AddImageFilter for each component -> JoinImageFilter

Seth



On Mon, Apr 29, 2013 at 9:34 AM, Tim Bhatnagar <tim.bhatnagar at gmail.com>wrote:

>  Thanks Seth, I like the idea... but with the def fields having pretty
> much all of the exact attributes, I was hoping to append the files on a
> more macro-scale... however, I think it may require a process like you
> outlined.
>
> Thanks for the help!
>
> Tim
>
>
> On Fri, Apr 26, 2013 at 6:13 PM, Seth Gilchrist <seth at mech.ubc.ca> wrote:
>
>> Hi Tim,
>> You could try to create two deformation fields in the regions each
>> transform defines, then use the bool output of
>> TransformPhysicalPointToIndex with your two input deformation fields to
>> construct your output deformation field.
>>
>>  Iterate through the deformation field and try this psudo code:
>>
>>  for all index in finalDeformField
>>   location = finalDeformField::TransformIndexToPhysicalPoint(index)
>>    if defField1::TransformPhysicalPointToIndex(location)
>>      Use the data from field one
>>   elseif defField2::TransformPhysicalPointToIndex(location)
>>     Use the data from field two
>>   else
>>     Nothing
>>   end
>> end
>>
>>  Cheers,
>> Seth
>>
>>
>
>
> --
> 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/20130430/74290623/attachment.htm>


More information about the Insight-users mailing list