diff --git a/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.cpp b/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.cpp deleted file mode 100644 index 0e5bcfbe90..0000000000 --- a/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/*============================================================================ - -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 "mitkCreateSurfaceTool.h" - -#include "mitkCreateSurfaceTool.xpm" - -#include "mitkProgressBar.h" -#include "mitkShowSegmentationAsSurface.h" -#include "mitkStatusBar.h" -#include "mitkToolManager.h" - -#include "itkCommand.h" - -namespace mitk -{ - MITK_TOOL_MACRO(MITKSEGMENTATION_EXPORT, CreateSurfaceTool, "Surface creation tool"); -} - -mitk::CreateSurfaceTool::CreateSurfaceTool() -{ -} - -mitk::CreateSurfaceTool::~CreateSurfaceTool() -{ -} - -const char **mitk::CreateSurfaceTool::GetXPM() const -{ - return mitkCreateSurfaceTool_xpm; -} - -const char *mitk::CreateSurfaceTool::GetName() const -{ - return "Surface"; -} - -std::string mitk::CreateSurfaceTool::GetErrorMessage() -{ - return "No surfaces created for these segmentations:"; -} - -bool mitk::CreateSurfaceTool::ProcessOneWorkingData(DataNode *node) -{ - if (node) - { - Image::Pointer image = dynamic_cast(node->GetData()); - if (image.IsNull()) - return false; - - try - { - mitk::ShowSegmentationAsSurface::Pointer surfaceFilter = mitk::ShowSegmentationAsSurface::New(); - - // attach observer to get notified about result - itk::SimpleMemberCommand::Pointer goodCommand = - itk::SimpleMemberCommand::New(); - goodCommand->SetCallbackFunction(this, &CreateSurfaceTool::OnSurfaceCalculationDone); - surfaceFilter->AddObserver(mitk::ResultAvailable(), goodCommand); - itk::SimpleMemberCommand::Pointer badCommand = - itk::SimpleMemberCommand::New(); - badCommand->SetCallbackFunction(this, &CreateSurfaceTool::OnSurfaceCalculationDone); - surfaceFilter->AddObserver(mitk::ProcessingError(), badCommand); - - DataNode::Pointer nodepointer = node; - surfaceFilter->SetPointerParameter("Input", image); - surfaceFilter->SetPointerParameter("Group node", nodepointer); - surfaceFilter->SetParameter("Show result", true); - surfaceFilter->SetParameter("Sync visibility", false); - surfaceFilter->SetDataStorage(*this->GetToolManager()->GetDataStorage()); - - ProgressBar::GetInstance()->AddStepsToDo(1); - StatusBar::GetInstance()->DisplayText("Surface creation started in background..."); - surfaceFilter->StartAlgorithm(); - } - catch (...) - { - return false; - } - } - - return true; -} - -void mitk::CreateSurfaceTool::OnSurfaceCalculationDone() -{ - ProgressBar::GetInstance()->Progress(); - this->GetToolManager()->NewNodesGenerated(); -} diff --git a/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.h b/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.h deleted file mode 100644 index ad6f1518af..0000000000 --- a/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.h +++ /dev/null @@ -1,52 +0,0 @@ -/*============================================================================ - -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 mitkCreateSurfaceTool_h_Included -#define mitkCreateSurfaceTool_h_Included - -#include "mitkCommon.h" -#include "mitkSegmentationsProcessingTool.h" -#include - -namespace mitk -{ - /** - \brief Creates surface models from segmentations. - \ingroup ToolManagerEtAl - \sa mitk::Tool - \sa QmitkInteractiveSegmentation - - Last contributor: $Author$ - */ - class MITKSEGMENTATION_EXPORT CreateSurfaceTool : public SegmentationsProcessingTool - { - public: - mitkClassMacro(CreateSurfaceTool, SegmentationsProcessingTool); - itkFactorylessNewMacro(Self); - itkCloneMacro(Self); - - const char **GetXPM() const override; - const char *GetName() const override; - - void OnSurfaceCalculationDone(); - - protected: - bool ProcessOneWorkingData(DataNode *node) override; - std::string GetErrorMessage() override; - - CreateSurfaceTool(); // purposely hidden - ~CreateSurfaceTool() override; - }; - -} // namespace - -#endif diff --git a/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.xpm b/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.xpm deleted file mode 100644 index 176d646b0f..0000000000 --- a/Modules/Segmentation/Interactions/mitkCreateSurfaceTool.xpm +++ /dev/null @@ -1,109 +0,0 @@ -/* XPM */ -static const char * mitkCreateSurfaceTool_xpm[] = { -"18 18 88 1", -" c None", -". c #202020", -"+ c #232323", -"@ c #393939", -"# c #454545", -"$ c #E2E2E2", -"% c #F2F2F2", -"& c #F1F1F1", -"* c #A5A5A5", -"= c #515151", -"- c #4E4E4E", -"; c #C6C6C6", -"> c #FDFDFD", -", c #FCFCFC", -"' c #FBFBFB", -") c #F9F9F9", -"! c #F0F0F0", -"~ c #868686", -"{ c #4B4B4B", -"] c #FAFAFA", -"^ c #F6F6F6", -"/ c #E8E8E8", -"( c #E1E1E1", -"_ c #DEDEDE", -": c #C9C9C9", -"< c #6F6F6F", -"[ c #000000", -"} c #353535", -"| c #BFBFBF", -"1 c #EFEFEF", -"2 c #E5E5E5", -"3 c #D6D6D6", -"4 c #D8D8D8", -"5 c #DBDBDB", -"6 c #B4B4B4", -"7 c #7C7C7C", -"8 c #474747", -"9 c #EAEAEA", -"0 c #E7E7E7", -"a c #E4E4E4", -"b c #CECECE", -"c c #B6B6B6", -"d c #C5C5C5", -"e c #B3B3B3", -"f c #A3A3A3", -"g c #1C1C1C", -"h c #D3D3D3", -"i c #F3F3F3", -"j c #DFDFDF", -"k c #B1B1B1", -"l c #C2C2C2", -"m c #898989", -"n c #212121", -"o c #E9E9E9", -"p c #F7F7F7", -"q c #D1D1D1", -"r c #BABABA", -"s c #E0E0E0", -"t c #8F8F8F", -"u c #E6E6E6", -"v c #EBEBEB", -"w c #BCBCBC", -"x c #979797", -"y c #F8F8F8", -"z c #5E5E5E", -"A c #464646", -"B c #D7D7D7", -"C c #BBBBBB", -"D c #D2D2D2", -"E c #CACACA", -"F c #040404", -"G c #7E7E7E", -"H c #DDDDDD", -"I c #B8B8B8", -"J c #2C2C2C", -"K c #8C8C8C", -"L c #CDCDCD", -"M c #C3C3C3", -"N c #F4F4F4", -"O c #D9D9D9", -"P c #878787", -"Q c #ECECEC", -"R c #C4C4C4", -"S c #8E8E8E", -"T c #686868", -"U c #070707", -"V c #030303", -"W c #0D0D0D", -" ", -" .++. ", -" @#$%&*= ", -" -;%>,')!~ ", -" {;]'%^/(_:<[ ", -" }|]^&12(34567[ ", -" 8^,9&0abc|def[ ", -" gh>%ij/;kkkklbm[ ", -" no'p1jqkkkkkrst[ ", -" .u)]v5wkkkkklux[ ", -" gx^^ybkkkkkk2az ", -" A19vBCkkkkD9EF ", -" GsEHbkkIBv5J ", -" KLw6eMaNOg ", -" [P*EBQjRJ ", -" [[mS*TU ", -" [VW ", -" "}; diff --git a/Modules/Segmentation/files.cmake b/Modules/Segmentation/files.cmake index 949590d808..93b40ede21 100644 --- a/Modules/Segmentation/files.cmake +++ b/Modules/Segmentation/files.cmake @@ -1,109 +1,108 @@ set(CPP_FILES Algorithms/mitkCalculateSegmentationVolume.cpp Algorithms/mitkContourModelSetToImageFilter.cpp Algorithms/mitkContourSetToPointSetFilter.cpp Algorithms/mitkContourUtils.cpp Algorithms/mitkCorrectorAlgorithm.cpp Algorithms/mitkDiffImageApplier.cpp Algorithms/mitkDiffSliceOperation.cpp Algorithms/mitkDiffSliceOperationApplier.cpp Algorithms/mitkFeatureBasedEdgeDetectionFilter.cpp Algorithms/mitkImageLiveWireContourModelFilter.cpp Algorithms/mitkImageToContourFilter.cpp #Algorithms/mitkImageToContourModelFilter.cpp Algorithms/mitkImageToLiveWireContourFilter.cpp Algorithms/mitkManualSegmentationToSurfaceFilter.cpp Algorithms/mitkOtsuSegmentationFilter.cpp Algorithms/mitkSegmentationHelper.cpp Algorithms/mitkSegmentationObjectFactory.cpp Algorithms/mitkShapeBasedInterpolationAlgorithm.cpp Algorithms/mitkShowSegmentationAsSmoothedSurface.cpp Algorithms/mitkShowSegmentationAsSurface.cpp Algorithms/mitkVtkImageOverwrite.cpp Controllers/mitkSegmentationInterpolationController.cpp Controllers/mitkToolManager.cpp Controllers/mitkSegmentationModuleActivator.cpp Controllers/mitkToolManagerProvider.cpp DataManagement/mitkContour.cpp DataManagement/mitkContourSet.cpp DataManagement/mitkExtrudedContour.cpp Interactions/mitkAddContourTool.cpp Interactions/mitkAutoCropTool.cpp Interactions/mitkSegWithPreviewTool.cpp Interactions/mitkBinaryThresholdBaseTool.cpp Interactions/mitkBinaryThresholdTool.cpp Interactions/mitkBinaryThresholdULTool.cpp Interactions/mitkContourModelInteractor.cpp Interactions/mitkContourModelLiveWireInteractor.cpp Interactions/mitkEditableContourTool.cpp Interactions/mitkLiveWireTool2D.cpp Interactions/mitkLassoTool.cpp Interactions/mitkContourTool.cpp - Interactions/mitkCreateSurfaceTool.cpp Interactions/mitkDrawPaintbrushTool.cpp Interactions/mitkErasePaintbrushTool.cpp Interactions/mitkEraseRegionTool.cpp Interactions/mitkFeedbackContourTool.cpp Interactions/mitkFillRegionTool.cpp Interactions/mitkOtsuTool3D.cpp Interactions/mitkPaintbrushTool.cpp Interactions/mitkRegionGrowingTool.cpp Interactions/mitkSegmentationsProcessingTool.cpp Interactions/mitkSetRegionTool.cpp Interactions/mitkSegTool2D.cpp Interactions/mitkSubtractContourTool.cpp Interactions/mitkTool.cpp Interactions/mitkToolCommand.cpp Interactions/mitkPickingTool.cpp Interactions/mitknnUnetTool.cpp Interactions/mitkSegmentationInteractor.cpp #SO Interactions/mitkProcessExecutor.cpp Rendering/mitkContourMapper2D.cpp Rendering/mitkContourSetMapper2D.cpp Rendering/mitkContourSetVtkMapper3D.cpp Rendering/mitkContourVtkMapper3D.cpp SegmentationUtilities/BooleanOperations/mitkBooleanOperation.cpp SegmentationUtilities/MorphologicalOperations/mitkMorphologicalOperations.cpp #Added from ML Controllers/mitkSliceBasedInterpolationController.cpp Algorithms/mitkSurfaceStampImageFilter.cpp ) set(RESOURCE_FILES Add_48x48.png Add_Cursor_32x32.png AI_48x48.png AI_Cursor_32x32.png Erase_48x48.png Erase_Cursor_32x32.png Fill_48x48.png Fill_Cursor_32x32.png LiveWire_48x48.png LiveWire_Cursor_32x32.png NewAdd_48x48.png NewAdd_Cursor_32x32.png Otsu_48x48.png Paint_48x48.png Paint_Cursor_32x32.png Pick_48x48.png RegionGrowing_48x48.png RegionGrowing_Cursor_32x32.png Subtract_48x48.png Subtract_Cursor_32x32.png Threshold_48x48.png TwoThresholds_48x48.png Wipe_48x48.png Wipe_Cursor_32x32.png Interactions/dummy.xml Interactions/EditableContourTool.xml Interactions/PickingTool.xml Interactions/PressMoveRelease.xml Interactions/PressMoveReleaseAndPointSetting.xml Interactions/PressMoveReleaseWithCTRLInversion.xml Interactions/PressMoveReleaseWithCTRLInversionAllMouseMoves.xml Interactions/SegmentationToolsConfig.xml Interactions/ContourModelModificationConfig.xml Interactions/ContourModelModificationInteractor.xml )