[Insight-users] Gausian filter example

Luis Ibanez luis . ibanez at kitware . com
Mon, 12 Aug 2002 10:30:31 -0400


Hi Zein,

Most of the writing related code was commented out in this example.

If you uncommented this code the following lines should be added
to the constructor too:

#include <itkMetaImageIO.h>

after line: 120 (e.g. the New() instantiations for the Writers)

   m_Writer_Gradient_Modulus->SetImageIO( itk::MetaImageIO::New() );
   m_Writer_Gradient_X->SetImageIO( itk::MetaImageIO::New() );
   m_Writer_Gradient_Y->SetImageIO( itk::MetaImageIO::New() );
   m_Writer_Gradient_Z->SetImageIO( itk::MetaImageIO::New() );
   m_Writer_Laplacian->SetImageIO(  itk::MetaImageIO::New() );

Please note that this example uses an internal pixel type of "float"
and there is not scaling or casting for writing. That makes that
the resulting images will be in "float" format. This is good because
the information is preserved on the file, in particular the sign
for the gradients and the actual dynamic range for the pixel which
could be [-1:1]. This saved images will not be good candidate to
be "reloaded" into the GaussianFilter program since it is expecting
"unsigned char" images.

You may view the resulting imags using the "MetaImageViewer"
added recently to:

    Insight/Examples/MetaImageViewer

When you execute this program it will ask you for the name of a
MetaImage file, then it will open the file and display the first
slice on an fltk window.  Clicking on the "h" key will popup a
window with help instructions.


Please let us know if you encounter any further problems.

   Thanks

    Luis


=========================================


Zein Salah wrote:
> Hello friends,
> 
> I am trying to run the Gausian filter example. I runs correctly. But It 
> can not save result files to disk. It always terminates abnormally.
> 
> Do anybody has an idea where the problem could be.
> 
>  
> 
> Thanks for any help!
> 
>  
> 
> Zein
> 
>  
> 
>  
> 
> ->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
> Zein I. Salah
> Universität Tübingen, WSI-GRIS
> Sand 14
> 72076 Tübingen
> Email: salah@gris.uni-tuebingen.de <mailto:salah@gris.uni-tuebingen.de>  
> / zeinsalah@hotmail.com <mailto:zeinsalah@hotmail.com>
> Tel.: (07071) 29 75465 (GRIS) , (07071) 96 44 39 (privat)
>