VTK  9.3.0
vtkImageClip.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
31 #ifndef vtkImageClip_h
32 #define vtkImageClip_h
33 
34 // I did not make this a subclass of in place filter because
35 // the references on the data do not matter. I make no modifications
36 // to the data.
37 #include "vtkImageAlgorithm.h"
38 #include "vtkImagingCoreModule.h" // For export macro
39 
40 VTK_ABI_NAMESPACE_BEGIN
41 class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
42 {
43 public:
44  static vtkImageClip* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
53  void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
55  int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
57 
59 
61 
66  vtkSetMacro(ClipData, vtkTypeBool);
67  vtkGetMacro(ClipData, vtkTypeBool);
68  vtkBooleanMacro(ClipData, vtkTypeBool);
70 
71 protected:
73  ~vtkImageClip() override = default;
74 
75  // Time when OutputImageExtent was computed.
77  int Initialized; // Set the OutputImageExtent for the first time.
78  int OutputWholeExtent[6];
79 
81 
83 
84  void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
85 
87 
88 private:
89  vtkImageClip(const vtkImageClip&) = delete;
90  void operator=(const vtkImageClip&) = delete;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif
Generic algorithm superclass for image algs.
Reduces the image extent of the input.
Definition: vtkImageClip.h:42
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.
static vtkImageClip * New()
~vtkImageClip() override=default
vtkTimeStamp CTime
Definition: vtkImageClip.h:76
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int * GetOutputWholeExtent()
The whole extent of the output has to be set explicitly.
Definition: vtkImageClip.h:55
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=nullptr)
The whole extent of the output has to be set explicitly.
vtkTypeBool ClipData
Definition: vtkImageClip.h:80
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:52
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
@ extent
Definition: vtkX3D.h:345
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_SIZEHINT(...)