[Insight-users] Problem in using AdaptiveHistogramEqualizationImageFilter
Luis Ibanez
luis . ibanez at kitware . com
Mon, 29 Sep 2003 10:53:00 -0400
Hi Rashmi,
Here are three (independent) options:
1) You can declare your ImageFileReader to be templated
over Image<float,N>. Event though the content of the
files is unsigned char, or unsigened short. The reader
will perform plain C-languaje casting from the type in
the files to the type of the ImageFileReader. Since
you are promoting to a type with larger dynamic range,
this operation will be safe.
See section 7.3 in the SoftwareGuide, pdf-page 224
http://www . itk . org/ItkSoftwareGuide . pdf
Or
2) You can use the CastImageFilter and convert the image
of unsigned char/short into an image of double.
See section 6.2 "Casting and Intensity Mapping" in the
SoftwareGuide. pdf-page 146
http://www . itk . org/ItkSoftwareGuide . pdf
Or
3) You could use ImageAdaptor for presenting the image
of pixels unsigned char/short as an image of pixel
type float.
See chapter 12 of the SoftwareGuide, pdf-page 522.
http://www . itk . org/ItkSoftwareGuide . pdf
Regards,
Luis
---------------------
rg32 at njit . edu wrote:
> Hi All,
> It seems the problem with the code that i posted is the following:
> I'm working with png images with the code.PNG images require unsigned char /
> unsigned short to work with. The AdaptiveHistogramEqualizationImageFilter
> however requires float data.
> Is there a resolution to this?
> -Rashmi
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>