<br>Hi Sutrisno,<br><br>This is an understandable confusion.<br><br>The .vtk extension of the legacy VTK file format <br>is used for both files that store images and files<br>that store polydata.<br><br>When you use the .vtk extension for the output<br>
filename of any of the ITK image processing<br>examples, that resulting .vtk file will contain an <br>image, not a polydata.<br><br>That means that if you want to read it back with<br>VTK classes, you should use the vtkImageReader,<br>
and not the vtkPolyDataReader.<br><br>In fact, you may want to use the vtkImageReader2:<br><a href="http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html">http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html</a><br>
<br><br> Regards,<br><br><br> Luis<br><br><br>------------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Apr 13, 2010 at 6:09 AM, SUTRISNO SUTRISNO <span dir="ltr"><<a href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Luis,<br><br><span><span title="saya berusaha untuk mensegmentasi file dicom lalu menyimpannya dalam format vtk.">I tried to segmented DICOM files and save them in vtk format.<br></span><span title="saya menggunakan contoh 1 2 dan 3 untuk membangun program saya.">I used DicomSeriesReadImageWrite2.cxx, DeformableModel1.cxx, DeformableModel2.cxx to build my program.<br>
</span><span title="masalahnya adalah hasilnya tidak sesuai dengan yang saya harapkan.">the problem is the result does not match what I expected.<br></span><span title="ketika saya membuka bone.vtk dengan fileeditor isinya hanya seperti ini:">when I opened bone.vtk (result file) with file editor the content just like this:</span></span> <div>
<br><font size="2"># vtk
DataFile Version 3.0<br>VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)<br>ASCII<br>DATASET STRUCTURED_POINTS<br>DIMENSIONS 124 124 45<br>SPACING 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00<br>
ORIGIN 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00<br>POINT_DATA 691920<br>SCALARS scalars short 1<br>LOOKUP_TABLE default<br>0 0 0 0 0 0 <br>0 0 0 0 0 0 <br>0 0 0 0 0 0 <br>0 0 0 0 0 0 <br>0 0 0 0 0 0 <br>
0 0 0 0 0 0 </font><br>....<br>and when I opened this file with vtk reader (<font size="2">PolyDataReader</font>) there was error :<br><br><font size="2">ERROR: In /build/buildd/vtk-5.0.3/IO/vtkPolyDataReader.cxx, line 142<br>
vtkPolyDataReader (0x8765510): Cannot read dataset type: structured_points</font><br><br><br>This is my source code list :<br><font size="2">/*=========================================================================<br>Name : 3D Segmentation of Bone Structure on CT
Image<br>=========================================================================*/<br>// Include the required header </font><br></div></div></div></blockquote></div>