[Insight-users] exclude pixel values (background) from metrics

Darren Weber darren.weber.lists at gmail.com
Fri Mar 19 15:49:07 EDT 2010


Hi Luis et al.,

The binary threshold image and the histograms are reasonable and consistent
with my knowledge of the input images.  Nevertheless, the optimization
metric returns 'nan' and the registration returns a "zero transform" when
using a reasonable intensity threshold on the metric.

$ more testdata/bw_align/section0005to0004_w1_rigid2D.xfm
#Insight Transform File V1.0
# Transform 0
Transform: Rigid2DTransform_double_2_2
Parameters: 0 0 0
FixedParameters: 0 0


I'm at a loss to understand it.  The registration works well without using
the intensity threshold on the metric.  I guess something is awry in the
statistics.  Perhaps it gets missing values?

I'm grateful for your assistance.  Here is an archive of my program,
testdata, and a README.txt file to explain the situation:
http://ftp.buckinstitute.org/dweber/itkTest.tgz

Perhaps the alternative is to specify image masks in the registration
method?

TIA,
Darren



On Thu, Mar 18, 2010 at 4:06 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Darren,
>
> Yeap, something is wrong with the assumption
> of the image intensities distribution.
>
> You may also want to generate a histogram for
> that image.
>
> The following examples may be useful:
>
>          Insight/Examples/Statistics
>                         ImageHistogram1.cxx
>                         ImageHistogram2.cxx
>                         ImageHistogram3.cxx
>                         ImageHistogram4.cxx
>
>
>     Regards,
>
>
>           Luis
>
>
> ----------------------------------------------------------------------------
> On Thu, Mar 18, 2010 at 7:02 PM, Darren Weber
> <darren.weber.lists at gmail.com> wrote:
> >
> > Hi Luis et al.,
> >
> > I'm puzzled by the intensityThreshold, because the optimizer observer
> gives:
> >
> > Using fixed image intensity threshold: 1
> >
> > 0   nan   [nan, nan, nan]
> > 1   nan   [nan, nan, nan]
> > 2   nan   [nan, nan, nan]
> > 3   nan   [nan, nan, nan]
> > 4   nan   [nan, nan, nan]
> > 5   nan   [nan, nan, nan]
> > 6   nan   [nan, nan, nan]
> > 7   nan   [nan, nan, nan]
> > 8   nan   [nan, nan, nan]
> > 9   nan   [nan, nan, nan]
> > 10   nan   [nan, nan, nan]
> > 11   nan   [nan, nan, nan]
> > 12   nan   [nan, nan, nan]
> > 13   nan   [nan, nan, nan]
> > 14   nan   [nan, nan, nan]
> > 15   nan   [nan, nan, nan]
> > 16   nan   [nan, nan, nan]
> > 17   nan   [nan, nan, nan]
> > 18   nan   [nan, nan, nan]
> > 19   nan   [nan, nan, nan]
> > 20   nan   [nan, nan, nan]
> >
> >
> > I'll try to explore a little more using the
> >
> > BinaryThresholdImageFilter
> >
> > I'll take a look at
> >
> > examples/Filtering/BinaryThresholdImageFilter.cxx
> >
> > Thanks,
> > Darren
> >
> >
> >
> > On Wed, Mar 17, 2010 at 3:44 PM, Luis Ibanez <luis.ibanez at kitware.com>
> > wrote:
> >>
> >> Hi Darren,
> >>
> >> Excellent,
> >>
> >> In that case you should be able to eliminate the background
> >> by using:
> >>
> >> intensityThreshold = 1;
> >> metric->SetFixedImageSamplesIntensityThreshold( intensityThreshold );
> >>
> >> If you want to be 100% sure, it may be worth running a
> >> BinaryThresholdImageFilter first and saving the output
> >> for further visualization. That will provide a good sanity
> >> check.
> >>
> >>
> >>     Regards,
> >>
> >>
> >>            Luis
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------------------
> >> On Wed, Mar 17, 2010 at 5:22 PM, Darren Weber
> >> <darren.weber.lists at gmail.com> wrote:
> >> >
> >> > Hi Luis et al.,
> >> >
> >> > I've created the input images by exporting from Photoshop with a
> defined
> >> > background value (RGB: 0 0 0).  It's these values that I want to
> exclude
> >> > from the metric in the image registration method.
> >> >
> >> > The min color is confirmed by the identify program of ImageMagick:
> >> >
> >> >   Colorspace: RGB
> >> >   Depth: 16-bit
> >> >   Channel depth:
> >> >     gray: 16-bit
> >> >   Channel statistics:
> >> >     Gray:
> >> >       min: 0 (0)
> >> >       max: 46335 (0.707027)
> >> >       mean: 25664.6 (0.391617)
> >> >       standard deviation: 15257.7 (0.232818)
> >> >       kurtosis: -0.857968
> >> >       skewness: -0.771191
> >> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100319/5e5dfa45/attachment.htm>


More information about the Insight-users mailing list