<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">I read a dicom series(short type)
and use RescaleIntensityImageFilter to change pixel type from short
to unsigned char. At last save it to BMP format. I get a series of
BMP files with bit deep 8. Now I want to read this BMP series I did as
below,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">typedef itk::ImageSeriesReader<
ImageType_Short> ReaderType_Short;<BR></FONT><FONT
face="Bookman Old Style"> ReaderType_Short::Pointer reader =
ReaderType_Short::New();//itk<BR></FONT></DIV>
<DIV><FONT face="Bookman Old Style">
nameGenerator->SetStartIndex(startIndex );<BR>
nameGenerator->SetEndIndex( endIndex );<BR>
nameGenerator->SetIncrementIndex( incrementIndex
);<BR>
nameGenerator->SetSeriesFormat(files);<BR>
reader->SetImageIO( itk::BMPImageIO::New() );<BR>
reader->SetFileNames( nameGenerator->GetFileNames()); </FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">However, exception was thown. Does
BMPImageIO only support RGB format(bit deep 24) instead of index (bit deep
8)format?</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">ITKSoftwareGuide Says that "Note that when
reading and writing images, the pixel type of the<BR>image is not necessarily
the same as the pixel type stored in the file"</FONT></DIV>
<DIV><FONT face="Bookman Old Style">So, another question, if I read a series of
files using pixel type of short, now I want to save it to , e.g., png
format. Assume PNG format support two pixel types, short and unsigned char.
Which format ITK will save it to?</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Regards,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Yixun Liu</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"> </DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV></BODY></HTML>