Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkExtractImageFilter.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 mitkExtractImageFilter_h
14 #define mitkExtractImageFilter_h
15 
16 #include "mitkCommon.h"
17 #include "mitkImageToImageFilter.h"
19 
20 #include "itkImage.h"
21 
22 namespace mitk
23 {
47  {
48  public:
50  itkFactorylessNewMacro(Self);
51  itkCloneMacro(Self);
52 
56  itkSetMacro(SliceIndex, unsigned int);
57  itkGetConstMacro(SliceIndex, unsigned int);
58 
65  itkSetMacro(SliceDimension, unsigned int);
66  itkGetConstMacro(SliceDimension, unsigned int);
67 
71  itkSetMacro(TimeStep, unsigned int);
72  itkGetConstMacro(TimeStep, unsigned int);
73 
75  DIRECTIONCOLLAPSETOUNKOWN = 0,
76  DIRECTIONCOLLAPSETOIDENTITY = 1,
77  DIRECTIONCOLLAPSETOSUBMATRIX = 2,
78  DIRECTIONCOLLAPSETOGUESS = 3
79  } DIRECTIONCOLLAPSESTRATEGY;
80 
84  itkSetMacro(DirectionCollapseToStrategy, DIRECTIONCOLLAPSESTRATEGY);
85  itkGetConstMacro(DirectionCollapseToStrategy, DIRECTIONCOLLAPSESTRATEGY);
86 
87  protected:
88  ExtractImageFilter(); // purposely hidden
89  ~ExtractImageFilter() override;
90 
91  void GenerateOutputInformation() override;
93 
94  void GenerateData() override;
95 
96  template <typename TPixel, unsigned int VImageDimension>
97  void ItkImageProcessing(const itk::Image<TPixel, VImageDimension> *image);
98 
99  unsigned int m_SliceIndex;
100  unsigned int m_SliceDimension;
101  unsigned int m_TimeStep;
103  };
104 
105 } // namespace
106 
107 #endif
#define MITKIMAGEEXTRACTION_EXPORT
Extracts a 2D slice from a 3D image.
DIRECTIONCOLLAPSESTRATEGY m_DirectionCollapseToStrategy
void GenerateData() override
void ItkImageProcessing(const itk::Image< TPixel, VImageDimension > *image)
enum mitk::ExtractImageFilter::DirectionCollapseStrategyEnum DIRECTIONCOLLAPSESTRATEGY
void GenerateOutputInformation() override
~ExtractImageFilter() override
mitkClassMacro(ExtractImageFilter, ImageToImageFilter)
void GenerateInputRequestedRegion() override
Superclass of all classes generating Images (instances of class Image) as output.
Superclass of all classes having one or more Images as input and generating Images as output.
Find image slices visible on a given plane.