<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Diego Parada</b> <<a href="mailto:icebishop@gmail.com">icebishop@gmail.com</a>><br>Date: 27-jul-2005 12:33
<br>Subject: bmp series reader<br>To: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a>.<br><br></span>Hello.<br>
<br>
I like read a bmp series, the code is:<br>
<br>
typedef itk::RGBPixel< unsigned char > PixelType;<br>
const unsigned int Dimension = 3;<br>
typedef itk::Image< PixelType, Dimension > ImageType; <br>
<br>
typedef itk::ImageSeriesReader< ImageType > ReaderType;<br>
typedef itk::ImageFileWriter< ImageType > WriterType;<br>
typedef itk::NumericSeriesFileNames NameGeneratorType;<br>
<br>
ReaderType::Pointer reader = ReaderType::New();<br>
WriterType::Pointer writer = WriterType::New();<br>
NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();<br>
<br>
nameGenerator->SetStartIndex( 2 );<br>
nameGenerator->SetEndIndex( 7 );<br>
nameGenerator->SetIncrementIndex( 1 );<br>
<br>
nameGenerator->SetSeriesFormat( "IRM%03d.bmp" );<br>
<br>
reader->SetImageIO( itk::BMPImageIO::New() );<br>
<br>
reader->SetFileNames( nameGenerator->GetFileNames() );<br>
<br>
try<br>
{ <br>
reader->Update();<br>
}<br>
catch( itk::ExceptionObject & excp )<br>
{<br>
std::cerr << "Error reading the series " << std::endl;<br>
std::cerr << excp << std::endl;<br>
}<br>
reader->Delete();<br>
writer->Delete(); <br>
nameGenerator->Delete(); <br><br>
this compile whitout errors, but no run succefully.<br>
<br>
I like how can convert bmp to png in runtime<br>
<br>
thanks<br><span class="sg">
<br>
<br>-- <br>Diego Armando Parada Cuervo<br>Estudiante de Ingeniería de Sistemas y Computación<br>Universidad Pedagógica y Tecnológica de Colombia
</span><br><br>-- <br>Diego Armando Parada Cuervo<br>Estudiante de Ingeniería de Sistemas y Computación<br>Universidad Pedagógica y Tecnológica de Colombia