[Insight-users] Problem with BilateralImageFilter

Miller, James V (Research) millerjv at crd.ge.com
Fri Sep 16 11:17:27 EDT 2005


Juan Gabriel, 

The bilateral filter allows to set the radius of the kernel if you so choose.
By default, the kernel size is automatically based on the domain sigmas.  You can 
achieve faster calculations (with less accuracy) if you 

bilateral->AutomaticKernelSizeOff();
bilateral->SetRadius( someKernelSize );

Note that kernel size in this case is specified in pixels.

Jim

-----Original Message-----
From: insight-users-bounces+millerjv=crd.ge.com at itk.org
[mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
Luis Ibanez
Sent: Thursday, September 15, 2005 10:31 PM
To: juanchoramirez at gmail.com
Cc: insight-users at itk.org
Subject: Re: [Insight-users] Problem with BilateralImageFilter



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.
> 


_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list