Re: [Insight-users] what is the différence between image origin and region index?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [Insight-users] what is the différence between image origin and region index?

Luis Ibanez

Hi Amir,

Please read the ITK Software Guide:

In particular section 4.1.4 "Defining Origin and Spacing"
in pdf-page 71.

You may want to pay particualr attention to Figure 4.1.

You will find additional information on this topic on the
section on Image Resampling, Section 6.9.4, "Resample Image
Filter", pdf-page 254.

To quickly answer your question

* Origin are the physical coordinates of the index (0,0,0)
   of your image. Origin is given in millimeters and it is
   associating your image to a coordinate system in the real
   physical world (where patients and organs really exist).

* Starting index : are the integer coordiniates of the first
   pixel in an image. They are typically (0,0,0) in a 3D image,
   but they may get other values when that image is the result
   of extracting a Region of Interest (ROI) from a larger image.

When you think of the "Origin" you should think on the Patient
laying on the bed of a CT Scanner, and you should think in
physical units, such as millimeters or centimeters.

When you think of the "Starting Index" you should think on the
integer coordinates of a pixels on the grid used for sampling
the image.

  Please read the sections of the ITK Software Guide
  recommended above, and let us know if you have any
  further questions.



charfeddine amir wrote:

>  Hi all
> i want to declare a new image, and to set the differents parameters,
> should i define a region to the image and its index and size, or should
> i define only the image, and what is the différence between image origin
> and region index?
> ImageType3::PointType origin;
>     origin[0]=0;
>     origin[1]=0;
>     origin[2]=0;
>     ImageType3::IndexType start;
>     start[0]=0;
>     start[1]=0;
>     start[2]=0;
>     ImageType3::SpacingType spacing;
>     spacing[0]=0.1;
>     spacing[1]=0.1;
>     spacing[2]=0.1;
>     ImageType3::SizeType size;
>     size[0]=512;
>     size[1]=512;
>     size[2]=512;
>     ImageType3::RegionType region;
>     region.SetSize(size);
>     region.SetIndex(start);
>     volume->SetSpacing(spacing);
>     volume->SetOrigin(origin);
>     volume->SetRegions(region);
>     volume->Allocate();
> thx
> Amir.
> ------------------------------------------------------------------------
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez
> <*>
> la version beta.
> ------------------------------------------------------------------------
> _______________________________________________
> Insight-users mailing list
> [hidden email]

Insight-users mailing list
[hidden email]