[Insight-users] ITK-generated .mha crashes Paraview
Ali -
saveez at hotmail.com
Fri Jan 4 09:52:19 EST 2008
Hi,
Generating an mha file using a (not so) minimal code in ITK, causes Paraview to crash. In the attached example, when first open the output file, I can only see the data bounds, setting the view to point/surface/etc view crashes Paraview.
It is not clear to me whether this is an ITK bug or a Paraview one.
code:
-------------------------------
const unsigned int Dimension = 2;
typedef double FPixelType;
typedef itk::Image< FPixelType, Dimension> FImageType;
typedef unsigned char UCPixelType;
typedef itk::Image< UCPixelType, Dimension> UCImageType;
typedef itk::ImageFileReader< FImageType> ReaderType;
ReaderType::Pointer reader1 = ReaderType::New();
reader1->SetFileName("in.bmp");
reader1->Update();
typedef itk::RescaleIntensityImageFilter< FImageType, UCImageType> RescaleType;
RescaleType::Pointer rescale = RescaleType::New();
rescale->SetInput(reader1->GetOutput(0));
rescale->SetOutputMinimum(0);
rescale->SetOutputMaximum(255);
typedef itk::ImageFileWriter< UCImageType> WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetInput(rescale->GetOutput());
writer->SetFileName("out.mha");
writer->Update();
------------------------------
_________________________________________________________________
Get Hotmail on your mobile, text MSN to 63463!
http://mobile.uk.msn.com/pc/mail.aspx
More information about the Insight-users
mailing list