[vtkusers] bug with vtkVolume16Reader followed by vtkImageGaussianSmooth

Bill Lorensen wlorens1 at nycap.rr.com
Wed Nov 29 19:28:28 EST 2000


Charles Law at Kitware found the problem and checked in the changes to vtkVolume16Reader.

Bill

At 12:09 PM 11/23/00 +0100, Charl P. Botha wrote:
>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/
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers 






More information about the vtkusers mailing list