[Insight-users] DiscreteGaussianImageFilter

Xavier Kite xkite at caramail.com
Mon May 2 02:51:01 EDT 2005


Hi, 

I want to smooth the images before the registration process but I
've some problem. I try to use the  DiscreteGaussianImageFilter but I don
't see how to find the right parameters for the variance and maximumKerne
lWidth. Could you give me a suggestion?
I've tried several paramaters bu
t as result I've got an image with the good dimension, spacing but with a
 range of intensity 0 to 0. It's problematic....  Is it in relation with 
the choice of the parameters or with my code??  If you want to chek it I 
give you my code in the following lines.


  //-----------------------
-------------------------

  //  DiscreteGaussianImageFilter

  //---
---------------------------------------------

  typedef    short    In
putPixelType;

  

  typedef itk::Image< InputPixelType,  3 >   Input
ImageTypeDiscrete;

  typedef itk::Image< OutputPixelType, 3 >   Output
ImageTypeDiscrete;

  typedef itk::ImageFileReader< InputImageTypeDiscr
ete >  ReaderType;

	

  typedef itk::DiscreteGaussianImageFilter<


                 InputImageTypeDiscrete, OutputImageTypeDiscrete >  Filt
erType;



  FilterType::Pointer filter = FilterType::New();

  Rea
derType::Pointer reader = ReaderType::New();

  reader->SetFileName( ar
gv[2] );  

  filter->SetInput( reader->GetOutput() );

  filter->Set
Variance( ?? );  

  filter->SetMaximumKernelWidth( ?? );  

  filter
->Update();

  

  typedef short WritePixelTypeDiscrete;

  typedef
 itk::Image< WritePixelTypeDiscrete, Dimension > WriteImageTypeDiscrete;


  typedef itk::RescaleIntensityImageFilter< 

               OutputI
mageTypeDiscrete, WriteImageTypeDiscrete > RescaleFilterType;

 Rescale
FilterType::Pointer rescalerDiscrete = RescaleFilterType::New();



 
 rescalerDiscrete->SetOutputMinimum(   0 );

  rescalerDiscrete->SetOut
putMaximum( 255 );



  WriterType::Pointer      writerDiscrete =  Wr
iterType::New();

  writerDiscrete->SetFileName( "DiscreteSmoothedMovin
gImage.mhd" );

  rescalerDiscrete->SetInput( filter->GetOutput() );


  writerDiscrete->SetInput( rescalerDiscrete->GetOutput() );

  writer
Discrete->Update();
-----------

Thanks

   Xavier

Protek-on: CaraM
ail met en oeuvre un nouveau Concept de Sécurité Globale - www.caramail.com


More information about the Insight-users mailing list