Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkCropTimestepsImageFilter.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 mitkCropTimestepsImageFilter_h
14 #define mitkCropTimestepsImageFilter_h
15 
17 
18 #include <mitkSubImageSelector.h>
19 
20 namespace mitk
21 {
28  {
29  public:
31  itkFactorylessNewMacro(Self);
32 
39  void SetInput(const InputImageType* image) override;
40  void SetInput(unsigned int index, const InputImageType* image) override;
41 
49  itkSetMacro(UpperBoundaryTimestep, unsigned int);
50  itkGetConstMacro(UpperBoundaryTimestep, unsigned int);
51 
57  itkSetMacro(LowerBoundaryTimestep, unsigned int);
58  itkGetConstMacro(LowerBoundaryTimestep, unsigned int);
59 
60  private:
61  using Superclass::SetInput;
62 
63  CropTimestepsImageFilter() = default;
64  ~CropTimestepsImageFilter() override = default;
65 
66  void GenerateData() override;
67  void VerifyInputInformation() const override;
68  void VerifyInputImage(const mitk::Image* inputImage) const;
69  void GenerateOutputInformation() override;
70  mitk::SlicedData::RegionType ComputeDesiredRegion() const;
71  mitk::TimeGeometry::Pointer AdaptTimeGeometry(mitk::TimeGeometry::ConstPointer sourceGeometry, unsigned int startTimestep, unsigned int endTimestep) const;
72 
73  unsigned int m_UpperBoundaryTimestep = std::numeric_limits<unsigned int>::max();
74  unsigned int m_LowerBoundaryTimestep = 0;
75 
76  mitk::SlicedData::RegionType m_DesiredRegion;
77  };
78 }
79 
80 #endif
mitk::SubImageSelector
Base class of all classes providing access to parts of an image.
Definition: mitkSubImageSelector.h:31
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
MitkAlgorithmsExtExports.h
mitk::SlicedData::RegionType
itk::ImageRegion< RegionDimension > RegionType
Definition: mitkSlicedData.h:45
MITKALGORITHMSEXT_EXPORT
#define MITKALGORITHMSEXT_EXPORT
Definition: MitkAlgorithmsExtExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitkSubImageSelector.h
mitk::CropTimestepsImageFilter
Crops timesteps at 2D+t and 3D+t images.
Definition: mitkCropTimestepsImageFilter.h:27
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36