VTK
vtkImageAccumulate.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageAccumulate.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 =========================================================================*/
37 #ifndef vtkImageAccumulate_h
38 #define vtkImageAccumulate_h
39 
40 #include "vtkImageAlgorithm.h"
41 #include "vtkImagingStatisticsModule.h" // For export macro
42 
44 
45 class VTKIMAGINGSTATISTICS_EXPORT vtkImageAccumulate : public vtkImageAlgorithm
46 {
47 public:
48  static vtkImageAccumulate* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
62  vtkSetVector3Macro(ComponentSpacing, double);
63  vtkGetVector3Macro(ComponentSpacing, double);
65 
67 
76  vtkSetVector3Macro(ComponentOrigin, double);
77  vtkGetVector3Macro(ComponentOrigin, double);
79 
81 
89  void SetComponentExtent(int extent[6]);
90  void SetComponentExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
91  void GetComponentExtent(int extent[6]);
92  int* GetComponentExtent() VTK_SIZEHINT(6) { return this->ComponentExtent; }
94 
96 
102  void SetStencilData(vtkImageStencilData* stencil);
103  vtkImageStencilData* GetStencil();
105 
107 
110  vtkSetClampMacro(ReverseStencil, vtkTypeBool, 0, 1);
111  vtkBooleanMacro(ReverseStencil, vtkTypeBool);
112  vtkGetMacro(ReverseStencil, vtkTypeBool);
114 
116 
121  vtkGetVector3Macro(Min, double);
122  vtkGetVector3Macro(Max, double);
123  vtkGetVector3Macro(Mean, double);
124  vtkGetVector3Macro(StandardDeviation, double);
125  vtkGetMacro(VoxelCount, vtkIdType);
127 
129 
132  vtkSetClampMacro(IgnoreZero, vtkTypeBool, 0, 1);
133  vtkGetMacro(IgnoreZero, vtkTypeBool);
134  vtkBooleanMacro(IgnoreZero, vtkTypeBool);
136 
137 protected:
139  ~vtkImageAccumulate() override;
140 
141  double ComponentSpacing[3];
142  double ComponentOrigin[3];
143  int ComponentExtent[6];
144 
147  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
148  vtkInformationVector* outputVector) override;
149 
151  double Min[3];
152  double Max[3];
153  double Mean[3];
154  double StandardDeviation[3];
156 
158 
159  int FillInputPortInformation(int port, vtkInformation* info) override;
160 
161 private:
162  vtkImageAccumulate(const vtkImageAccumulate&) = delete;
163  void operator=(const vtkImageAccumulate&) = delete;
164 };
165 
166 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkImageAccumulate::IgnoreZero
vtkTypeBool IgnoreZero
Definition: vtkImageAccumulate.h:150
vtkIdType
int vtkIdType
Definition: vtkType.h:349
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkImageAccumulate::VoxelCount
vtkIdType VoxelCount
Definition: vtkImageAccumulate.h:155
vtkX3D::port
Definition: vtkX3D.h:453
vtkImageAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageAccumulate
Generalized histograms up to 3 dimensions.
Definition: vtkImageAccumulate.h:45
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:64
vtkX3D::info
Definition: vtkX3D.h:382
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkImageAccumulate::GetComponentExtent
int * GetComponentExtent()
Definition: vtkImageAccumulate.h:92
vtkImageStencilData
efficient description of an image stencil
Definition: vtkImageStencilData.h:33
vtkImageAccumulate::ReverseStencil
vtkTypeBool ReverseStencil
Definition: vtkImageAccumulate.h:157
vtkX3D::extent
Definition: vtkX3D.h:351
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69