[vtkusers] vtkImageLaplacian and vtkImageAppendComponents

Mathieu Malaterre mmalat at imaging.robarts.ca
Sat Jul 20 19:39:32 EDT 2002


Hi Benjamin,
  I don't understand either but try:

...
vtkImageMagnitude mag
 mag SetInput [laplace GetOutput]

vtkImageAppendComponents app
     app AddInput [ellipse GetOutput]
     app AddInput [ellipse GetOutput]
     app AddInput [mag GetOutput] ;# comment that and all is fine
...

you'see that you get your 0.

HTH
mathieu

Benjamin King wrote:

> 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.
>
> _______________________________________________
> 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

--
If all else fail read the instructions
Malaterre, Mathieu
The John P. Robarts Research Institute
Imaging Research Laboratories
http://www.imaging.robarts.ca/~mmalat






More information about the vtkusers mailing list