Hi Rakesh,<br><br>It seems that we just found the source of the problem that you reported.<br><br>Since the vector field is stored as a DATASET STRUCTURED_POINTS the<br>vtkDataReader delegates the read tot he vtkStructuredPointsReader.
<br><br><br>This reader expects the header to contain only one of the two following<br>combinations:<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SCALARS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR_SCALARS<br><br><br>The option of VECTORS is not available in the vtkStructuredPointReader.
<br><br>It is available, however, in the generic vtkDataReader.<br><br><br>Therefore, there is no point in having ITK write the &quot;VECTOR&quot; string<br>in the output VTK file, even thought the actual ITK image may have
<br>a pixel type &quot;VECTOR&quot;.&nbsp; We have therefore reverted the change of<br><br>itkVTKImageIO.cxx version 1.39 to 1.38:<br><a href="http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkVTKImageIO.cxx?root=Insight&amp;r1=1.38&amp;r2=1.39">
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkVTKImageIO.cxx?root=Insight&amp;r1=1.38&amp;r2=1.39</a><br><br><br>The change that we just applied is:<br><a href="http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkVTKImageIO.cxx?root=Insight&amp;r1=1.40&amp;r2=1.41">
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkVTKImageIO.cxx?root=Insight&amp;r1=1.40&amp;r2=1.41</a><br><br><br>We also verified that after applying this change, the VTK datasets <br>created from ITK can be loaded into ParaView.
<br><br>You may have to update your CVS checkout of ITK in order<br>to obtain this modification.<br><br><br>&nbsp;Please let us know if you find any other problems.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<br>
<br><br>---------------------------------------------------------------------------------<br><div><span class="gmail_quote">On 5/16/07, <b class="gmail_sendername">Luis Ibanez</b> &lt;<a href="mailto:luis.ibanez@kitware.com">
luis.ibanez@kitware.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi Rakesh,<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for pointing this out.
<br><br><br>We managed to replicate the problem that you reported,<br>and we are tracking down the origin.<br><br><br>In principle, the tag<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VECTORS vectors float<br><br>in the legacy VTK file is a valid description of the data.
<br><br><br><br>We are suspecting that something downstream of the file<br>is the actual reason for the problem.<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;We will keep you posted.<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<br><br><br>---------------------------------------
<br>Mullick, Rakesh (GE, Research) wrote:<br>&gt; Hi Luis,<br>&gt;<br>&gt; We have been using .vtk extension to write the deformation field and<br>&gt; when we switched from ITK-2-8-1 to ITK-3-2 we notice that<br>&gt; itkVTKImageIO.cxx
 (Line 480) has changed. The following now appears (in<br>&gt; ITK-3-2) to define the nature of the stored data:<br>&gt;<br>&gt;&nbsp;&nbsp; file &lt;&lt; &quot;POINT_DATA &quot; &lt;&lt; this-&gt;GetImageSizeInPixels() &lt;&lt; &quot;\n&quot;;
<br>&gt;<br>&gt;&nbsp;&nbsp; if( this-&gt;GetPixelType() == ImageIOBase::VECTOR )<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; file &lt;&lt; &quot;VECTORS vectors &quot;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt; this-&gt;GetComponentTypeAsString(m_ComponentType) &lt;&lt; &quot;\n&quot;;
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; file &lt;&lt; &quot;LOOKUP_TABLE default\n&quot;;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp; else<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; file &lt;&lt; &quot;SCALARS scalars &quot;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt; this-&gt;GetComponentTypeAsString(m_ComponentType) &lt;&lt; &quot; &quot;
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt; this-&gt;GetNumberOfComponents() &lt;&lt; &quot;\n&quot;;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; file &lt;&lt; &quot;LOOKUP_TABLE default\n&quot;;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt; Whereas, in ITK-2-8-1 we only had the option available in the else clause:
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; file &lt;&lt; &quot;SCALARS scalars &quot;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt; this-&gt;GetComponentTypeAsString(m_ComponentType) &lt;&lt; &quot; &quot;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt; this-&gt;GetNumberOfComponents() &lt;&lt; &quot;\n&quot;;
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; file &lt;&lt; &quot;LOOKUP_TABLE default\n&quot;;<br>&gt;<br>&gt; The outcome is that ParaView is unable to***___ correctly_* read the<br>&gt; field now. Can you please check on it and see how the itkVTK writer is
<br>&gt; VTK Legacy compatible. The new code adds the line:<br>&gt;<br>&gt; *VECTORS vectors******** float*<br>&gt;<br>&gt; Instead of<br>&gt;<br>&gt; *SCALARS scalar float 3*<br>&gt;<br>&gt; For a typical deformation field which stores the deformation vector as 3
<br>&gt; float scalar components.<br>&gt;<br>&gt; Let me know if you need further clarification.<br>&gt;<br>&gt; regards,<br>&gt; rakesh<br>&gt; __________________________________________________________________________<br>
&gt; *****Rakesh Mullick*, Ph.D., Senior Scientist***********<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;****** EMail*: ___Rakesh.Mullick@ge.com_<br>&gt; &lt;mailto:<a href="mailto:Rakesh.Mullick@ge.com">Rakesh.Mullick@ge.com</a>&gt;<br>&gt;<br>
&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Insight-users mailing list<br>&gt; <a href="mailto:Insight-users@itk.org">
Insight-users@itk.org</a><br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br>