diff --git a/Plugins/org.mitk.gui.qt.imagecropper/files.cmake b/Plugins/org.mitk.gui.qt.imagecropper/files.cmake
index 39181649cf..59435c5859 100644
--- a/Plugins/org.mitk.gui.qt.imagecropper/files.cmake
+++ b/Plugins/org.mitk.gui.qt.imagecropper/files.cmake
@@ -1,36 +1,32 @@
-set(SRC_CPP_FILES
-
-)
-
set(INTERNAL_CPP_FILES
mitkPluginActivator.cpp
- QmitkImageCropper.cpp
+ QmitkImageCropperView.cpp
)
set(UI_FILES
src/internal/QmitkImageCropperViewControls.ui
)
set(MOC_H_FILES
src/internal/mitkPluginActivator.h
- src/internal/QmitkImageCropper.h
+ src/internal/QmitkImageCropperView.h
)
set(CACHED_RESOURCE_FILES
resources/crop.svg
plugin.xml
)
set(QRC_FILES
resources/imagecropper.qrc
)
set(CPP_FILES)
foreach(file ${SRC_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/${file})
endforeach(file ${SRC_CPP_FILES})
foreach(file ${INTERNAL_CPP_FILES})
set(CPP_FILES ${CPP_FILES} src/internal/${file})
endforeach(file ${INTERNAL_CPP_FILES})
diff --git a/Plugins/org.mitk.gui.qt.imagecropper/plugin.xml b/Plugins/org.mitk.gui.qt.imagecropper/plugin.xml
index 7b2df1f616..ccc04b49d1 100644
--- a/Plugins/org.mitk.gui.qt.imagecropper/plugin.xml
+++ b/Plugins/org.mitk.gui.qt.imagecropper/plugin.xml
@@ -1,27 +1,27 @@
+ class="QmitkImageCropperView" >
Crop images to a given size
diff --git a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropper.cpp b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropperView.cpp
similarity index 93%
rename from Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropper.cpp
rename to Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropperView.cpp
index ba0e0e1ddb..22e9fb3954 100644
--- a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropper.cpp
+++ b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropperView.cpp
@@ -1,484 +1,484 @@
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
-#include "QmitkImageCropper.h"
+#include "QmitkImageCropperView.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
-const std::string QmitkImageCropper::VIEW_ID = "org.mitk.views.qmitkimagecropper";
+const std::string QmitkImageCropperView::VIEW_ID = "org.mitk.views.qmitkimagecropper";
-QmitkImageCropper::QmitkImageCropper(QObject *)
+QmitkImageCropperView::QmitkImageCropperView(QObject *)
: m_ParentWidget(nullptr)
, m_BoundingShapeInteractor(nullptr)
, m_CropOutsideValue(0)
{
CreateBoundingShapeInteractor(false);
}
-QmitkImageCropper::~QmitkImageCropper()
+QmitkImageCropperView::~QmitkImageCropperView()
{
//disable interactor
if (m_BoundingShapeInteractor != nullptr)
{
m_BoundingShapeInteractor->SetDataNode(nullptr);
m_BoundingShapeInteractor->EnableInteraction(false);
}
}
-void QmitkImageCropper::CreateQtPartControl(QWidget *parent)
+void QmitkImageCropperView::CreateQtPartControl(QWidget *parent)
{
// create GUI widgets from the Qt Designer's .ui file
m_Controls.setupUi(parent);
m_Controls.imageSelectionWidget->SetDataStorage(GetDataStorage());
m_Controls.imageSelectionWidget->SetNodePredicate(mitk::NodePredicateNot::New(mitk::NodePredicateProperty::New("helper object")));
m_Controls.imageSelectionWidget->SetSelectionIsOptional(true);
m_Controls.imageSelectionWidget->SetEmptyInfo(QString("Please select an image node"));
m_Controls.imageSelectionWidget->SetPopUpTitel(QString("Select image node"));
connect(m_Controls.imageSelectionWidget, &QmitkSingleNodeSelectionWidget::CurrentSelectionChanged,
- this, &QmitkImageCropper::OnImageSelectionChanged);
+ this, &QmitkImageCropperView::OnImageSelectionChanged);
m_Controls.boundingBoxSelectionWidget->SetDataStorage(GetDataStorage());
m_Controls.boundingBoxSelectionWidget->SetNodePredicate(mitk::NodePredicateAnd::New(
mitk::TNodePredicateDataType::New(),
mitk::NodePredicateNot::New(mitk::NodePredicateProperty::New("helper object"))));
m_Controls.boundingBoxSelectionWidget->SetSelectionIsOptional(true);
m_Controls.boundingBoxSelectionWidget->SetEmptyInfo(QString("Please select a bounding box"));
m_Controls.boundingBoxSelectionWidget->SetPopUpTitel(QString("Select bounding box node"));
connect(m_Controls.boundingBoxSelectionWidget, &QmitkSingleNodeSelectionWidget::CurrentSelectionChanged,
- this, &QmitkImageCropper::OnBoundingBoxSelectionChanged);
+ this, &QmitkImageCropperView::OnBoundingBoxSelectionChanged);
connect(m_Controls.buttonCreateNewBoundingBox, SIGNAL(clicked()), this, SLOT(OnCreateNewBoundingBox()));
connect(m_Controls.buttonCropping, SIGNAL(clicked()), this, SLOT(OnCropping()));
connect(m_Controls.buttonMasking, SIGNAL(clicked()), this, SLOT(OnMasking()));
auto lambda = [this]()
{
m_Controls.groupImageSettings->setVisible(!m_Controls.groupImageSettings->isVisible());
};
connect(m_Controls.buttonAdvancedSettings, &ctkExpandButton::clicked, this, lambda);
connect(m_Controls.spinBoxOutsidePixelValue, SIGNAL(valueChanged(int)), this, SLOT(OnSliderValueChanged(int)));
SetDefaultGUI();
m_ParentWidget = parent;
}
-void QmitkImageCropper::OnImageSelectionChanged(QList)
+void QmitkImageCropperView::OnImageSelectionChanged(QList)
{
bool rotationEnabled = false;
auto imageNode = m_Controls.imageSelectionWidget->GetSelectedNode();
if (imageNode.IsNull())
{
SetDefaultGUI();
return;
}
auto image = dynamic_cast(imageNode->GetData());
if (nullptr != image)
{
if (image->GetDimension() < 3)
{
QMessageBox::warning(nullptr,
tr("Invalid image selected"),
tr("ImageCropper only works with 3 or more dimensions."),
QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
SetDefaultGUI();
return;
}
m_ParentWidget->setEnabled(true);
m_Controls.buttonCreateNewBoundingBox->setEnabled(true);
vtkSmartPointer imageMat = image->GetGeometry()->GetVtkMatrix();
// check whether the image geometry is rotated; if so, no pixel aligned cropping or masking can be performed
if ((imageMat->GetElement(1, 0) == 0.0) && (imageMat->GetElement(0, 1) == 0.0) &&
(imageMat->GetElement(1, 2) == 0.0) && (imageMat->GetElement(2, 1) == 0.0) &&
(imageMat->GetElement(2, 0) == 0.0) && (imageMat->GetElement(0, 2) == 0.0))
{
rotationEnabled = false;
m_Controls.labelWarningRotation->setVisible(false);
}
else
{
rotationEnabled = true;
m_Controls.labelWarningRotation->setStyleSheet(" QLabel { color: rgb(255, 0, 0) }");
m_Controls.labelWarningRotation->setVisible(true);
}
this->CreateBoundingShapeInteractor(rotationEnabled);
if (itk::ImageIOBase::SCALAR == image->GetPixelType().GetPixelType())
{
// Might be changed with the upcoming new image statistics plugin
//(recomputation might be very expensive for large images ;) )
auto statistics = image->GetStatistics();
auto minPixelValue = statistics->GetScalarValueMin();
auto maxPixelValue = statistics->GetScalarValueMax();
if (minPixelValue < std::numeric_limits::min())
{
minPixelValue = std::numeric_limits::min();
}
if (maxPixelValue > std::numeric_limits::max())
{
maxPixelValue = std::numeric_limits::max();
}
m_Controls.spinBoxOutsidePixelValue->setEnabled(true);
m_Controls.spinBoxOutsidePixelValue->setMaximum(static_cast(maxPixelValue));
m_Controls.spinBoxOutsidePixelValue->setMinimum(static_cast(minPixelValue));
m_Controls.spinBoxOutsidePixelValue->setValue(static_cast(minPixelValue));
}
else
{
m_Controls.spinBoxOutsidePixelValue->setEnabled(false);
}
unsigned int dim = image->GetDimension();
if (dim < 2 || dim > 4)
{
m_ParentWidget->setEnabled(false);
}
if (m_Controls.boundingBoxSelectionWidget->GetSelectedNode().IsNotNull())
{
m_Controls.buttonCropping->setEnabled(true);
m_Controls.buttonMasking->setEnabled(true);
m_Controls.buttonAdvancedSettings->setEnabled(true);
m_Controls.groupImageSettings->setEnabled(true);
}
}
}
-void QmitkImageCropper::OnBoundingBoxSelectionChanged(QList)
+void QmitkImageCropperView::OnBoundingBoxSelectionChanged(QList)
{
auto boundingBoxNode = m_Controls.boundingBoxSelectionWidget->GetSelectedNode();
if (boundingBoxNode.IsNull())
{
SetDefaultGUI();
m_BoundingShapeInteractor->EnableInteraction(false);
m_BoundingShapeInteractor->SetDataNode(nullptr);
if (m_Controls.imageSelectionWidget->GetSelectedNode().IsNotNull())
{
m_Controls.buttonCreateNewBoundingBox->setEnabled(true);
}
return;
}
auto boundingBox = dynamic_cast(boundingBoxNode->GetData());
if (nullptr != boundingBox)
{
// node newly selected
boundingBoxNode->SetVisibility(true);
m_BoundingShapeInteractor->EnableInteraction(true);
m_BoundingShapeInteractor->SetDataNode(boundingBoxNode);
mitk::RenderingManager::GetInstance()->InitializeViews();
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
if (m_Controls.imageSelectionWidget->GetSelectedNode().IsNotNull())
{
m_Controls.buttonCropping->setEnabled(true);
m_Controls.buttonMasking->setEnabled(true);
m_Controls.buttonAdvancedSettings->setEnabled(true);
m_Controls.groupImageSettings->setEnabled(true);
}
}
}
-void QmitkImageCropper::OnCreateNewBoundingBox()
+void QmitkImageCropperView::OnCreateNewBoundingBox()
{
auto imageNode = m_Controls.imageSelectionWidget->GetSelectedNode();
if (imageNode.IsNull())
{
return;
}
QString name = QString::fromStdString(imageNode->GetName() + " Bounding Shape");
auto boundingShape = this->GetDataStorage()->GetNode(mitk::NodePredicateFunction::New([&name](const mitk::DataNode *node)
{
return 0 == node->GetName().compare(name.toStdString());
}));
if (nullptr != boundingShape)
{
name = this->AdaptBoundingObjectName(name);
}
// get current timestep to support 3d+t images
auto renderWindowPart = this->GetRenderWindowPart(mitk::WorkbenchUtil::IRenderWindowPartStrategy::OPEN);
int timeStep = renderWindowPart->GetTimeNavigationController()->GetTime()->GetPos();
auto imageGeometry = static_cast(imageNode->GetData()->GetGeometry(timeStep));
auto boundingBox = mitk::GeometryData::New();
boundingBox->SetGeometry(static_cast(this->InitializeWithImageGeometry(imageGeometry)));
auto boundingBoxNode = mitk::DataNode::New();
boundingBoxNode->SetData(boundingBox);
boundingBoxNode->SetProperty("name", mitk::StringProperty::New(name.toStdString()));
boundingBoxNode->SetProperty("color", mitk::ColorProperty::New(1.0, 1.0, 1.0));
boundingBoxNode->SetProperty("opacity", mitk::FloatProperty::New(0.6));
boundingBoxNode->SetProperty("layer", mitk::IntProperty::New(99));
boundingBoxNode->AddProperty("handle size factor", mitk::DoubleProperty::New(1.0 / 40.0));
boundingBoxNode->SetBoolProperty("pickable", true);
if (!this->GetDataStorage()->Exists(boundingBoxNode))
{
GetDataStorage()->Add(boundingBoxNode, imageNode);
}
m_Controls.boundingBoxSelectionWidget->SetCurrentSelectedNode(boundingBoxNode);
}
-void QmitkImageCropper::OnCropping()
+void QmitkImageCropperView::OnCropping()
{
this->ProcessImage(false);
}
-void QmitkImageCropper::OnMasking()
+void QmitkImageCropperView::OnMasking()
{
this->ProcessImage(true);
}
-void QmitkImageCropper::OnSliderValueChanged(int slidervalue)
+void QmitkImageCropperView::OnSliderValueChanged(int slidervalue)
{
m_CropOutsideValue = slidervalue;
}
-void QmitkImageCropper::CreateBoundingShapeInteractor(bool rotationEnabled)
+void QmitkImageCropperView::CreateBoundingShapeInteractor(bool rotationEnabled)
{
if (m_BoundingShapeInteractor.IsNull())
{
m_BoundingShapeInteractor = mitk::BoundingShapeInteractor::New();
m_BoundingShapeInteractor->LoadStateMachine("BoundingShapeInteraction.xml", us::ModuleRegistry::GetModule("MitkBoundingShape"));
m_BoundingShapeInteractor->SetEventConfig("BoundingShapeMouseConfig.xml", us::ModuleRegistry::GetModule("MitkBoundingShape"));
}
m_BoundingShapeInteractor->SetRotationEnabled(rotationEnabled);
}
-mitk::Geometry3D::Pointer QmitkImageCropper::InitializeWithImageGeometry(mitk::BaseGeometry::Pointer geometry)
+mitk::Geometry3D::Pointer QmitkImageCropperView::InitializeWithImageGeometry(mitk::BaseGeometry::Pointer geometry)
{
// convert a BaseGeometry into a Geometry3D (otherwise IO is not working properly)
if (geometry == nullptr)
mitkThrow() << "Geometry is not valid.";
auto boundingGeometry = mitk::Geometry3D::New();
boundingGeometry->SetBounds(geometry->GetBounds());
boundingGeometry->SetImageGeometry(geometry->GetImageGeometry());
boundingGeometry->SetOrigin(geometry->GetOrigin());
boundingGeometry->SetSpacing(geometry->GetSpacing());
boundingGeometry->SetIndexToWorldTransform(geometry->GetIndexToWorldTransform());
boundingGeometry->Modified();
return boundingGeometry;
}
-void QmitkImageCropper::ProcessImage(bool mask)
+void QmitkImageCropperView::ProcessImage(bool mask)
{
auto renderWindowPart = this->GetRenderWindowPart(mitk::WorkbenchUtil::IRenderWindowPartStrategy::OPEN);
int timeStep = renderWindowPart->GetTimeNavigationController()->GetTime()->GetPos();
auto imageNode = m_Controls.imageSelectionWidget->GetSelectedNode();
if (imageNode.IsNull())
{
QMessageBox::information(nullptr, "Warning", "Please load and select an image before starting image processing.");
return;
}
auto boundingBoxNode = m_Controls.boundingBoxSelectionWidget->GetSelectedNode();
if (boundingBoxNode.IsNull())
{
QMessageBox::information(nullptr, "Warning", "Please load and select a cropping object before starting image processing.");
return;
}
auto image = dynamic_cast(imageNode->GetData());
auto boundingBox = dynamic_cast(boundingBoxNode->GetData());
if (nullptr != image && nullptr != boundingBox)
{
QString imageName;
if (mask)
{
imageName = QString::fromStdString(imageNode->GetName() + "_" + boundingBoxNode->GetName() + "_masked");
}
else
{
imageName = QString::fromStdString(imageNode->GetName() + "_" + boundingBoxNode->GetName() + "_cropped");
}
if (m_Controls.checkBoxCropTimeStepOnly->isChecked())
{
imageName = imageName + "_T" + QString::number(timeStep);
}
// image and bounding shape ok, set as input
auto croppedImageNode = mitk::DataNode::New();
auto cutter = mitk::BoundingShapeCropper::New();
cutter->SetGeometry(boundingBox);
// adjustable in advanced settings
cutter->SetUseWholeInputRegion(mask); //either mask (mask=true) or crop (mask=false)
cutter->SetOutsideValue(m_CropOutsideValue);
cutter->SetUseCropTimeStepOnly(m_Controls.checkBoxCropTimeStepOnly->isChecked());
cutter->SetCurrentTimeStep(timeStep);
// TODO: Add support for MultiLayer (right now only Mulitlabel support)
auto labelsetImageInput = dynamic_cast(image);
if (nullptr != labelsetImageInput)
{
cutter->SetInput(labelsetImageInput);
// do the actual cutting
try
{
cutter->Update();
}
catch (const itk::ExceptionObject& e)
{
std::string message = std::string("The Cropping filter could not process because of: \n ") + e.GetDescription();
QMessageBox::warning(nullptr, tr("Cropping not possible!"), tr(message.c_str()),
QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
return;
}
auto labelSetImage = mitk::LabelSetImage::New();
labelSetImage->InitializeByLabeledImage(cutter->GetOutput());
for (unsigned int i = 0; i < labelsetImageInput->GetNumberOfLayers(); i++)
{
labelSetImage->AddLabelSetToLayer(i, labelsetImageInput->GetLabelSet(i));
}
croppedImageNode->SetData(labelSetImage);
croppedImageNode->SetProperty("name", mitk::StringProperty::New(imageName.toStdString()));
//add cropping result to the current data storage as child node to the image node
if (!m_Controls.checkOverwriteImage->isChecked())
{
if (!this->GetDataStorage()->Exists(croppedImageNode))
{
this->GetDataStorage()->Add(croppedImageNode, imageNode);
}
}
else // original image will be overwritten by the result image and the bounding box of the result is adjusted
{
imageNode->SetData(labelSetImage);
imageNode->Modified();
// Adjust coordinate system by doing a reinit on
auto tempDataStorage = mitk::DataStorage::SetOfObjects::New();
tempDataStorage->InsertElement(0, imageNode);
// initialize the views to the bounding geometry
auto bounds = this->GetDataStorage()->ComputeBoundingGeometry3D(tempDataStorage);
mitk::RenderingManager::GetInstance()->InitializeViews(bounds);
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
}
}
else
{
cutter->SetInput(image);
// do the actual cutting
try
{
cutter->Update();
}
catch (const itk::ExceptionObject& e)
{
std::string message = std::string("The Cropping filter could not process because of: \n ") + e.GetDescription();
QMessageBox::warning(nullptr, tr("Cropping not possible!"), tr(message.c_str()),
QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
return;
}
//add cropping result to the current data storage as child node to the image node
if (!m_Controls.checkOverwriteImage->isChecked())
{
croppedImageNode->SetData(cutter->GetOutput());
croppedImageNode->SetProperty("name", mitk::StringProperty::New(imageName.toStdString()));
croppedImageNode->SetProperty("color", mitk::ColorProperty::New(1.0, 1.0, 1.0));
croppedImageNode->SetProperty("layer", mitk::IntProperty::New(99)); // arbitrary, copied from segmentation functionality
if (!this->GetDataStorage()->Exists(croppedImageNode))
{
this->GetDataStorage()->Add(croppedImageNode, imageNode);
}
}
else // original image will be overwritten by the result image and the bounding box of the result is adjusted
{
imageNode->SetData(cutter->GetOutput());
imageNode->Modified();
// Adjust coordinate system by doing a reinit on
auto tempDataStorage = mitk::DataStorage::SetOfObjects::New();
tempDataStorage->InsertElement(0, imageNode);
// initialize the views to the bounding geometry
auto bounds = this->GetDataStorage()->ComputeBoundingGeometry3D(tempDataStorage);
mitk::RenderingManager::GetInstance()->InitializeViews(bounds);
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
}
}
}
else
{
QMessageBox::information(nullptr, "Warning", "Please load and select an image before starting image processing.");
}
}
-void QmitkImageCropper::SetDefaultGUI()
+void QmitkImageCropperView::SetDefaultGUI()
{
m_Controls.labelWarningRotation->setVisible(false);
m_Controls.buttonCreateNewBoundingBox->setEnabled(false);
m_Controls.buttonCropping->setEnabled(false);
m_Controls.buttonMasking->setEnabled(false);
m_Controls.buttonAdvancedSettings->setEnabled(false);
m_Controls.groupImageSettings->setEnabled(false);
m_Controls.groupImageSettings->setVisible(false);
m_Controls.checkOverwriteImage->setChecked(false);
m_Controls.checkBoxCropTimeStepOnly->setChecked(false);
}
-QString QmitkImageCropper::AdaptBoundingObjectName(const QString& name) const
+QString QmitkImageCropperView::AdaptBoundingObjectName(const QString& name) const
{
unsigned int counter = 2;
QString newName = QString("%1 %2").arg(name).arg(counter);
while (nullptr != this->GetDataStorage()->GetNode(mitk::NodePredicateFunction::New([&newName](const mitk::DataNode *node)
{
return 0 == node->GetName().compare(newName.toStdString());
})))
{
newName = QString("%1 %2").arg(name).arg(++counter);
}
return newName;
}
diff --git a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropper.h b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropperView.h
similarity index 89%
rename from Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropper.h
rename to Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropperView.h
index eab1d39672..7bd77de7de 100644
--- a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropper.h
+++ b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/QmitkImageCropperView.h
@@ -1,90 +1,90 @@
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
-#ifndef QmitkImageCropper_h
-#define QmitkImageCropper_h
+#ifndef QmitkImageCropperView_h
+#define QmitkImageCropperView_h
#include
#include
#include "ui_QmitkImageCropperViewControls.h"
-class QmitkImageCropper : public QmitkAbstractView
+class QmitkImageCropperView : public QmitkAbstractView
{
Q_OBJECT
public:
static const std::string VIEW_ID;
- QmitkImageCropper(QObject *parent = nullptr);
+ QmitkImageCropperView(QObject *parent = nullptr);
- ~QmitkImageCropper() override;
+ ~QmitkImageCropperView() override;
void CreateQtPartControl(QWidget *parent) override;
void SetFocus() override { };
protected Q_SLOTS:
/*!
* @brief Updates current selection of the image to crop
*/
void OnImageSelectionChanged(QList nodes);
/*!
* @brief Updates current selection of the bounding object
*/
void OnBoundingBoxSelectionChanged(QList nodes);
/*!
* @brief Creates a new bounding object
*/
void OnCreateNewBoundingBox();
/*!
* @brief Whenever Crop button is pressed, issue a cropping action
*/
void OnCropping();
/*!
* @brief Whenever Mask button is pressed, issue a masking action
*/
void OnMasking();
/*!
* @brief Sets the scalar value for outside pixels in case of masking
*/
void OnSliderValueChanged(int slidervalue);
private:
void CreateBoundingShapeInteractor(bool rotationEnabled);
// initializes a new bounding shape using the selected image geometry.
mitk::Geometry3D::Pointer InitializeWithImageGeometry(mitk::BaseGeometry::Pointer geometry);
void ProcessImage(bool crop);
void SetDefaultGUI();
QString AdaptBoundingObjectName(const QString& name) const;
QWidget* m_ParentWidget;
// interactor for moving and scaling the cuboid
mitk::BoundingShapeInteractor::Pointer m_BoundingShapeInteractor;
// cropping parameter
mitk::ScalarType m_CropOutsideValue;
Ui::QmitkImageCropperViewControls m_Controls;
};
-#endif // QmitkImageCropper_h
+#endif // QmitkImageCropperView_h
diff --git a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/mitkPluginActivator.cpp
index 61b75cf4c1..0902061f1c 100644
--- a/Plugins/org.mitk.gui.qt.imagecropper/src/internal/mitkPluginActivator.cpp
+++ b/Plugins/org.mitk.gui.qt.imagecropper/src/internal/mitkPluginActivator.cpp
@@ -1,26 +1,26 @@
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
#include
#include "mitkPluginActivator.h"
-#include "QmitkImageCropper.h"
+#include "QmitkImageCropperView.h"
void mitk::mitkPluginActivator::start(ctkPluginContext* context)
{
RegisterBoundingShapeObjectFactory();
- BERRY_REGISTER_EXTENSION_CLASS(QmitkImageCropper, context)
+ BERRY_REGISTER_EXTENSION_CLASS(QmitkImageCropperView, context)
}
void mitk::mitkPluginActivator::stop(ctkPluginContext*)
{
}