[Insight-users] write vector image
Bing Jian
bjian at cise . ufl . edu
Thu, 13 Nov 2003 09:22:43 -0500 (EST)
I just checked that itkImageIOBase.cxx file. It can support
CovariantVector<float,2>, CovariantVector<float,3> and Vector
<float,3>. I guess the reason may be that my pixel type is
CovariantVector<double, 2 or 3>. So I just need to add some
more entries in that file and recompile it?
--
Best wishes,
Bing Jian
bjian at cise . ufl . edu
On Thu, 13 Nov 2003, Mathieu Malaterre wrote:
> Bing,
>
> You should be able to save your file, as I was able back in february:
>
> http://www . itk . org/pipermail/insight-users/2003-February/002483 . html
>
> HTH
> mathieu
>
> Bing Jian wrote:
> > Hi, everybody,
> >
> > Had anyone attempted to write a vector image into file?
> > I don't know why I always get run-time errors when trying
> > to do that.
> >
> > Following is what I did:
> >
> > typedef itk::ImageFileReader<ScalarImageType> ReaderType;
> > typedef itk::ImageFileWriter<VectorImageType> WriterType;
> >
> > ReaderType::Pointer reader = ReaderType::New();
> > reader->SetFileName( argv[1] );
> > reader->Update();
> >
> > WriterType::Pointer writer = WriterType::New();
> > writer->SetFileName( argv[2] );
> >
> > filter->SetInput(reader->GetOutput());
> > writer->SetInput(filter->GetOutput());
> > writer->Update();
> >
> > where filter is an instance of GradientRecursiveGaussianImageFilter
> > and VectorImageType is Image<CovariantVector<double, dim>,dim>.
> >
> > I am wondering if the writer only supports scalar image type.
> >
> > Thanks!
> >
> >
>
>
>