[Insight-users] Problem with BilateralImageFilter

Luis Ibanez luis.ibanez at kitware.com
Thu Sep 15 22:30:39 EDT 2005


Hi Juan Gabriel,

1) Please make sure that you are compiling your code for "Release".
    There can easily be differences of 10:1 in performance when you
    build in Release versus when you build for Debug.

2) The BilateralImageFilter is computationally expensive
    If what you want is an edge preserving filter, you may have
    a faster option in CurvatureFlow, GradientAnisotropicDiffusion,
    and the MedianFilter, (yes the median filter is equivalent to
    a front propagation filter).

3) Your description of your goal is not quite clear...

    Do you have a 3D image and you only want to filter two of its
    directions ?

    Why do you want to do smoothing in that way ?




   Regards,



      Luis


--------------------------------
Juan Gabriel Ramírez Sosa wrote:
> hello, I am working with the BilateralImageFilter filter to filter an
> image 3d that I require to make a segmentation.  The response time in
> this is too long and I have not completed the filtrate completely... I
> chose to change to the parameters of the dominion sigma in 2
> dimensions but not in the 3 that I need.  The result was an image of
> filtered exit, if you can say to me if I am in the correct thing I
> thank for them.  The following one is the code that I chose to use:
> 
> try{
> this->filter->SetInput(this->pDoc->reader->GetOutput() );
> **********
> I replace the 2 following lines, I included 2 dimensions to be able to
> process the filter.
> 
> these:
> where the image is of 3 dimensions.
> 
> //const unsigned int Dimension = OutputImageType::ImageDimension;
> //double domainSigmas[Dimension];
> 
> by:
> double domainSigmas[2];
> 
> 
> const double rangeSigma = float(this->m_spinransigma.GetPos());
> for(unsigned int i=0; i<2; i++)
> {
> domainSigmas[i] = float(this->m_spindomsigma.GetPos());
> }
> this->filter->SetDomainSigma( domainSigmas );
> this->filter->SetRangeSigma( rangeSigma );
> this->filter->Update();
> rescaler->SetOutputMinimum(   0 );
> rescaler->SetOutputMaximum( 255 );
> this->rescaler->SetInput(filter->GetOutput());
> this->pDoc->connector->SetInput(this->filter->GetOutput()); 
> this->pDoc->connector->Update();
> this->imv->Render();
> }
> catch( itk::ExceptionObject & err )
> {	
> MessageBox(err.what(),"Alerta",MB_ICONERROR);
> return;
> }
> 
> if you can help or advise me to me, of as to filter the image 3d with
> this filter I am thankful to them.
> 




More information about the Insight-users mailing list