Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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 // .NAME vtkMitkThickSlicesFilter - Computes the gradient vector.
14 // .SECTION Description
15 // vtkMitkThickSlicesFilter computes the gradient vector of an image. The
16 // vector results are stored as scalar components. The Dimensionality
17 // determines whether to perform a 2d or 3d gradient. The default is
18 // two dimensional XY gradient. OutputScalarType is always
19 // double. Gradient is computed using central differences.
20 
21 #ifndef __vtkMitkThickSlicesFilter_h
22 #define __vtkMitkThickSlicesFilter_h
23 
24 #include <MitkCoreExports.h>
25 
26 #include "vtkThreadedImageAlgorithm.h"
27 
28 class MITKCORE_EXPORT vtkMitkThickSlicesFilter : public vtkThreadedImageAlgorithm
29 {
30 public:
31  static vtkMitkThickSlicesFilter *New();
32  vtkTypeMacro(vtkMitkThickSlicesFilter, vtkThreadedImageAlgorithm);
33  void PrintSelf(ostream &os, vtkIndent indent) override;
34 
35  // Description:
36  // Determines how the input is interpreted (set of 2d slices ...)
37  vtkSetClampMacro(Dimensionality, int, 2, 3);
38  vtkGetMacro(Dimensionality, int);
39 
40  // Description:
41  // Get/Set whether to handle boundaries. If enabled, boundary
42  // pixels are treated as duplicated so that central differencing
43  // works for the boundary pixels. If disabled, the output whole
44  // extent of the image is reduced by one pixel.
45  vtkSetMacro(HandleBoundaries, int);
46  vtkGetMacro(HandleBoundaries, int);
47  vtkBooleanMacro(HandleBoundaries, int);
48 
49  enum
50  {
51  MIP = 0,
52  SUM,
55  MEAN
56  };
57 
58 protected:
61 
62  int HandleBoundaries;
64 
65  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
66  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
67  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
68 
69  void ThreadedRequestData(vtkInformation *,
70  vtkInformationVector **,
71  vtkInformationVector *,
72  vtkImageData ***inData,
73  vtkImageData **outData,
74  int outExt[6],
75  int threadId) override;
76 
78 
79 private:
80  vtkMitkThickSlicesFilter(const vtkMitkThickSlicesFilter &); // Not implemented.
81  void operator=(const vtkMitkThickSlicesFilter &); // Not implemented.
82 
83 public:
84  void SetThickSliceMode(int mode) { m_CurrentMode = mode; }
85  int GetThickSliceMode() { return m_CurrentMode; }
86 };
87 
88 #endif
vtkMitkThickSlicesFilter::Dimensionality
int Dimensionality
Definition: vtkMitkThickSlicesFilter.h:63
vtkMitkThickSlicesFilter::GetThickSliceMode
int GetThickSliceMode()
Definition: vtkMitkThickSlicesFilter.h:85
vtkMitkThickSlicesFilter::SUM
@ SUM
Definition: vtkMitkThickSlicesFilter.h:52
vtkMitkThickSlicesFilter::m_CurrentMode
int m_CurrentMode
Definition: vtkMitkThickSlicesFilter.h:77
vtkMitkThickSlicesFilter::MINIP
@ MINIP
Definition: vtkMitkThickSlicesFilter.h:54
vtkMitkThickSlicesFilter::WEIGHTED
@ WEIGHTED
Definition: vtkMitkThickSlicesFilter.h:53
vtkMitkThickSlicesFilter::~vtkMitkThickSlicesFilter
~vtkMitkThickSlicesFilter() override
Definition: vtkMitkThickSlicesFilter.h:60
MitkCoreExports.h
vtkMitkThickSlicesFilter
Definition: vtkMitkThickSlicesFilter.h:28
vtkMitkThickSlicesFilter::SetThickSliceMode
void SetThickSliceMode(int mode)
Definition: vtkMitkThickSlicesFilter.h:84
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15