Bug in vtkImageGaussianSmooth

Bill Lorensen wlorens1 at nycap.rr.com
Tue Sep 28 12:31:43 EDT 1999


<x-flowed>Ron,
         I just tried imaging.examplesTcl/TestGaussianSmooth.tcl. I changed 
the DataSpacing to .8 .8 1.5
and added a vtkStructuredPointsWriter. It correctly wrote the spacing.

What version of vtk are you using?

Bill

At 08:59 PM 9/27/99 +0200, Ron Inbar wrote:
>Hello again!
>
>I think I ran into a bug in vtkImageGaussianSmooth.  It seems to reset my 
>data's spacing to 1 1 1.  Here's the script I run, followed by the header 
>of the output file:
>
>Tcl script:
>-------------------------------------------------------------
>load vtktcl
>
># Read the volume
>vtkVolume16Reader read
>read SetDataDimensions 512 512
>read SetImageRange 1 35
>read SetFilePrefix "raw"
>read SetFilePattern "%s.%03d"
>read SetDataByteOrderToLittleEndian
>read SetDataMask 0x0fff
>read SetDataSpacing 0.84 0.84 8
>
># Smooth
>vtkImageGaussianSmooth smooth
>smooth SetInput [read GetOutput]
>smooth SetDimensionality 3
>smooth SetStandardDeviations 4 4 2
>
># Write subsampled data to file
>vtkStructuredPointsWriter write
>write SetInput [smooth GetOutput]
>write SetFileName "smooth.vtk"
>write SetFileTypeToASCII
>write Write
>-------------------------------------------------------------
>
>Resulting VTK file:
>-------------------------------------------------------------
># vtk DataFile Version 2.0
>vtk output
>ASCII
>DATASET STRUCTURED_POINTS
>DIMENSIONS 512 512 35
>SPACING 1 1 1
>ORIGIN 0 0 0
>POINT_DATA 9175040
>SCALARS scalars unsigned_short 1
>LOOKUP_TABLE default
>-------------------------------------------------------------
>
>Does this problem look familiar to any of you?  Is there a fix?
>
>Thanks in advance,
>
>Ron
>
>P.S.  The man page for vtkImageGaussianSmooth is not very clear.  Is there 
>any difference between SetStandardDeviation and SetStandardDeviations 
>(with an s in the end)?  In what units are the radius factor specified: 
>data units, pixels, voxels, standard deviations or what?  Your input will 
>be appreciated.
>




-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------


</x-flowed>



More information about the vtkusers mailing list