[Insight-users] .vtk Output in ITK-3-2 not ParaView readable

Mullick, Rakesh (GE, Research) Rakesh.Mullick at ge.com
Tue May 15 08:28:36 EDT 2007


Hi Luis,

We have been using .vtk extension to write the deformation field and
when we switched from ITK-2-8-1 to ITK-3-2 we notice that
itkVTKImageIO.cxx (Line 480) has changed. The following now appears (in
ITK-3-2) to define the nature of the stored data:

  file << "POINT_DATA " << this->GetImageSizeInPixels() << "\n";
  if( this->GetPixelType() == ImageIOBase::VECTOR )
    {
    file << "VECTORS vectors " 
         << this->GetComponentTypeAsString(m_ComponentType) << "\n";
    file << "LOOKUP_TABLE default\n";
    }
  else
    {
    file << "SCALARS scalars " 
         << this->GetComponentTypeAsString(m_ComponentType) << " "
         << this->GetNumberOfComponents() << "\n";
    file << "LOOKUP_TABLE default\n";
    }

Whereas, in ITK-2-8-1 we only had the option available in the else
clause:

    file << "SCALARS scalars " 
         << this->GetComponentTypeAsString(m_ComponentType) << " "
         << this->GetNumberOfComponents() << "\n";
    file << "LOOKUP_TABLE default\n";

The outcome is that ParaView is unable to correctly read the field now.
Can you please check on it and see how the itkVTK writer is VTK Legacy
compatible. The new code adds the line:

VECTORS vectors float

Instead of 

SCALARS scalar float 3

For a typical deformation field which stores the deformation vector as 3
float scalar components.

Let me know if you need further clarification. 
regards,
rakesh
________________________________________________________________________
__
Rakesh Mullick, Ph.D., Senior Scientist               EMail:
Rakesh.Mullick at ge.com 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070515/bfda39ce/attachment-0001.html


More information about the Insight-users mailing list