[Insight-users] ImageIO or FILeReader or FIleWrite's problem,

Shunming Fang shunm_fang at yahoo . com
Mon, 30 Jun 2003 13:52:52 -0700 (PDT)


Hello, itk_users:
Thank your guys about smartpointer problem, that
problem seems to be solved in my itkWrapFilter
program, but another problem happen when I test this
program, there is a segmentation when
writer->Update().my code is similar to the fallowing:
in main(0 function, I do the following thing:
itk::ImageIOBase::Pointer inputImageIO;
itk::ImageIOBase::Pointer outputImageIO;
then, according to input file format and output file
format:
inputImageIO = itk::SpecificImageIO::New();
outputImageIO = itk::SpecificImageIO::New();
.
.
reader->setImageIO(inputImageIO);
writer->setImageIO(outputImageIO);
.
.
outputImage = itkWrapFilters(reader->GetOutput());
writer->SetInput(outputImage);
writer->Update();


I use ddd to debug it, the segmentation happen in
writer->Update() when the input and output file format
is the same, I wander may there are some problems in
declaring both inout and output ImageIO, anybody have
some idea how to fix it?
Thanks
Fang

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc . yahoo . com