[vtkusers] Noisy errors from vtkMINCImageReader when optional dimension attributes are missing

Elvis Stansvik elvis.stansvik at orexplore.com
Wed Feb 24 07:41:59 EST 2016


Hi all,

In reading a MINC (1.0) image, I get errors printed:

ERROR: In
/build/vtk6-GxcjsY/vtk6-6.2.0+dfsg1/IO/MINC/vtkMINCImageAttributes.cxx,
line 760
vtkMINCImageAttributes (0x1e5c010): The attribute zspace:step was not found.

ERROR: In
/build/vtk6-GxcjsY/vtk6-6.2.0+dfsg1/IO/MINC/vtkMINCImageAttributes.cxx,
line 760
vtkMINCImageAttributes (0x1e5c010): The attribute zspace:start was not
found.

ERROR: In
/build/vtk6-GxcjsY/vtk6-6.2.0+dfsg1/IO/MINC/vtkMINCImageAttributes.cxx,
line 760
vtkMINCImageAttributes (0x1e5c010): The attribute yspace:step was not found.

ERROR: In
/build/vtk6-GxcjsY/vtk6-6.2.0+dfsg1/IO/MINC/vtkMINCImageAttributes.cxx,
line 760
vtkMINCImageAttributes (0x1e5c010): The attribute yspace:start was not
found.

ERROR: In
/build/vtk6-GxcjsY/vtk6-6.2.0+dfsg1/IO/MINC/vtkMINCImageAttributes.cxx,
line 760
vtkMINCImageAttributes (0x1e5c010): The attribute xspace:step was not found.

ERROR: In
/build/vtk6-GxcjsY/vtk6-6.2.0+dfsg1/IO/MINC/vtkMINCImageAttributes.cxx,
line 760
vtkMINCImageAttributes (0x1e5c010): The attribute xspace:start was not
found.

But these attributes are optional (and the reader correctly assumes 0 for
the start attributes, and 1.0 for the step attributes). But it seems the
function

    vtkMINCImageAttributes::GetAttributeValueAsDouble

(which is used by the reader) unconditionally prints an error with
vtkErrorMacro if the requested attribute does not exist :/

Is there any way (from Python, VTK 6.2) that I can selectively suppress
this somehow? I'd rather not have stuff printed on stderr for things that
are harmless.

Cheers,
Elvis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160224/98e37778/attachment.html>


More information about the vtkusers mailing list