[ITK] VTK Deplacement Field Format

Armstrong, Hirotatsu HIROTATSU.ARMSTRONG at UCDENVER.EDU
Fri Sep 12 14:05:52 EDT 2014


Hello,

I am having some trouble understanding the format of a .vtk file.  I am deformably registering 2 CT images and saving the displacement field in a .vtk file.  According to a pdf I found (for VTK v4.2), when written in ASCII format, vector data should have 3 values on each line corresponding to the x,y,z components for each vector.  When I write my .vtk file, I get this,


# vtk DataFile Version 3.0
VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 512 512 88
SPACING 9.7656250000000000e-001 9.7656250000000000e-001 3.0000000000000000e+000
ORIGIN -2.5000000000000000e+002 -1.0900000000000000e+002 -1.5900000000000000e+002
POINT_DATA 23068672
VECTORS vectors float
-0.0644559 -0.0859412 0 0.231144 -0.231144 0
0.242202 -0.201835 0 -0.211765 0 0
0.164835 -0.362637 0 0.159204 -0.437811 0
0.108108 -0.0405405 0 0.395062 -0.0493827 0
-0.0987654 0.00493827 0 0.447702 -0.127915 0
-0.167866 0.167866 0 -0.359551 -0.134831 0
.
.
.


Which is giving 6 values on each line.  I looked for some documentation but couldn't find anything other than the pdf.  Could someone please point me to the latest documentation for the .vtk file format?  Also, I originally wrote the files in binary format, but was having some issue with that as well, which is why I switched to ASCII so I can actually visualize the data.  The documentation is not clear if there are newline characters included or not when binary data is written.  I would assume not, but could this be clarified as well?

Thanks

James Armstrong, Ph.D.
PostDoctoral Fellow, Physics
Department of Radiation Oncology
University of Colorado School of Medicine
1665 Aurora Ct, MS F706
Aurora, CO 80045
720-848-0257

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140912/4f82ca3d/attachment-0002.html>


More information about the Community mailing list