[Insight-users] 3D Gaussian blurring

Joshua Cates cates at sci.utah.edu
Wed, 21 Apr 2004 09:32:46 -0600 (MDT)


Hi,

You can either use the itkCastImageFilter to convert unsigned chars to
floats or let the image reader do it for you (instantiate ImageFileReader
using an image type of floats or doubles).

You will have to decide what is appropriate for your particular
application if converting back to unsigned chars.  If you intend to do
further image processing on the image, you will probably want to leave the
data as floating point.

For display of the image, one option is to use the=20
itkRescaleIntensityImageFilter to rescale to a range of 0-255.  See the=20
Insight/Examples/Filtering/DiscreteGaussianImageFilter.cxx file for=20
details.

Josh.

______________________________
 Josh Cates=09=09=09
 Scientific Computing and Imaging Institute
 University of Utah
 (801) 587-7697
 http://www.sci.utah.edu/~cates


On Wed, 21 Apr 2004, Robert Maroon wrote:

> Hi all,
>  I am currently trying to write an application which takes as input a
> raw volume (via a metafile header) and runs a gaussian smoothing filter
> on the data. I am trying to use the DiscreteGaussianImageFilter but I'm
> having problems since the data I am trying to input is made up of
> unsigned chars. When I pass it to the filter I get back a volume of all
> NANs.
>  Any ideas on how I can fix this? I know the Gaussian filter expects to
> receive and return floating point values, so is there any way of safely
> converting my unsigned char volume into floating point, do the blurring
> and then convert it back or should I use another method? By the way I
> have set the dimensionality of the image to 3.
> =20
> I have also tried to use the Gaussian filter example in Insight-Applicati=
ons but the 3D version returns everything but the smooth version of the ima=
ge which is what I need.
> =20
> Thanks!
>=20
> =09=09
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25=A2