[Insight-users] RGB->unsigned char
Fernando López Mir
ferlomi at hotmail.com
Fri Apr 3 03:41:18 EDT 2009
I have a
problem, because I have a imagetype like a RGB ImageType
typedef
itk::RGBPixel< signed short > PixelType;
typedef itk::Image< PixelType, Dimension > ImageType;
.
.
.
And I need rescale the image with the
property:
.
.
.
typedef itk::RescaleIntensityImageFilter<ImageType,ImageType >
FilterType;
filter->SetOutputMinimum(
0 );
filter->SetOutputMaximum( 255 );
.
.
.
The error
is
error C2664:
'itk::RescaleIntensityImageFilter<TInputImage,TOutputImage>::SetOutputMinimum'
: it’s not possible cast the parameter 1 'int' at 'const
itk::RGBPixel<TComponent>'
2> with
2> [
2>
TInputImage=Medicalsegmentation::ImageType,
2>
TOutputImage=Medicalsegmentation::ImageType
2>
]
2>
and
2>
[
2>
TComponent=short
2> ]
In general
I make this because I need read normal images(RGB, JPG, TIFF…), and Dicoms and
I need Rescale the dicoms images to [0,255].
_________________________________________________________________
Más rápido, sencillo y seguro. Descárgate ya el nuevo Internet Explorer 8 ¡Es gratis!
http://www.vivelive.com/ie8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090403/6bf758c2/attachment-0001.htm>
More information about the Insight-users
mailing list