[Insight-users] Inversion of pixel value within a fixed intensity
window
Luis Ibanez
luis.ibanez at kitware.com
Tue Jan 11 10:20:18 EST 2005
Hi Amitesh,
Yes, you can use the IntensityWindowingImageFilter for this purpose.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html
a typical 8bit image can be inverted with this filter
by setting the following parameters:
filter->SetInputMaximum( 255 );
filter->SetInputMinimum( 0 );
filter->SetOutputMaximum( 0 );
filter->SetOutputMinimum( 255 );
For a description of filters that change intensity pixel-wise,
please look at the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
Section 6.2.1, pdf-page 146.
----------------------------
You may want to look also at the following filters:
1) ShiftScaleImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ShiftScaleImageFilter.html
2) RescaleIntensityImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html
3) and if you are ok with non-linear transformations,
The Sigmoid image filter is commonly used for inverting images
when creating the spped image for LevelSets
http://www.itk.org/Insight/Doxygen/html/classitk_1_1SigmoidImageFilter.html
You may also look at the ImageAdaptors chapter in the
ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
Image adaptors are a good way of implementing Pixel-wise operations
and avoid the memory duplications that results from the use of
image filters.
Regards,
Luis
------------------------
Amitesh Agarwal wrote:
> Hello,
>
> I wanted to know if there is any method available which can let me
> perform a mathematical operation on each pixel of a 3D .vtk image.
>
> the function would be of type
> G(I) = -1* f(I) + (Imax - Imin) .... where I is the intensity value of
> a pixel, Imax is the intensity maxima in an image and Imin is the
> intensity minima in a image.
>
> The reason for this pixel intensity transformation is that I wanted to
> create a negative of an Image or in other words I wanted to invert the
> intensity value within a maximum-minimum intensity range.
>
> Thanks
>
> Amitesh
> _______________________________________________
> 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