[Insight-users] space and origin in vtk format (itk CVS version) + Volview

Karthik Krishnan Karthik.Krishnan at kitware.com
Thu Mar 16 11:35:13 EST 2006


SCHMID, Jerome wrote:

> Hi,
>
> I've just updated my itk via cvs and run a prgm that generates a .vtk 
> file. This file cannot be read correctly in volview, it complains that 
> spacing and origin are not correct. A simple glance at an old .vtk 
> file and the current one, shows the difference in the writing of 
> floating point numbers:
>
> Old:
>
> # vtk DataFile Version 3.0
> VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)
> BINARY
> DATASET STRUCTURED_POINTS
> DIMENSIONS 199 137 83
> SPACING 0.000639476 0.000639476 0.000639476
> ORIGIN 0 0 0
> POINT_DATA 2262829
> SCALARS scalars unsigned_char 1
> LOOKUP_TABLE default
>
>
> New:
>
> # vtk DataFile Version 3.0
> VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)
> BINARY
> DATASET STRUCTURED_POINTS
> DIMENSIONS 199 137 83
> SPACING 6.3947623129934072e-004 6.3947623129934072e-004 
> 6.3947623129934072e-004
> ORIGIN 0.0000000000000000e+000 0.0000000000000000e+000 
> 0.0000000000000000e+000
> POINT_DATA 2262829
> SCALARS scalars unsigned_char 1
> LOOKUP_TABLE default
>
>
> I suspect that the itk vtk reader and writer may have been updated. I 
> don't care as long as I can read what I wrote. The only pb is with my 
> volview ( which has maybe 10 months now ), that probably uses old 
> reader? Can somebody confirm this and give me a suggestion? (except 
> changing manually the values ^_^)
>
You already know this, nevertheless, to confirm:
VTK updated its spacing/origin representations from float to double a 
while ago.
http://public.kitware.com/cgi-bin/viewcvs.cgi/IO/vtkStructuredPointsWriter.cxx?r1=1.39&r2=1.40
and ITK's vtk writer updated itself to be consistent.

I know that doesn't solve your problem. You could probably just parse 
the text and replace with a tcl script or something.

> Thanks.
>
>
> Best Regards,
>
> Jerome Schmid
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>


More information about the Insight-users mailing list