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.