[vtkusers] Blending images with non-zero origin

Matthieu Ferrant ferrant at tele.ucl.ac.be
Mon Jul 16 12:26:20 EDT 2001


If the origins are different, do I have to explicitly add a translation
transformation so the origins of both images lign up ? It seems that
ImageReslice sets the output spacing and does the padding correctly, but
it ignores different origins i.e. it only changes the origin's
coordinates without actually positioning the image so its coordinates
lign up with those of the reference image before doing the reslicing. Is
this because both extents start from 0 ? The bounds are set correctly
though.

Am I misunderstanding something here ?

thamks,

matt

John Biddiscombe wrote:
> 
> Use ImageReslice on one image with the other as a reference input, one is
> resampled to the spacing and points of the other...works well, thanks to
> David Gobbi for the implementation.
> 
> JB
> 
> At 16:55 13/07/2001, ferrant wrote:
> >Hi,
> >
> >I need to blend two images that have different origins and different
> >sizes. When they get blended, this is not taken into account, i.e. the
> >origin of the images is assumed to be 0,0,0. I assume this is the way it
> >is supposed to work. However, I would like this to be taken into account.
> >
> >To solve my problem, I would need a class that resamples an image given
> >new bounds, and that takes the origin into account, so that if for
> >instance the origin is 30,30,30 and the image size 100,100,100 and that I
> >want to blend it with a 256,256,256 image whose origin is 0,0,0, the first
> >image gets black pixels up the the bounds of the second image. I tried
> >ImageConstantPad, but that sets the origin to 0 before extending the
> >image, and ImageResample does not work the way I want either.
> >
> >Is there a filter that provides this functionality, or do I need to write
> >it myself ?
> >
> >thanks,
> >
> >matt
> >
> >M.Ferrant, Ph.D.
> >UCL/TELE Room A-157 Place du Levant, 2 B-1348LLN - Belgium
> >Tel. +32-10-478073 Fax. : +32-10-472089
> >http://www.tele.ucl.ac.be/MEMBERS/Ferrant_Matthieu_e.html
> >
> >
> >
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> ><http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://public.kitware.com/mailman/listinfo/vtkusers

-- 
M.Ferrant, Ph.D.
UCL/TELE Room A-157 Place du Levant, 2 B-1348LLN - Belgium
Tel. +32-10-478073 Fax. : +32-10-472089
http://www.tele.ucl.ac.be/MEMBERS/Ferrant_Matthieu_e.html




More information about the vtkusers mailing list