[Insight-users] RescaleIntensityImageFilter doesn't respect user-set
InputMinimum/Maximum
Luis Ibanez
luis.ibanez@kitware.com
Fri May 21 16:21:43 EDT 2004
Hi Mathias,
The RescaleIntensityImageFilter shouldn't have had method
for SetInputMinimum and SetInputMaximum. This was a bug.
The methods have been removed today. This filter computes
those values internally by using MinimumMaximumImageCalculators
in the BeforeThreadedGenerateData() method.
This was registered as Bug# 865
http://www.itk.org/Bug/bug.php?op=show&bugid=865&pos=0
If you want to set up manually the values for the input minimum
and maximum, then you should use the IntensityWindowingImageFilter.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html
If you want to use an arbitrary linear transformation in intensity
the you could use the ShiftScaleImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ShiftScaleImageFilter.html
Note that internally all this filters just use the UnaryFunctor
image filter and provide different way of defining a linear
transformation in intensity.
Regards,
Luis
----------------------
Mathias Seitel wrote:
> Hello,
>
> I also think it's convenient to have a rescale intensity filter which
> allows for both automatic detection and manual setting of the input
> image range. I've recently written a class itk::MapIntensityImageFilter
> which is similar to RescaleImageIntensityFilter, but offers two
> operation modes:
>
> Range: InputMinimum and InputMaximum have to be specified manually
>
> MinMax: InputMinimum and InputMaximum will be detected with a
> StatisticsImageFilter
>
> In my application, this filter helps to reduce memory consumption and
> processing time, since I need to switch the mapping behaviour during
> runtime.
>
> Please let me know if you are interested in the code so I could post it.
>
> Mathias
>
>
> Luis Ibanez wrote:
>
>>
>> Hi Zach,
>>
>> This looks like a bug....
>>
>> Actually there shouldn't be any SetInputMinimun and
>> SetInputMaximum methods in this filter...
>>
>>
>> In any case, the filter that you want is the
>>
>> IntensitityWindowImageFilter
>>
>> http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html
>>
>>
>>
>> where you can select the input and output, minimum
>> and maximum.
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> ---------------------
>> Zachary Pincus wrote:
>>
>>> Hello,
>>>
>>> The RescaleImageIntensityFilter provides methods to set the
>>> "InputMinimum" and "InputMaximum" values. This provision would lead
>>> one to believe that after setting these values, the rescaling will be
>>> from the user-defined input range to the user-defined output range.
>>>
>>> However, in actuality, these user-defined values are ignored, and
>>> re-set to the minimum and maximum pixel values in the input image.
>>> (itkRescaleIntenistyImageFilter.txx, line 88.)
>>>
>>> I'm trying to think of a good mechanism whereby the user can take
>>> control of these values.
>>> Should the filter automatically note on setting the InputMix/Max that
>>> the user has requested this, and then not overrule them? Then how
>>> would the user turn this off?
>>>
>>> Perhaps there should be additional methods to tell the class to use
>>> the current values or recalculate them? This seems a bit confusing,
>>> though.
>>>
>>> Any thoughts?
>>>
>>> Zach Pincus
>>>
>>> Department of Biochemistry and Program in Biomedical Informatics
>>> Stanford University School of Medicine
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users@itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users@itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
More information about the Insight-users
mailing list