VTK  9.2.6
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=========================================================================*/
43#ifndef vtkImageClip_h
44#define vtkImageClip_h
45
46// I did not make this a subclass of in place filter because
47// the references on the data do not matter. I make no modifications
48// to the data.
49#include "vtkImageAlgorithm.h"
50#include "vtkImagingCoreModule.h" // For export macro
51
52class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
53{
54public:
55 static vtkImageClip* New();
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
63 void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
64 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
65 void GetOutputWholeExtent(int extent[6]);
66 int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
68
70
72
77 vtkSetMacro(ClipData, vtkTypeBool);
78 vtkGetMacro(ClipData, vtkTypeBool);
79 vtkBooleanMacro(ClipData, vtkTypeBool);
81
82protected:
84 ~vtkImageClip() override = default;
85
86 // Time when OutputImageExtent was computed.
88 int Initialized; // Set the OutputImageExtent for the first time.
89 int OutputWholeExtent[6];
90
92
94
95 void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
96
98
99private:
100 vtkImageClip(const vtkImageClip&) = delete;
101 void operator=(const vtkImageClip&) = delete;
102};
103
104#endif
Generic algorithm superclass for image algs.
Reduces the image extent of the input.
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
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.
void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=nullptr)
The whole extent of the output has to be set explicitly.
vtkTypeBool ClipData
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
a simple class to control print indentation
Definition vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
record modification and/or execution time
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_SIZEHINT(...)