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 bd6301d2 authored by saubatn's avatar saubatn
Browse files

BUG FRAME IMAGE PROCESSING

UPDATED Actions take into account the default frame policy when creating a new component.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2143 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 4a021a91
......@@ -121,7 +121,11 @@ void AnisotropicDiffusion::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_anisoDiff";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -102,7 +102,11 @@ void CannyEdgeDetection::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_edges";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -82,7 +82,11 @@ void ConnectedComponents::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_cc";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -116,7 +116,11 @@ void Derivative::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_processed";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -109,7 +109,11 @@ void GaussianFilter::process(ImageComponent * comp) {
QString newName;
QTextStream(&newName) << comp->getName() << "_gaussian";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -71,7 +71,12 @@ void GradientMagnitude::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_gradient";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -95,7 +95,12 @@ void GradientMagnitudeRecursiveGaussian::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_smoothedGradient";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -89,7 +89,12 @@ void Laplacian::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_laplacian";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -93,7 +93,12 @@ void LaplacianRecursiveGaussian::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_LoG";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -75,7 +75,12 @@ void LaplacianSharpening::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_sharpened";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -111,7 +111,12 @@ void MeanFilter::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_mean";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -112,7 +112,12 @@ void MedianFilter::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_median";
new ImageComponent(outputImage, newName);
ImageComponent *outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -113,7 +113,12 @@ void MorphologicalOperators::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << suffix;
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -82,7 +82,12 @@ void SobelEdgeDetection::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_edges";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -97,7 +97,12 @@ void ManualThreshold::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_threshold";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -259,7 +259,12 @@ void OtsuFilter::process(ImageComponent * comp) {
QString newName;
QTextStream(&newName) << comp->getName() << "_otsu";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -140,7 +140,12 @@ void RegionGrowing::process(ImageComponent * comp) {
vtkSmartPointer<vtkImageData> outputImage = implementProcess (inputImage);
QString newName;
QTextStream(&newName) << comp->getName() << "_segmented";
new ImageComponent(outputImage, newName);
ImageComponent* outputComp = new ImageComponent(outputImage, newName);
// consider frame policy on new image created
Action::applyTargetPosition(comp, outputComp);
Application::refresh();
}
......
......@@ -41,7 +41,6 @@ RegionGrowingWidget::RegionGrowingWidget(Action * action)
QObject::connect(ui.applyButton, SIGNAL(clicked()), myAction, SLOT(apply()));
}
RegionGrowingWidget::~RegionGrowingWidget() {
......
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