[Insight-users] Re: pixels To cm..

Luis Ibanez luis.ibanez at kitware.com
Sat Oct 23 18:06:51 EDT 2004


Hi Yasser,


1) For converting an Area measured in Pixels^2 to
    an area in mm^2 units you must multiply by the
    product of the pixel spacing:


    ImageType::SpacingType spacing = image->GetSpacing();

    const double factor = spacing[0] * spacing[1];

    double areaInMillimeters = areaInPixels * factor;


2) If you run the program in 3D, and count the
    number of pixels inside a region, that will be
    a measure of volume. If you want to convert it to
    mm^3 then you must do a similar operation to the
    one in (1):

    ImageType::SpacingType spacing = image->GetSpacing();

    const double factor = spacing[0] * spacing[1] * spacing[2];

    double areaInMillimeters = areaInPixels * factor;

     Note that you can run ITK algorithms in 3D natively.
     You *do not* need to do slice-by-slice processing.


3) In both 2D and 3D, if your original segmentation method
    give you any indication of partial volume in the pixels
    in the boundary, you could use it in order to reduce the
    uncertainty of the volume estimation. This is the case
    of LevelSet, for example.




NOTE: Given that pixels represent a discretization of the
       original object, the sum of pixels inside a region
       is just an *estimation* of the region or volume.
       The estimation is good if the region is convex and
       large since the discretization errors only occur in
       the boundaries of the region.  Conversely, if you have
       a region with concave regions and thin protrusions,
       the sum of pixels will give you a poor estimation of
       the region's volume. The estimation may be off by a 100%
       of the real value, when the protrusions are about 1 pixel
       wide. If you want to make a formal estimation of the volume,
       you probably want to consult some of the papers on evaluation
       of geometrical features in discrete spaces.

       Look, of example a the book

          "Geometry of Digital Spaces" by Gabor T. Herman,




Regards



     Luis




--------------------------
yasser salman wrote:

> Hi All,
> i already segment a tumor region in 2D using
> ConfidenceConnectedImageFilter and count the no of
> pixels using RelabelComponentImageFilter , 
> how can i convert these no of pixels into cm2 or mm2
> (the corresponding area in cm or mm).
> another question plz, if i run this program to a
> volume, is the no of pixels in 3D (volume) equal to 
> the sum of all pixels in segmented region in 2D
> slices,
> 
> yasser
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> 






More information about the Insight-users mailing list