[Insight-users] Question about itkImageGaussianModelEstimator
Sayan Pathak
SayanP at alleninstitute.org
Wed Jul 6 20:21:06 EDT 2005
Hi Jimmy,
You made a good observation. In designing the class, it was assumed that
the foreground classes (classes of interest) have labels greater than 0.
0 is considered to be background.
In most medical images a large chunk of the image is occupied by the
background. Iterating through the background adds to the computation
time. Many a times the background statistics is known apriori or can be
set more efficiently by doing sparse sampling. Also the background
statistics in many cases does not change frequently. In such cases the
statistics for the background could be separately computed, a model is
often generated which is then reused until the background changes.
At design time it was concluded if a user needed to calculate the
statistics with class labels 0; He/She would be expected to assign the
class a non-zero label say by offsetting all the labels by 1. I would
suggest that your resort to this approach if you want to use this class
for background class estimator. Alternatively, you may want to look into
using itkGaussianDensityFunction.h
<itkGaussianDensityFunction_8h-source.html> in itk::statistics for
handling the background as a special class.
Thanks,
Sayan
> Date: Tue, 05 Jul 2005 12:05:27 +0800
> From: "Jimmy Wong" <good_piggy at msn.com>
> Subject: [Insight-users] Question about itkImageGaussianModelEstimator
> To: insight-users at itk.org
> Message-ID: <BAY5-F117DD30928D20CFCC22A0DF9E60 at phx.gbl>
> Content-Type: text/plain; format=flowed
>
> Dear all,
>
> In itkImageGaussianModelEstimator.txx, line 219, the code is
>
>
//----------------------------------------------------------------------
-------------
> if(classIndex > 0)
> {
> m_NumberOfSamples[classIndex][0] +=1;
> InputImagePixelType inImgVec = inIt.Get();
>
> for(unsigned int band_x = 0; band_x < VectorDimension; band_x++)
> {
> m_Means[classIndex][band_x] += inImgVec[band_x];
> for(unsigned int band_y = 0; band_y <= band_x; band_y++ )
> {
> m_Covariance[classIndex][band_x][band_y] += inImgVec[band_x]
*
> inImgVec[band_y];
> }
> }
> }
> }// end for
>
>
//---------------------------------------------------------------------
>
> If the condition is classIndex > 0, will we lost one class?
>
> Thanks in advance.
>
> Zhimin
>
> _________________________________________________________________
> Get an advanced look at the new version of MSN Messenger.
> http://messenger.msn.com.sg/Beta/Default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050706/22d382bd/attachment.html
More information about the Insight-users
mailing list