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> SCALARS<br> 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 "VECTOR" string<br>in the output VTK file, even thought the actual ITK image may have
<br>a pixel type "VECTOR". 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&r1=1.38&r2=1.39">
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkVTKImageIO.cxx?root=Insight&r1=1.38&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&r1=1.40&r2=1.41">
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkVTKImageIO.cxx?root=Insight&r1=1.40&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> Please let us know if you find any other problems.<br><br><br> Thanks<br><br><br> Luis<br>
<br><br>---------------------------------------------------------------------------------<br><div><span class="gmail_quote">On 5/16/07, <b class="gmail_sendername">Luis Ibanez</b> <<a href="mailto:luis.ibanez@kitware.com">
luis.ibanez@kitware.com</a>> 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> 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> 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> We will keep you posted.<br><br><br><br> Luis<br><br><br>---------------------------------------
<br>Mullick, Rakesh (GE, Research) wrote:<br>> Hi Luis,<br>><br>> We have been using .vtk extension to write the deformation field and<br>> when we switched from ITK-2-8-1 to ITK-3-2 we notice that<br>> itkVTKImageIO.cxx
(Line 480) has changed. The following now appears (in<br>> ITK-3-2) to define the nature of the stored data:<br>><br>> file << "POINT_DATA " << this->GetImageSizeInPixels() << "\n";
<br>><br>> if( this->GetPixelType() == ImageIOBase::VECTOR )<br>><br>> {<br>><br>> file << "VECTORS vectors "<br>><br>> << this->GetComponentTypeAsString(m_ComponentType) << "\n";
<br>><br>> file << "LOOKUP_TABLE default\n";<br>><br>> }<br>><br>> else<br>><br>> {<br>><br>> file << "SCALARS scalars "<br>><br>> << this->GetComponentTypeAsString(m_ComponentType) << " "
<br>><br>> << this->GetNumberOfComponents() << "\n";<br>><br>> file << "LOOKUP_TABLE default\n";<br>><br>> }<br>><br>> Whereas, in ITK-2-8-1 we only had the option available in the else clause:
<br>><br>> file << "SCALARS scalars "<br>><br>> << this->GetComponentTypeAsString(m_ComponentType) << " "<br>><br>> << this->GetNumberOfComponents() << "\n";
<br>><br>> file << "LOOKUP_TABLE default\n";<br>><br>> The outcome is that ParaView is unable to***___ correctly_* read the<br>> field now. Can you please check on it and see how the itkVTK writer is
<br>> VTK Legacy compatible. The new code adds the line:<br>><br>> *VECTORS vectors******** float*<br>><br>> Instead of<br>><br>> *SCALARS scalar float 3*<br>><br>> For a typical deformation field which stores the deformation vector as 3
<br>> float scalar components.<br>><br>> Let me know if you need further clarification.<br>><br>> regards,<br>> rakesh<br>> __________________________________________________________________________<br>
> *****Rakesh Mullick*, Ph.D., Senior Scientist***********<br>> ****** EMail*: ___Rakesh.Mullick@ge.com_<br>> <mailto:<a href="mailto:Rakesh.Mullick@ge.com">Rakesh.Mullick@ge.com</a>><br>><br>
><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Insight-users mailing list<br>> <a href="mailto:Insight-users@itk.org">
Insight-users@itk.org</a><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br>