[Insight-users] 3D Segmentation Mask

Luis Ibanez luis.ibanez at kitware.com
Tue May 20 14:10:18 EDT 2008


Hi Cameron,

It is great that you got the program to work.

About your question regarding oriented images.

The orientation is usually provided in the image file.
(for example DICOM or MetaImage).

This orientation indicates the relative position of
the image slices with respect to a reference system
(defined differently depending on the file format).

Both the itkOrientedImage and the itkImage will read
and carry the Direction (orientation) information from
an image file.

The difference between the itkOrientedImage and the
itkImage is that when they convert indices to Physical
Points, and viceversa:

  * itkOrientedImage will take Direction into account
  * itkImage will *not* take Direction into account


Note that for the purpose of visualization, VTK does
not automatically take the Direction from an ITK image.

In practice you have to take that Direction from the
ITK image and use it as a Transform in the vtk image
actor. All this, assuming that you want to display
the image *with respect to* the coordinate system that
is the base in the file.

It all depends on your application....




    Regards,


        Luis



------------------------
Cameron Burnett wrote:
> 
> After typing a gigantic email showing all the test results, and the fact 
> that the new stuff did nothing; I decided to try flipping the vtk Dicom 
> object's Z axis once more. I had tried it previously and it did nothing. 
> To my surprise it actually worked this time! I don't understand why I 
> have to flip BOTH the y axis and the z axis, but at least it does what 
> its supposed to now.
> 
> Maybe it was a combination of things. I don't know.
> 
> I've just got 1 question. I've changed my images to OrientedImages, just 
> because I thought that might help. I don't see how it's oriented though, 
> because in all the examples nothing is ever set in order to orientate 
> them to anything. How are they different to normal Images?
> 
> Thanks heaps for your help Luis. It actually helped me understand that 
> my problem wasn't, in order for me to figure out what it was.
> 
> 
> 
> ------------------------------------------------------------------------
>  > Date: Wed, 14 May 2008 14:43:53 -0400
>  > From: luis.ibanez at kitware.com
>  > To: w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
>  > CC: insight-users at itk.org
>  > Subject: Re: [Insight-users] 3D Segmentation Mask
>  >
>  >
>  >
>  > Hi Cameron,
>  >
>  > Thanks for the additional comments.
>  >
>  > The flipping of the Y axis should be ok, since
>  > it takes care of matching VTK and ITK coordinates.
>  > (but it is good to keep it in mind, in case it
>  > is producing secondary effects...)
>  >
>  >
>  > ------
>  >
>  > I'm concerned about your comment indicating that
>  > you change the image origin both after reading it
>  > and after converting it to VTK.
>  >
>  > If you are doing this "manually", this may be
>  > part of the problem.
>  >
>  > When an image is produced as the output of a filter
>  > you shouldn't modify its metadata, unless you first
>  > disconnect the image from the filter.
>  >
>  > If the image is produced by a filter, then you should
>  > use the ChangeInformationImageFilter.
>  >
>  > -----
>  >
>  > Direction cosines are used in ITK (and DICOM) for
>  > indicating the orientation of the image slices
>  > with respect to an base coordinate system. In your
>  > case they are set to identity, so... they are not
>  > involved in the problem that you are observing.
>  >
>  >
>  > -----
>  >
>  >
>  > The print out of the image->Print() methods looks
>  > fine. The relevant pieces are:
>  >
>  > BufferedRegion:
>  > Dimension: 3
>  > Index: [0, 0, 0]
>  > Size: [512, 512, 342]
>  >
>  > Spacing: [0.468, 0.468, 1]
>  > Origin: [0, 0, 0]
>  > Direction:
>  > 1 0 0
>  > 0 1 0
>  > 0 0 1
>  >
>  > ---
>  >
>  > Now what we will need is a chain of print outs
>  > of coordinates of your seed point from the moment
>  > that you acquire it in VTK to the moment you use
>  > it to query the PhysicalPointToIndex() method of
>  > the image.
>  >
>  > In one of those steps the proper coordinates
>  > of the seed point are getting lost.
>  >
>  > Please insert print out for those coordinates
>  > in your code, and set to the mailing list
>  > what you find.
>  >
>  >
>  > Thanks
>  >
>  >
>  > Luis
>  >
> 
> 
> ------------------------------------------------------------------------
> Hotmail on your mobile. Never miss another e-mail with 
> <http://www.livelife.ninemsn.com.au/article.aspx?id=343869>


More information about the Insight-users mailing list