17 #ifndef __mitkAutoCropImageFilter_h_
18 #define __mitkAutoCropImageFilter_h_
26 #include <itkImageRegion.h>
65 itkFactorylessNewMacro(
Self) itkCloneMacro(
Self)
67 itkGetConstMacro(BackgroundValue,
float);
68 itkSetMacro(BackgroundValue,
float);
70 itkGetConstMacro(MarginFactor,
float);
71 itkSetMacro(MarginFactor,
float);
73 itkGetMacro(CroppingRegion, RegionType);
76 void SetCroppingRegion(RegionType overrideRegion);
78 virtual const
PixelType GetOutputPixelType();
85 virtual ~AutoCropImageFilter();
88 void ComputeNewImageBounds();
91 template <typename TPixel,
unsigned int VImageDimension>
92 void ITKCrop3DImage(
itk::
Image<TPixel, VImageDimension> *inputItkImage,
unsigned int timestep);
95 virtual
void GenerateOutputInformation() override;
98 virtual
void GenerateInputRequestedRegion() override;
101 virtual
void GenerateData() override;
103 float m_BackgroundValue;
105 RegionType m_CroppingRegion;
107 float m_MarginFactor;
112 RegionType::SizeType m_RegionSize;
113 RegionType::IndexType m_RegionIndex;
118 itk::TimeStamp m_TimeOfHeaderInitialization;
120 bool m_OverrideCroppingRegion;
Shrink the image borders to a minimum considering a background color.
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
itk::Image< float, 3 > ImageType
#define MITKALGORITHMSEXT_EXPORT
Super class of data objects consisting of slices.
#define mitkClassMacro(className, SuperClassName)
Image class for storing images.
Provides access to a volume at a specific time of the input image.
Base class of all classes providing access to parts of an image.
ImageType::Pointer ImagePointer
Class for defining the data type of pixels.
itk::ImageRegion< 3 > RegionType