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

Luis Ibanez luis.ibanez at kitware.com
Thu Mar 18 19:06:45 EDT 2010


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
>> >


More information about the Insight-users mailing list