[Insight-users] ShiftScaleImageFilter Bug
Luis Ibanez
luis.ibanez at kitware.com
Sat Oct 30 11:38:17 EDT 2004
Hi Andy,
Thanks for pointing this out.
Yes, this is a knonwn bug of the documentation.
(that is, in the Software Guide).
The ShiftScale filter is actually shifting first and scaling
after shifting. Note that the Doxygen documentation
is consistent with what the filter actually does.
The comment of the Software Guide has already been fixed
in the file
Insight/Examples/Filtering/
CastingImageFilters.cxx
Note that there are several filters that will apply linear
transformation to the intensities of the input image.
For example:
RescaleIntensityImageFilter
NormalizeImageFilter
IntensityWindowingImageFilter
and of course you can always write your own, by
simply deriving from the UnaryFunctorImageFilter.
Please let us know if you find any other problems
Thanks
Luis
-------------------------
Andy Eow wrote:
> Hi,
>
> According to the software guide, ShiftScaleImageFilter is suppose to
> perform the following operation:
>
> OutputPixel = InputPixel * Scale + Shift
>
> However, the code in itkShiftScaleImageFilter.txx does the opposite
> instead:
>
> value = (static_cast<RealType>(it.Get()) + m_Shift) * m_Scale;
>
> Is this a bug? It does make a lot more sense for the multiplication
> operation to take place first before the scalar shift.
>
> Cheers,
> Andy
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list