Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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 
33 
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() 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
Crops timesteps at 2D+t and 3D+t images.
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKALGORITHMSEXT_EXPORT
itk::ImageRegion< RegionDimension > RegionType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
static T max(T x, T y)
Definition: svm.cpp:56
mitk::Image::Pointer image
Base class of all classes providing access to parts of an image.