[Insight-users] write vector image

Bing Jian bjian at cise . ufl . edu
Thu, 13 Nov 2003 09:18:36 -0500 (EST)


Hi, Mathieu,

   Thanks a lot. I will try it. Is your fix already put in the CVS
repository. I updated my local copy last night. And how about Vector
type instead of CovariantVector. Just do samething for 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!
> >
> >
>
>
>