Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
vtkMitkThickSlicesFilter.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 vtkMitkThickSlicesFilter_h
14 #define vtkMitkThickSlicesFilter_h
15 
16 #include <MitkCoreExports.h>
17 
18 #include <vtkThreadedImageAlgorithm.h>
19 
30 class MITKCORE_EXPORT vtkMitkThickSlicesFilter : public vtkThreadedImageAlgorithm
31 {
32 public:
35  vtkTypeMacro(vtkMitkThickSlicesFilter, vtkThreadedImageAlgorithm);
36 
38  void PrintSelf(ostream &os, vtkIndent indent) override;
39 
41  vtkSetClampMacro(Dimensionality, int, 2, 3);
42  vtkGetMacro(Dimensionality, int);
43 
51  vtkSetMacro(HandleBoundaries, int);
52  vtkGetMacro(HandleBoundaries, int);
53  vtkBooleanMacro(HandleBoundaries, int);
54 
64  enum
65  {
66  MIP = 0,
67  SUM,
70  MEAN
71  };
72 
73 protected:
76 
79 
82 
84  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
85 
87  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
88 
90  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
91 
100  void ThreadedRequestData(vtkInformation *,
101  vtkInformationVector **,
102  vtkInformationVector *,
103  vtkImageData ***inData,
104  vtkImageData **outData,
105  int outExt[6],
106  int threadId) override;
107 
109 
110 private:
111  vtkMitkThickSlicesFilter(const vtkMitkThickSlicesFilter &); // Not implemented.
112  void operator=(const vtkMitkThickSlicesFilter &); // Not implemented.
113 
114 public:
120  void SetThickSliceMode(int mode) { m_CurrentMode = mode; }
121 
127  int GetThickSliceMode() { return m_CurrentMode; }
128 };
129 
130 #endif
#define MITKCORE_EXPORT
Computes a thick slice projection from a 3D image stack.
vtkTypeMacro(vtkMitkThickSlicesFilter, vtkThreadedImageAlgorithm)
void SetThickSliceMode(int mode)
Set the thick slice projection mode.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Compute the input update extent from the output request.
void ThreadedRequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int threadId) override
Threaded execution method that applies the selected projection mode.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Propagate output information (reduces Z extent to a single slice).
static vtkMitkThickSlicesFilter * New()
Create a new instance of vtkMitkThickSlicesFilter.
vtkSetMacro(HandleBoundaries, int)
Get/Set whether to handle boundaries.
void PrintSelf(ostream &os, vtkIndent indent) override
Print the filter state to the given output stream.
vtkBooleanMacro(HandleBoundaries, int)
~vtkMitkThickSlicesFilter() override
Destructor.
int GetThickSliceMode()
Get the current thick slice projection mode.
vtkGetMacro(HandleBoundaries, int)
vtkGetMacro(Dimensionality, int)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Execute the filter and process output data arrays.
vtkSetClampMacro(Dimensionality, int, 2, 3)
Determines how the input is interpreted (set of 2D slices). Clamped to [2, 3].
vtkMitkThickSlicesFilter()
Constructor. Sets defaults: HandleBoundaries=1, Dimensionality=2, mode=MIP.