Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 0e0c1f00 authored by soniayukiselmi's avatar soniayukiselmi
Browse files

NEW Gaussian filter can now use voxel unit, as well as image spacing (default)

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2088 ec899d31-69d1-42ba-9299-647d76f65fb3
parent a0a86d7e
......@@ -61,10 +61,11 @@ GaussianFilter::GaussianFilter(ActionExtension * extension) : Action(extension)
this->addTag("Gaussian");
// Setting parameters default values
Property* varianceProperty = new Property(tr("Variance"), 1.0, tr("The variance is an input parameter of the gaussian kernel. \nThe higher the variance is, the blurer the resulting image will be."), "");
Property* varianceProperty = new Property(tr("Variance"), 1.0, tr("The variance is an input parameter of the gaussian kernel. \nThe higher the variance is, the blurer the resulting image will be."), "Depending on the \"Use Image Spacing\", this value is in image spacing unit (usually mm) or number of pixels.");
varianceProperty->setAttribute("minimum", 0);
varianceProperty->setAttribute("maximum", 100);
varianceProperty->setAttribute("singleStep", 0.05);
varianceProperty->setAttribute("singleStep", 0.001);
varianceProperty->setAttribute("decimals", 3);
addParameter(varianceProperty);
Property* gaussianTypeProperty = new Property(tr("Gaussian Type"), STANDARD, tr("Choose the type of kernel for the gaussian filtering"), "");
......@@ -73,6 +74,10 @@ GaussianFilter::GaussianFilter(ActionExtension * extension) : Action(extension)
gaussianTypeValue << tr("Standard") << tr("Recursive IIR");
gaussianTypeProperty->setAttribute("enumNames", gaussianTypeValue);
addParameter(gaussianTypeProperty);
Property* useImageSpacingProperty = new Property(tr("Use Image Spacing"), true, tr("The variance or standard deviation (sigma) will be evaluated as pixel units if this is off or as physical units if this is on."), "");
addParameter(useImageSpacingProperty);
}
// --------------- destructor -------------------
......@@ -182,6 +187,7 @@ vtkSmartPointer<vtkImageData> GaussianFilter::itkProcessStandardGaussian(vtkSmar
filter->SetInput( castFilter->GetOutput());
filter->AddObserver( itk::ProgressEvent(), observerBlur );
filter->SetVariance( this->variance );
filter->SetUseImageSpacing( property("Use Image Spacing").toBool() );
rescaleFilter->SetInput(filter->GetOutput());
rescaleFilter->AddObserver( itk::ProgressEvent(), observerRescale );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment