[vtkusers] bug with vtkVolume16Reader followed by vtkImageGaussianSmooth
Charl P. Botha
c.p.botha at its.tudelft.nl
Thu Nov 23 06:09:27 EST 2000
Dear VTK-ers,
I have independently ran into the bug documented in:
http://public.kitware.com/pipermail/vtkusers/1999-September/002279.html
At that stage, the VTK-experts were not able to duplicate the behaviour, but
I plan to remedy that. :)
It turns out that when a vtkImageGaussianSmooth follows a vtkVolume16Reader
in a pipeline, the DataSpacing set on the vtkVolume16Reader is NOT honoured!
I have attached a sample (reworked from the abovementioned archive mail)
that you should be able to run on any VTK installation. Please copy this
into vtk/imaging/examplesTcl in your tree and run.
In the output file "smooth.vtk" you'll notice that the "SPACING" is reset to
[1 1 1], whereas it SHOULD be [0.84 0.84 8]. However, if you uncomment the
line just below "reader SetDataSpacing 0.84 0.84 8", the spacing is
honoured. This is only a possible workaround for this bug, but it shouldn't
be necessary!
I have confirmed this with both vtk312 release as well as a CVS checkout of
23.11.2000. I have scratched around in the code myself, and it seems that
the "output->SetSpacing()" call on line 230 of vtkVolume16Reader.cxx (in
vtkVolume16Reader::Execute()) might be too late... I do not know the innards
of VTK well enough yet to make a correct fix myself.
Further information: It also turns out that if you REUSE the pipeline, i.e.
update() on the last component, then e.g. modify() one of the components and
update() again, the SPACING _is_ honoured! This correlates with my feeling
that the output->SetSpacing() call in vtkVolume16Reader is simply in the
wrong place.
If I can supply any more information, I will be glad to do so.
Best regards (and thanks for a FANTASTIC tool),
Charl
--
charl p. botha | computer graphics and cad/cam
http://cpbotha.net/ | http://www.cg.its.tudelft.nl/
More information about the vtkusers
mailing list