Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 // .NAME vtkMitkThickSlicesFilter - Computes the gradient vector.
18 // .SECTION Description
19 // vtkMitkThickSlicesFilter computes the gradient vector of an image. The
20 // vector results are stored as scalar components. The Dimensionality
21 // determines whether to perform a 2d or 3d gradient. The default is
22 // two dimensional XY gradient. OutputScalarType is always
23 // double. Gradient is computed using central differences.
24 
25 #ifndef __vtkMitkThickSlicesFilter_h
26 #define __vtkMitkThickSlicesFilter_h
27 
28 #include <MitkCoreExports.h>
29 
30 #include "vtkThreadedImageAlgorithm.h"
31 
32 class MITKCORE_EXPORT vtkMitkThickSlicesFilter : public vtkThreadedImageAlgorithm
33 {
34 public:
35  static vtkMitkThickSlicesFilter *New();
36  vtkTypeMacro(vtkMitkThickSlicesFilter, vtkThreadedImageAlgorithm);
37  void PrintSelf(ostream &os, vtkIndent indent) override;
38 
39  // Description:
40  // Determines how the input is interpreted (set of 2d slices ...)
41  vtkSetClampMacro(Dimensionality, int, 2, 3);
42  vtkGetMacro(Dimensionality, int);
43 
44  // Description:
45  // Get/Set whether to handle boundaries. If enabled, boundary
46  // pixels are treated as duplicated so that central differencing
47  // works for the boundary pixels. If disabled, the output whole
48  // extent of the image is reduced by one pixel.
49  vtkSetMacro(HandleBoundaries, int);
50  vtkGetMacro(HandleBoundaries, int);
51  vtkBooleanMacro(HandleBoundaries, int);
52 
53  enum
54  {
55  MIP = 0,
56  SUM,
59  MEAN
60  };
61 
62 protected:
65 
66  int HandleBoundaries;
68 
69  virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
70  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
71  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
72 
73  void ThreadedRequestData(vtkInformation *,
74  vtkInformationVector **,
75  vtkInformationVector *,
76  vtkImageData ***inData,
77  vtkImageData **outData,
78  int outExt[6],
79  int threadId) override;
80 
82 
83 private:
84  vtkMitkThickSlicesFilter(const vtkMitkThickSlicesFilter &); // Not implemented.
85  void operator=(const vtkMitkThickSlicesFilter &); // Not implemented.
86 
87 public:
88  void SetThickSliceMode(int mode) { m_CurrentMode = mode; }
89  int GetThickSliceMode() { return m_CurrentMode; }
90 };
91 
92 #endif
#define MITKCORE_EXPORT
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.