VTK  9.1.0
vtkImageClip.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageClip.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 vtkImageClip_h
38#define vtkImageClip_h
39
40// I did not make this a subclass of in place filter because
41// the references on the data do not matter. I make no modifications
42// to the data.
43#include "vtkImageAlgorithm.h"
44#include "vtkImagingCoreModule.h" // For export macro
45
46class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
47{
48public:
49 static vtkImageClip* New();
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
57 void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
58 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
60 int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
62
64
66
71 vtkSetMacro(ClipData, vtkTypeBool);
72 vtkGetMacro(ClipData, vtkTypeBool);
73 vtkBooleanMacro(ClipData, vtkTypeBool);
75
76protected:
78 ~vtkImageClip() override = default;
79
80 // Time when OutputImageExtent was computed.
82 int Initialized; // Set the OutputImageExtent for the first time.
83 int OutputWholeExtent[6];
84
86
88
89 void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
90
92
93private:
94 vtkImageClip(const vtkImageClip&) = delete;
95 void operator=(const vtkImageClip&) = delete;
96};
97
98#endif
Generic algorithm superclass for image algs.
Reduces the image extent of the input.
Definition: vtkImageClip.h:47
static vtkImageClip * New()
void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext)
void ResetOutputWholeExtent()
void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
The whole extent of the output has to be set explicitly.
void GetOutputWholeExtent(int extent[6])
The whole extent of the output has to be set explicitly.
~vtkImageClip() override=default
vtkTimeStamp CTime
Definition: vtkImageClip.h:81
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
int * GetOutputWholeExtent()
The whole extent of the output has to be set explicitly.
Definition: vtkImageClip.h:60
void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=nullptr)
The whole extent of the output has to be set explicitly.
vtkTypeBool ClipData
Definition: vtkImageClip.h:85
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
topologically and geometrically regular array of data
Definition: vtkImageData.h:57
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:42
@ extent
Definition: vtkX3D.h:351
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)