[vtkusers] Re: vtkImageData & tensors & filters

Alexandre Guimond guimond at bwh.harvard.edu
Thu Jun 28 12:28:50 EDT 2001


On Thu, 28 Jun 2001 11:39:27 -0400 (EDT)
David Gobbi <dgobbi at irus.rri.ca> writes:

> I'm not 100% certain that >4 scalar components are supported in
> vtkImageData, I've never actually tried!

works fine with at least a few filters and vtkStructurePointsWriter,
but vtkStructuredPointsReader doesn't allow it.  Here is the tiny
patch that fixes it.

Index: vtkDataReader.cxx
===================================================================
RCS file: /vtk/cvsroot/vtk/graphics/vtkDataReader.cxx,v
retrieving revision 1.107
diff -u -r1.107 vtkDataReader.cxx
--- vtkDataReader.cxx	2001/05/31 18:10:50	1.107
+++ vtkDataReader.cxx	2001/06/28 16:24:13
@@ -1151,7 +1151,7 @@
   if (strcmp(this->LowerCase(key), "lookup_table"))
     {
     numComp = atoi(key);
-    if (numComp < 1 || numComp > 4 || !this->ReadString(key))
+    if (numComp < 1 || !this->ReadString(key))
       {
       vtkErrorMacro(<<"Cannot read scalar header!" << " for file: " 
       << this->FileName);

-- 
Alexandre Guimond, Ph.D. guimond at bwh.harvard.edu Phone:(617) 278-0800 
http://spl.bwh.harvard.edu:8000/~guimond/          Fax:(617) 264-5154
Brigham and Women's Hospital, Harvard Medical School
CNI, RF396, 221 Longwood Av, Boston, MA 02115




More information about the vtkusers mailing list