VTK
vtkImageSlab.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageSlab.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkImageSlab_h
32 #define vtkImageSlab_h
33 
34 #include "vtkImagingGeneralModule.h" // For export macro
36 
37 class VTKIMAGINGGENERAL_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm
38 {
39 public:
40  static vtkImageSlab *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
49  vtkSetClampMacro(Orientation, int, 0, 2);
51  this->SetOrientation(0); };
53  this->SetOrientation(1); };
55  this->SetOrientation(2); };
56  vtkGetMacro(Orientation, int);
58 
60 
64  vtkSetVector2Macro(SliceRange, int);
65  vtkGetVector2Macro(SliceRange, int);
67 
69 
73  vtkSetClampMacro(Operation, int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_SUM);
75  this->SetOperation(VTK_IMAGE_SLAB_MIN); };
77  this->SetOperation(VTK_IMAGE_SLAB_MAX); };
79  this->SetOperation(VTK_IMAGE_SLAB_MEAN); };
81  this->SetOperation(VTK_IMAGE_SLAB_SUM); };
82  vtkGetMacro(Operation, int);
83  const char *GetOperationAsString();
85 
87 
93  vtkSetMacro(TrapezoidIntegration, int);
94  vtkBooleanMacro(TrapezoidIntegration, int);
95  vtkGetMacro(TrapezoidIntegration, int);
97 
99 
106  vtkSetMacro(MultiSliceOutput, int);
107  vtkBooleanMacro(MultiSliceOutput, int);
108  vtkGetMacro(MultiSliceOutput, int);
110 
112 
119  this->SetOutputScalarType(VTK_FLOAT); };
121  this->SetOutputScalarType(VTK_DOUBLE); };
123  this->SetOutputScalarType(0); };
124  vtkGetMacro(OutputScalarType, int);
126 
127 protected:
130 
135  virtual void ThreadedRequestData(vtkInformation *request,
136  vtkInformationVector **inputVector,
137  vtkInformationVector *outputVector,
138  vtkImageData ***inData,
139  vtkImageData **outData, int ext[6], int id);
140 
141  vtkSetMacro(OutputScalarType, int);
142 
145  int SliceRange[2];
149 
150 private:
151  vtkImageSlab(const vtkImageSlab&) VTK_DELETE_FUNCTION;
152  void operator=(const vtkImageSlab&) VTK_DELETE_FUNCTION;
153 };
154 
155 #endif
vtkImageSlab::OutputScalarType
int OutputScalarType
Definition: vtkImageSlab.h:146
VTK_IMAGE_SLAB_MAX
#define VTK_IMAGE_SLAB_MAX
Definition: vtkSystemIncludes.h:113
vtkImageSlab::New
static vtkImageSlab * New()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkImageSlab::SetOutputScalarTypeToInputScalarType
void SetOutputScalarTypeToInputScalarType()
Definition: vtkImageSlab.h:122
vtkImageSlab::vtkImageSlab
vtkImageSlab()
vtkImageSlab::~vtkImageSlab
~vtkImageSlab()
vtkImageSlab::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:44
vtkImageSlab::GetOperationAsString
const char * GetOperationAsString()
vtkImageSlab::SetOrientationToZ
void SetOrientationToZ()
Definition: vtkImageSlab.h:54
vtkThreadedImageAlgorithm.h
vtkImageSlab::TrapezoidIntegration
int TrapezoidIntegration
Definition: vtkImageSlab.h:148
VTK_IMAGE_SLAB_MEAN
#define VTK_IMAGE_SLAB_MEAN
Definition: vtkSystemIncludes.h:114
vtkImageSlab
combine image slices to form a slab image
Definition: vtkImageSlab.h:38
vtkImageSlab::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:118
VTK_IMAGE_SLAB_MIN
#define VTK_IMAGE_SLAB_MIN
Definition: vtkSystemIncludes.h:112
vtkImageSlab::SetOperationToMean
void SetOperationToMean()
Definition: vtkImageSlab.h:78
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
vtkImageSlab::SetOperationToMax
void SetOperationToMax()
Definition: vtkImageSlab.h:76
vtkImageSlab::ThreadedRequestData
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id)
If the subclass does not define an Execute method, then the task will be broken up,...
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkImageSlab::SetOrientationToX
void SetOrientationToX()
Definition: vtkImageSlab.h:50
vtkImageSlab::SetOrientationToY
void SetOrientationToY()
Definition: vtkImageSlab.h:52
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkImageSlab::Operation
int Operation
Definition: vtkImageSlab.h:141
vtkImageSlab::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageSlab::SetOperationToSum
void SetOperationToSum()
Definition: vtkImageSlab.h:80
VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_SUM
Definition: vtkSystemIncludes.h:115
vtkImageSlab::SetOperationToMin
void SetOperationToMin()
Definition: vtkImageSlab.h:74
vtkImageSlab::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageSlab::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageSlab.h:120
vtkImageSlab::Orientation
int Orientation
Definition: vtkImageSlab.h:144
vtkImageSlab::MultiSliceOutput
int MultiSliceOutput
Definition: vtkImageSlab.h:147