diff --git a/Modules/Segmentation/Controllers/mitkToolManagerProvider.h b/Modules/Segmentation/Controllers/mitkToolManagerProvider.h new file mode 100644 index 0000000000..19ccaed4a1 --- /dev/null +++ b/Modules/Segmentation/Controllers/mitkToolManagerProvider.h @@ -0,0 +1,42 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef MITK_TOOLMANAGERPROVIDER_H +#define MITK_TOOLMANAGERPROVIDER_H + +#include + +namespace mitk { + + + /** + * \ingroup MicroServices_Interfaces + * + */ + struct ToolManagerProvider + { + virtual ~ToolManagerProvider() {} + + virtual bool Dummy() = 0; + + }; + +} + + + US_DECLARE_SERVICE_INTERFACE(mitk::ToolManagerProvider, "org.mitk.services.ToolManagerProvider") + +#endif diff --git a/Modules/Segmentation/Controllers/mitkToolManagerProviderImpl.cpp b/Modules/Segmentation/Controllers/mitkToolManagerProviderImpl.cpp new file mode 100644 index 0000000000..25b033b64d --- /dev/null +++ b/Modules/Segmentation/Controllers/mitkToolManagerProviderImpl.cpp @@ -0,0 +1,29 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "mitkToolManagerProviderImpl.h" + +mitk::ToolManagerProviderImpl::ToolManagerProviderImpl() +{ +} +mitk::ToolManagerProviderImpl::~ToolManagerProviderImpl() +{ +} + +bool mitk::ToolManagerProviderImpl::Dummy() +{ + return true; +} diff --git a/Modules/Segmentation/Controllers/mitkToolManagerProviderImpl.h b/Modules/Segmentation/Controllers/mitkToolManagerProviderImpl.h new file mode 100644 index 0000000000..8b06338a28 --- /dev/null +++ b/Modules/Segmentation/Controllers/mitkToolManagerProviderImpl.h @@ -0,0 +1,48 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef MITK_TOOLMANAGERPROVIDER_IMPL_H +#define MITK_TOOLMANAGERPROVIDER_IMPL_H + +#include + +#include "mitkContourManager.h" + +#include +#include + +namespace mitk +{ + + class ToolManagerProviderImpl : public itk::LightObject, public ToolManagerProvider + { + public: + mitkClassMacro(ToolManagerProviderImpl, itk::LightObject); + itkNewMacro(Self); + + virtual bool Dummy(); + //friend class mitk::SegmentationModuleActivator; + + protected: + //mitkClassMacro(ToolManagerProviderImpl, itk::LightObject); + //itkNewMacro(Self); + + ToolManagerProviderImpl(); + virtual ~ToolManagerProviderImpl(); + }; +} + +#endif diff --git a/Modules/Segmentation/Testing/files.cmake b/Modules/Segmentation/Testing/files.cmake index 87ece6530e..7bbba33b35 100644 --- a/Modules/Segmentation/Testing/files.cmake +++ b/Modules/Segmentation/Testing/files.cmake @@ -1,38 +1,39 @@ set(MODULE_TESTS mitkContourMapper2DTest.cpp mitkContourTest.cpp mitkDataNodeSegmentationTest.cpp # mitkSegmentationInterpolationTest.cpp mitkOverwriteSliceFilterTest.cpp # mitkOverwriteSliceFilterObliquePlaneTest.cpp mitkContourModelTest.cpp mitkContourModelIOTest.cpp # mitkToolManagerTest.cpp + mitkToolManagerProviderTest.cpp ) set(MODULE_IMAGE_TESTS mitkManualSegmentationToSurfaceFilterTest.cpp #only runs on images mitkOverwriteSliceImageFilterTest.cpp #only runs on images ) set(MODULE_CUSTOM_TESTS ) set(MODULE_TESTIMAGES US4DCyl.nrrd Pic3D.nrrd Pic2DplusT.nrrd BallBinary30x30x30.nrrd Png2D-bw.png ) # Create an artificial module initializing class for # usServices set(testdriver_resources ) usFunctionGenerateModuleInit(testdriver_init_file NAME ${MODULE_NAME}TestDriver DEPENDS "Segmentation" VERSION "0.1.0" EXECUTABLE ) set(TEST_CPP_FILES ${testdriver_init_file}) diff --git a/Modules/Segmentation/Testing/mitkToolManagerProviderTest.cpp b/Modules/Segmentation/Testing/mitkToolManagerProviderTest.cpp new file mode 100644 index 0000000000..e6b2a18418 --- /dev/null +++ b/Modules/Segmentation/Testing/mitkToolManagerProviderTest.cpp @@ -0,0 +1,41 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ +#include "mitkTestingMacros.h" +#include "mitkToolManagerProvider.h" +#include "itkLightObject.h" + +#include +#include "mitkModuleContext.h" +#include "mitkServiceReference.h" + +class mitkToolManagerProviderTestClass { +public: + + +}; + +int mitkToolManagerProviderTest(int, char* []) +{ + MITK_TEST_BEGIN("ToolManagerProvider") + + + mitk::ServiceReference serviceRef = mitk::GetModuleContext()->GetServiceReference< mitk::ToolManagerProvider >(); + mitk::ToolManagerProvider* service = mitk::GetModuleContext()->GetService< mitk::ToolManagerProvider >(serviceRef); + + MITK_TEST_CONDITION(service!=NULL,"Service was succesfully called"); + MITK_TEST_CONDITION(service->Dummy(), "Dummy call"); + MITK_TEST_END() +} diff --git a/Modules/Segmentation/files.cmake b/Modules/Segmentation/files.cmake index 63e019f428..081debd03e 100644 --- a/Modules/Segmentation/files.cmake +++ b/Modules/Segmentation/files.cmake @@ -1,111 +1,112 @@ set(CPP_FILES Algorithms/mitkCalculateSegmentationVolume.cpp Algorithms/mitkContourModelSource.cpp Algorithms/mitkContourModelSubDivisionFilter.cpp Algorithms/mitkContourModelToPointSetFilter.cpp Algorithms/mitkContourModelToSurfaceFilter.cpp Algorithms/mitkContourSetToPointSetFilter.cpp Algorithms/mitkContourUtils.cpp Algorithms/mitkCorrectorAlgorithm.cpp Algorithms/mitkDiffImageApplier.cpp Algorithms/mitkDiffSliceOperation.cpp Algorithms/mitkDiffSliceOperationApplier.cpp Algorithms/mitkImageLiveWireContourModelFilter.cpp Algorithms/mitkImageToContourFilter.cpp Algorithms/mitkImageToContourModelFilter.cpp Algorithms/mitkImageToLiveWireContourFilter.cpp Algorithms/mitkManualSegmentationToSurfaceFilter.cpp Algorithms/mitkOtsuSegmentationFilter.cpp Algorithms/mitkOverwriteDirectedPlaneImageFilter.cpp Algorithms/mitkOverwriteSliceImageFilter.cpp Algorithms/mitkSegmentationObjectFactory.cpp Algorithms/mitkSegmentationSink.cpp Algorithms/mitkShapeBasedInterpolationAlgorithm.cpp Algorithms/mitkShowSegmentationAsSmoothedSurface.cpp Algorithms/mitkShowSegmentationAsSurface.cpp Algorithms/mitkVtkImageOverwrite.cpp Controllers/mitkSegmentationInterpolationController.cpp Controllers/mitkToolManager.cpp Controllers/mitkSegmentationModuleActivator.cpp + Controllers/mitkToolManagerProviderImpl.cpp DataManagement/mitkContour.cpp DataManagement/mitkContourElement.cpp DataManagement/mitkContourModel.cpp DataManagement/mitkContourSet.cpp DataManagement/mitkExtrudedContour.cpp Interactions/mitkAdaptiveRegionGrowingTool.cpp Interactions/mitkAddContourTool.cpp Interactions/mitkAutoCropTool.cpp Interactions/mitkAutoSegmentationTool.cpp Interactions/mitkBinaryThresholdTool.cpp Interactions/mitkBinaryThresholdULTool.cpp Interactions/mitkCalculateGrayValueStatisticsTool.cpp Interactions/mitkCalculateVolumetryTool.cpp Interactions/mitkContourInteractor.cpp Interactions/mitkContourModelInteractor.cpp Interactions/mitkContourModelLiveWireInteractor.cpp Interactions/mitkContourTool.cpp Interactions/mitkCorrectorTool2D.cpp Interactions/mitkCreateSurfaceTool.cpp Interactions/mitkDrawPaintbrushTool.cpp Interactions/mitkErasePaintbrushTool.cpp Interactions/mitkEraseRegionTool.cpp Interactions/mitkExtrudedContourInteractor.cpp Interactions/mitkFastMarchingTool.cpp Interactions/mitkFastMarchingTool3D.cpp Interactions/mitkFeedbackContourTool.cpp Interactions/mitkFillRegionTool.cpp Interactions/mitkLiveWireTool2D.cpp Interactions/mitkOtsuTool3D.cpp Interactions/mitkPaintbrushTool.cpp Interactions/mitkPixelManipulationTool.cpp Interactions/mitkRegionGrow3DTool.cpp Interactions/mitkRegionGrowingTool.cpp Interactions/mitkSegmentationsProcessingTool.cpp Interactions/mitkSetRegionTool.cpp Interactions/mitkSegTool2D.cpp Interactions/mitkSubtractContourTool.cpp Interactions/mitkTool.cpp Interactions/mitkToolCommand.cpp Interactions/mitkWatershedTool.cpp IO/mitkContourModelIOFactory.cpp IO/mitkContourModelReader.cpp IO/mitkContourModelWriter.cpp IO/mitkContourModelWriterFactory.cpp Rendering/mitkContourMapper2D.cpp Rendering/mitkContourModelGLMapper2D.cpp Rendering/mitkContourModelMapper2D.cpp Rendering/mitkContourModelMapper3D.cpp Rendering/mitkContourSetMapper2D.cpp Rendering/mitkContourSetVtkMapper3D.cpp Rendering/mitkContourVtkMapper3D.cpp SegmentationUtilities/BooleanOperations/mitkBooleanOperation.cpp SegmentationUtilities/MorphologicalOperations/mitkMorphologicalOperations.cpp ) set(RESOURCE_FILES Add_48x48.png Add_Cursor_32x32.png Correction_48x48.png Correction_Cursor_32x32.png Erase_48x48.png Erase_Cursor_32x32.png FastMarching_48x48.png FastMarching_Cursor_32x32.png Fill_48x48.png Fill_Cursor_32x32.png LiveWire_48x48.png LiveWire_Cursor_32x32.png Otsu_48x48.png Paint_48x48.png Paint_Cursor_32x32.png RegionGrowing_48x48.png RegionGrowing_Cursor_32x32.png Subtract_48x48.png Subtract_Cursor_32x32.png Threshold_48x48.png TwoThresholds_48x48.png Watershed_48x48.png Watershed_Cursor_32x32.png Wipe_48x48.png Wipe_Cursor_32x32.png )