diff --git a/Modules/Segmentation/Interactions/mitkEraseRegionTool.h b/Modules/Segmentation/Interactions/mitkEraseRegionTool.h index c5008654b5..5316ce5dc1 100644 --- a/Modules/Segmentation/Interactions/mitkEraseRegionTool.h +++ b/Modules/Segmentation/Interactions/mitkEraseRegionTool.h @@ -1,61 +1,61 @@ /*============================================================================ 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 mitkEraseRegionTool_h_Included #define mitkEraseRegionTool_h_Included #include "mitkSetRegionTool.h" #include namespace us { class ModuleResource; } namespace mitk { /** - \brief Fill the inside of a contour with 1 + \brief Erase the inside of a contour by + filling the inside of a contour with the background pixel value. \sa SetRegionTool - \ingroup Interaction - \ingroup ToolManagerEtAl + \ingroup Interactions - Finds the outer contour of a shape in 2D (possibly including holes) and sets all - the inside pixels to 0 (erasing a segmentation). + Finds the outer contour of a shape in 2D (possibly including single patches) and sets all + the pixels inside to the background pixel value (erasing a segmentation). + If clicked on the background, the outer contour might contain the whole image and thus + fill the whole image with the background pixel value. \warning Only to be instantiated by mitk::ToolManager. - - $Author$ */ class MITKSEGMENTATION_EXPORT EraseRegionTool : public SetRegionTool { public: mitkClassMacro(EraseRegionTool, SetRegionTool); itkFactorylessNewMacro(Self); itkCloneMacro(Self); const char **GetXPM() const override; us::ModuleResource GetCursorIconResource() const override; us::ModuleResource GetIconResource() const override; const char *GetName() const override; protected: EraseRegionTool(); // purposely hidden ~EraseRegionTool() override; }; } // namespace #endif diff --git a/Modules/Segmentation/Interactions/mitkFillRegionTool.h b/Modules/Segmentation/Interactions/mitkFillRegionTool.h index c704623335..3643b13992 100644 --- a/Modules/Segmentation/Interactions/mitkFillRegionTool.h +++ b/Modules/Segmentation/Interactions/mitkFillRegionTool.h @@ -1,60 +1,60 @@ /*============================================================================ 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 mitkFillRegionTool_h_Included #define mitkFillRegionTool_h_Included #include "mitkSetRegionTool.h" #include namespace us { class ModuleResource; } namespace mitk { /** - \brief Fill the inside of a contour with 1 + \brief Fill the inside of a contour with the foreground pixel value. \sa SetRegionTool - \ingroup Interaction - \ingroup ToolManagerEtAl + \ingroup Interactions Finds the outer contour of a shape in 2D (possibly including holes) and sets all - the inside pixels to 1, filling holes in a segmentation. - \warning Only to be instantiated by mitk::ToolManager. + the pixels inside to the foreground pixel value (filling holes in a segmentation). + If clicked on the background, the outer contour might contain the whole image and thus + fill the whole image with the foreground pixel value. - $Author$ + \warning Only to be instantiated by mitk::ToolManager. */ class MITKSEGMENTATION_EXPORT FillRegionTool : public SetRegionTool { public: mitkClassMacro(FillRegionTool, SetRegionTool); itkFactorylessNewMacro(Self); itkCloneMacro(Self); const char **GetXPM() const override; us::ModuleResource GetCursorIconResource() const override; us::ModuleResource GetIconResource() const override; const char *GetName() const override; protected: FillRegionTool(); // purposely hidden ~FillRegionTool() override; }; } // namespace #endif diff --git a/Modules/Segmentation/Interactions/mitkSetRegionTool.h b/Modules/Segmentation/Interactions/mitkSetRegionTool.h index fbaa1c2ecb..9fab9b8030 100644 --- a/Modules/Segmentation/Interactions/mitkSetRegionTool.h +++ b/Modules/Segmentation/Interactions/mitkSetRegionTool.h @@ -1,63 +1,60 @@ /*============================================================================ 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 mitkSetRegionTool_h_Included #define mitkSetRegionTool_h_Included #include "mitkCommon.h" #include "mitkFeedbackContourTool.h" #include namespace mitk { class Image; class StateMachineAction; class InteractionEvent; /** \brief Fills or erases a 2D region \sa FeedbackContourTool \sa ExtractImageFilter - \ingroup Interaction - \ingroup ToolManagerEtAl + \ingroup Interactions - Finds the outer contour of a shape in 2D (possibly including holes) and sets all + Finds the outer contour of a shape in 2D (possibly including holes or single patches) and sets all the inside pixels to a specified value. This might fill holes or erase segmentations. \warning Only to be instantiated by mitk::ToolManager. - - $Author$ */ class MITKSEGMENTATION_EXPORT SetRegionTool : public FeedbackContourTool { public: mitkClassMacro(SetRegionTool, FeedbackContourTool); protected: SetRegionTool(int paintingPixelValue = 1); // purposely hidden ~SetRegionTool() override; void ConnectActionsAndFunctions() override; void Activated() override; void Deactivated() override; virtual void OnMousePressed(StateMachineAction *, InteractionEvent *); virtual void OnMouseReleased(StateMachineAction *, InteractionEvent *); virtual void OnMouseMoved(StateMachineAction *, InteractionEvent *); int m_PaintingPixelValue; }; } // namespace #endif