Commit 53313745 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED spelling error in name

parent 970469ef
......@@ -43,9 +43,9 @@ using namespace camitk;
// --------------- constructor -------------------
SobelEdgeDetection::SobelEdgeDetection(ActionExtension* extension) : Action(extension) {
// Setting name, description and input component
setName("Sobel Edge Detecton");
setName("Sobel Edge Detection");
setDescription("<br>A 2D or 3D <b>edge detection using the Sobel operator</b>.<br> \
This filter uses the Sobel operator to calculate the image gradient and then finds the magnitude of this gradient vector. The Sobel gradient magnitude (square-root sum of squares) is an indication of edge strength..<br>");
This filter uses the Sobel operator to calculate the image gradient and then finds the magnitude of this gradient vector. The Sobel gradient magnitude (square-root sum of squares) is an indication of edge strength..<br>");
setComponent("ImageComponent");
// Setting classification family and tags
......@@ -64,8 +64,8 @@ SobelEdgeDetection::~SobelEdgeDetection() {
// --------------- apply -------------------
Action::ApplyStatus SobelEdgeDetection::apply() {
foreach (Component * comp, getTargets()) {
ImageComponent* input = dynamic_cast<ImageComponent*> ( comp );
foreach (Component* comp, getTargets()) {
ImageComponent* input = dynamic_cast<ImageComponent*>(comp);
process(input);
}
return SUCCESS;
......@@ -75,7 +75,7 @@ void SobelEdgeDetection::process(ImageComponent* comp) {
this->keepOrgVoxelType = property("Keep original voxel type?").toBool();
// ITK filter implementation using templates
vtkSmartPointer<vtkImageData> inputImage = comp->getImageData();
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
vtkSmartPointer<vtkImageData> outputImage = implementProcess(inputImage);
ImageComponent* outputComp = new ImageComponent(outputImage, comp->getName() + "_edges");
// consider frame policy on new image created
......@@ -134,14 +134,14 @@ vtkSmartPointer<vtkImageData> SobelEdgeDetection::itkProcess(vtkSmartPointer<vtk
// From original type to double type
castFilterIn->SetInput(vtkToItkFilter->GetOutput());
castFilterIn->AddObserver(itk::ProgressEvent(), observer );
castFilterIn->AddObserver(itk::ProgressEvent(), observer);
castFilterIn->Update();
observer->Reset();
// Apply Sobel Edge Detection Filter
sobelFilter->SetInput(castFilterIn->GetOutput());
sobelFilter->AddObserver(itk::ProgressEvent(), observer );
sobelFilter->AddObserver(itk::ProgressEvent(), observer);
sobelFilter->Update();
observer->Reset();
......@@ -152,7 +152,7 @@ vtkSmartPointer<vtkImageData> SobelEdgeDetection::itkProcess(vtkSmartPointer<vtk
castFilterOut->Update();
observer->Reset();
itkToVtkFilter2->SetInput(castFilterOut->GetOutput());
itkToVtkFilter2->AddObserver(itk::ProgressEvent(), observer );
itkToVtkFilter2->AddObserver(itk::ProgressEvent(), observer);
// --------------------- Actually execute all filters parts --------------------
itkToVtkFilter2->Update();
observer->Reset();
......@@ -162,7 +162,7 @@ vtkSmartPointer<vtkImageData> SobelEdgeDetection::itkProcess(vtkSmartPointer<vtk
else {
// From ITK to VTK
itkToVtkFilter->SetInput(sobelFilter->GetOutput());
itkToVtkFilter->AddObserver(itk::ProgressEvent(), observer );
itkToVtkFilter->AddObserver(itk::ProgressEvent(), observer);
// --------------------- Actually execute all filters parts --------------------
itkToVtkFilter->Update();
observer->Reset();
......
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