[vtkusers] vtkImageLaplacian and vtkImageAppendComponents
Benjamin King
benjaminking at web.de
Sat Jul 20 16:01:15 EDT 2002
Hi all,
I experienced a strange behavior of the two classes in the subject when
I wanted to derive some simple statistics with a 2D-histogram.
When I run the following code:
------
package require vtk
vtkImageEllipsoidSource ellipse
ellipse SetOutputScalarTypeToFloat
ellipse SetWholeExtent 0 127 0 127 0 127
ellipse SetCenter 64 64 64
ellipse SetRadius 60 60 60
ellipse SetInValue 255 ;# Using this, the values aren't 0
#ellipse SetInValue 256 ;# Using this, the values aren't equal
ellipse SetOutValue 0
vtkImageLaplacian laplace
laplace SetDimensionality 3
laplace SetInput [ellipse GetOutput]
vtkImageAppendComponents app
app AddInput [ellipse GetOutput]
app AddInput [ellipse GetOutput]
app AddInput [laplace GetOutput] ;# comment that and all is fine
vtkImageAccumulate accu
accu SetInput [app GetOutput]
accu Update
puts "The first two of the following values should be equal and 0"
puts "[accu GetMin]"
------
I get the outputs "-1275 -1275 0" (using InValue 255) and "-1280 0 0"
(using InValue 256).
Similar things happen, when I use non-generic data. The minimum value
for the image that is fed to the laplacian filter is allways wrong.
It doesn't happen when I use vtkImageGradientMagnitude instead of
vtkImageLaplacian.
cu
Benjamin
--
There are only 10 types of people in this world:
Those who understand binary, and those who don't.
More information about the vtkusers
mailing list