[Insight-users] SpatialObjects and Images

Julien Jomier jjomier at cs.unc.edu
Fri May 27 16:19:57 EDT 2005


Hi Emiliano,

There is a class named itkSpatialObjectToImageStatisticsCalculator which 
takes an image and a spatialObject and returns the statistics of the 
image only inside the given object.

However, I don't think it's currently returning the sum of the pixels, 
but it should be easy to add. Give me some time and I'll check this into 
the cvs repository. I'll also add a function to return the number of 
pixels inside the object.

Julien

Emiliano Beronich wrote:
> Hi everybody!
> 
> I have a 2D SpatialObject and an ItkImage. I want to calculate the sum 
> of the intensities of the pixels belonging to the image inside the 
> SpatialObject and the count of pixels inside the SpatialObject. The last 
> value is related to the area of the SpatialObject but it is not the 
> same, because I want to consider whole pixels. A pixel must be counted 
> only if the function IsInside() of the SpatialObject is true for it.
> 
> I think this is a very common task. How can it be accomplished?
> 
> Regards
> Emiliano
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 



More information about the Insight-users mailing list