[Insight-developers] Re: Re: VectorImage IO
Karthik Krishnan
Karthik.Krishnan at kitware.com
Fri Sep 16 12:45:58 EDT 2005
Hi Bryn,
This is done.. You can instantiate the readers and writers just as you
do for all other images.
thanks
Regards
Karthik
Karthik Krishnan wrote:
> Hi Bryn,
>
> On Wed, 2005-08-24 at 19:32 -0400, Bryn Lloyd wrote:
>
>> / Hi Karthik,
>
> />/ />/ If I understand correctly, you say VectorImages should be
> readable/writable?
> /
> Yes it is, with any file format that supports multi-component data such
> as Metaimage, nrrd, vtk, ........
>
>> /
>
> />/ I think the IO does not work for VectorImages yet. I have added some
> />/ simple code to this email to read and write a VectorImage. It does
> not
> />/ compile!?
> /
> There is a test for that does IO with the VectorImage: Please take a
> look at Testing/Code/Common/itkVectorImageTest.cxx.
>
> The line you need to change to get this code to compile is:
>
> So your code should read:
>
> typedef itk::VectorImage< PixelType, Dimension > ImageType;
> typedef itk::ImageFileReader< ImageType, itk::DefaultConvertPixelTraits<
> PixelType > > ReaderType;
>
> instead of
>
> typedef itk::ImageFileReader< ImageType > ReaderType;
>
> [The point being that you want the reader treating the VectorImage as a
> multi-component 3 dimensional image with scalar pixels, rather than as a
> 3D image with Vector pixels.]
>
> Yes I know that you may not be used to adding that extra word there, I
> intend picking this up from as traits from the image itself, so you
> won't have to do that in future, but I won't do that during before the
> release.
>
> Thanks Regards
> Karthik
>
>
More information about the Insight-developers
mailing list