[Insight-users] ResampleImageFilter Problem!
frankmiller at jhmi.edu
frankmiller at jhmi.edu
Thu Jan 24 16:23:30 EST 2008
Yingli,
I did not realize that you were doing registration. You should most
definitely NOT use itk::FlipImageFilter before registration. I only
suggested using itk::FlipImageFilter so the image would display on your
screen the way you want it. If you want to use it this way, it must be
done after registration, right before you write the image to a file.
To clarify, it looks like you are doing everything right. Row one and
two in the attached image you sent are exactly the same except for the
fact that they are displayed on different coordinate systems.
Does this make sense? I'm worried that I have confused you.
Frank
On Thu, Jan 24, 2008 at 04:00:47PM -0500, Yingli Lu wrote:
> Hi Frank,
>
> Thank you very much for your patience.
>
> Enclosed is a figure, which compared your results(flip first before
> registration), guide results and my results.
>
> It seems that for your results and my results, the registration use only the
> image coordinate( origin: upper left, X increasing left, Y increasing
> bottom). So, the problem is how can we tell ITK registration to use the
> "real" physical coordinate (Defaultly, registration use the physical
> coordinate).
>
> Cheers,
>
> Yingli
>
> On Jan 24, 2008 3:21 PM, <frankmiller at jhmi.edu> wrote:
>
> > I use a custom written program to view images so I can't help you there.
> > In the past I have used ImageJ, however I think it displays images with
> > the origin at the top left as well.
> >
> > Probably the simplest thing for you to do is to use itk::FlipImageFilter
> > to reflect the image vertically before you write it.
> >
> > Frank
> >
> > On Thu, Jan 24, 2008 at 02:43:46PM -0500, Yingli Lu wrote:
> > > Hi Frank,
> > >
> > > What viewer do you use? or recommend?
> > >
> > > Thank you,
> > >
> > > On Jan 24, 2008 11:32 AM, <frankmiller at jhmi.edu> wrote:
> > >
> > > > Ying,
> > > >
> > > > The "windows picture and fax viewer" is only displaying the pixel
> > array.
> > > > It does not take into consideration the origin, spacing, or direction.
> > > >
> > > > The geometry of the itk::Image class can be confusing at first. Keep
> > > > reading the user guide and playing with the examples. In particular,
> > see
> > > > figure 4.1 on page 40.
> > > >
> > > > Good luck,
> > > >
> > > > Frank
> > > >
> > > > On Wed, Jan 23, 2008 at 07:04:14PM -0500, Yingli Lu wrote:
> > > > > Hi Frank,
> > > > >
> > > > > I used "windows picture and fax viewer" to open it.
> > > > > It seems that there should be a transformation that transform from
> > image
> > > > > coordinate( origin at the upper left corner, x increasing to the
> > right,
> > > > y
> > > > > increasing to the bottom) to physical coordiante. Tthen, the
> > > > > ResampleImageFilter can use. Am I right?
> > > > >
> > > > > Thank you,
> > > > >
> > > > >
> > > > > On Jan 23, 2008 4:42 PM, <frankmiller at jhmi.edu> wrote:
> > > > >
> > > > > > Ying,
> > > > > >
> > > > > > What program are you using to view the image? Many image viewing
> > > > > > programs have the convention of placing the origin at the upper
> > left
> > > > > > corner, x increasing to the right, y increasing to the bottom.
> > > > > >
> > > > > > Frank
> > > > > >
> > > > > > On Wed, Jan 23, 2008 at 04:28:23PM -0500, Yingli Lu wrote:
> > > > > > > Can anybody help me with this problem:
> > > > > > >
> > > > > > > I just ran the example of
> > > > "Examples/Filtering/ResampleImageFilter.cxx"
> > > > > > at
> > > > > > > section 6.9.4 in the Userguide
> > > > > > >
> > > > > > > But I can't get the same result of Figure 6.40 in the Userguide
> > > > (where,
> > > > > > the
> > > > > > > origin is at the lower left corner of the input image, and X
> > > > coordinate
> > > > > > is
> > > > > > > horizontal to the right, Y coordinate is vertical to the up
> > > > direction).
> > > > > > >
> > > > > > > My result seems to be based on a different coordinate: the
> > origin is
> > > > at
> > > > > > the
> > > > > > > upper left corner, and X coordinate is horizontal to the right,
> > Y
> > > > > > coordinate
> > > > > > > is vertical to the down direction).
> > > > > > >
> > > > > > > Example code is wrong or Userguide is wrong?
> > > > > > >
> > > > > > > Thank you,
> > > > > > >
> > > > > > > Ying
> > > > > >
> > > > > > > _______________________________________________
> > > > > > > Insight-users mailing list
> > > > > > > Insight-users at itk.org
> > > > > > > http://www.itk.org/mailman/listinfo/insight-users
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Yingli Lu
> > > > > GE Canada
> > > > > 268 Grosvenor, E5-137
> > > > > London, ON, N6A 4V2 Canada
> > > > > Phone:(519) 646-6000 ext.64626
> > > > > Email:yinglilu at gmail.com
> > > > > yingli.lu at ge.com
> > > >
> > >
> > >
> > >
> > > --
> > > Yingli Lu
> > > GE Canada
> > > 268 Grosvenor, E5-137
> > > London, ON, N6A 4V2 Canada
> > > Phone:(519) 646-6000 ext.64626
> > > Email:yinglilu at gmail.com
> > > yingli.lu at ge.com
> >
>
>
>
> --
> Yingli Lu
> GE Canada
> 268 Grosvenor, E5-137
> London, ON, N6A 4V2 Canada
> Phone:(519) 646-6000 ext.64626
> Email:yinglilu at gmail.com
> yingli.lu at ge.com
More information about the Insight-users
mailing list