[vtkusers] RE: [Insight-users] MetaImage 'Offset' (vs 'Position') tag
Frederic Perez
fredericpcx at yahoo.es
Sun Nov 7 09:52:03 EST 2004
Hello Jim,
thank you very much for the information!
Best regards,
Frederic Perez
--- "Miller, James V (Research)" <millerjv at crd.ge.com> escribió:
> The MetaIO library in Insight/Utilities/MetaIO is what ITK
> uses to write Meta images. I consider this the "master"
> implementation of the Meta format.
>
> Looking through that code, it looks like Offset and Position
> are synonymous. Calling SetPosition/GetPosition actually
> modifies the Offset fields.
>
> When finally writing the Meta image, only "Offset" is written.
>
> I think vtkMetaImageReader should read the Offset field.
> vtkMetaImageReader also does not handle some of the mechanisms
> that MetaIO allows for specifying files (ElementDataFile tag
> with patterns).
>
> Jim
>
>
> -----Original Message-----
> From: Frederic Perez [mailto:fredericpcx at yahoo.es]
> Sent: Thursday, November 04, 2004 9:15 AM
> To: insight-users at itk.org; vtkusers at vtk.org
> Subject: [Insight-users] MetaImage 'Offset' (vs 'Position') tag
>
>
>
> Hello insight-users,
>
> I've been succesfully generating and using MetaImage files
> in Insight. At present I am also reading MetaImage files
> using VTK 4.4, with the aid of the vtkMetaImageReader
> class created by Andy Cedilnik (thank you very much).
>
> I have noticed that the origin of the input image (more
> concretely, the origin of the related vtkImageData) is
> set to (0, 0, 0) although the Insight generated files
> specify the origin to be, for example,
> "Offset = -176.5 5.01561 -1539.5" (in the header file).
> This is also the case when reading the Insight generated
> MetaImage files into ParaView. This is annoying for example
> when reading two files corresponding to the right and
> left lungs---they clash even though their respective
> origins differ.
>
> After learning a bit about the MetaImage format
> http://caddlab.rad.unc.edu/software/MetaIO/MetaIO-Introduction.htm
> and browsing the VTK's vtkMetaImageReader.cxx source file
> I have found that Insight uses the tag "Offset" while
> VTK uses the tag "Position" to specify the origin of the
> volume data. Substituting "Offset" by "Position" seems
> to fix the problem, both for the vtkMetaImageReader and
> for ParaView. One can edit the header files manually or
> execute a perl command to get the substitution done, for
> example. However, maybe it would be better to do the
> changes in the Insight code itself since the tag "Offset"
> does not seem to exist (am I wrong?) in
> http://caddlab.rad.unc.edu/software/MetaIO/MetaIO-Introduction.htm
> (maybe that page is not updated?!)
>
> Hope this helps,
>
> Frederic Perez
>
>
>
>
> ______________________________________________
> Renovamos el Correo Yahoo!: !100 MB GRATIS!
> Nuevos servicios, mas seguridad
> http://correo.yahoo.es
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
______________________________________________
Renovamos el Correo Yahoo!: ¡100 MB GRATIS!
Nuevos servicios, más seguridad
http://correo.yahoo.es
More information about the vtkusers
mailing list