[Insight-users] Can metrics handle nodata/void data values ?
Luis Ibanez
luis . ibanez at kitware . com
Tue, 09 Sep 2003 13:11:14 -0400
Hi Carolyn,
There has been some talk among developers for adding masking capabilities
to the ImageMetrics. In that context the metrics will accept an extra
parameter
in the form of an itkSpatialObjet that will indicate whether a point in
space
is 'inside' or 'outside' the mask. Only pixels inside the mask will be
considered
during the metric computation.
This has not been implemented yet. It is an entry on the list of 'useful
things' to
add to the toolkit.
If you are in a hurry for using such functionality you may want to try the
set of modifications below:
1) in the itkImageToImageMetric add
- a member variab le of type itk::Image<char,N> m_ImageMask
- itkSetObjectMacro( ImageMask )
2) in the specific metric : e.g. itkNormalized Correlation,
go to the GetValue() method and in the image iteratorloop
add an "if()" that will test if the pixel of the fixed image is
enabled on the mask image. If it not, the pixels is discarded
and the iterator incremented.
Masking will certainly be very useful for medical applications since
it will allow the metric to concentrate on the regions that are
relevant for the clinical application at hand.
Please let us know if you would like to have more details on
how to implement this.
Regards,
Luis
----------------------------
Carolyn Johnston wrote:
> I haven't found anything about this yet, either online or in the
> software guide...
>
> I have data that contains void (no data available) pixels. I am
> wondering whether it is possible to identify their values to a metric,
> and have it handle them appropriately. For example, if the mean
> squares metric sees a nodata value in either the fixed or moving
> image, it might just skip over that point. (I realize this would
> create normalization problems for the metric, but this is just an
> example). Or nodata values could be replaced by white noise in the
> metric calculation, if normalized correlation were the metric in use.
>
> Is anything like this already in place in Insight?
>
> thanks,
> Carolyn
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>