Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkAutoCropTool.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkAutoCropTool_h
14 #define mitkAutoCropTool_h
15 
16 #include <mitkCommon.h>
19 
20 namespace mitk
21 {
34  {
35  public:
37  itkFactorylessNewMacro(Self);
38  itkCloneMacro(Self);
39 
41  const char *GetName() const override;
42 
43  protected:
47  bool ProcessOneWorkingData(DataNode *node) override;
48 
50  std::string GetErrorMessage() override;
51 
52  AutoCropTool(); // purposely hidden
53  ~AutoCropTool() override;
54  };
55 
56 } // namespace
57 
58 #endif
#define MITKSEGMENTATION_EXPORT
Crops selected segmentations to the smallest bounding box enclosing non-zero pixels.
bool ProcessOneWorkingData(DataNode *node) override
Crop a single working data node to its foreground bounding box.
mitkClassMacro(AutoCropTool, SegmentationsProcessingTool)
~AutoCropTool() override
const char * GetName() const override
Return the human-readable name of this tool ("Crop").
std::string GetErrorMessage() override
Return a user-facing error message prefix for failed crop operations.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72
Abstract base class for tools that batch-process all selected segmentations.
Find image slices visible on a given plane.