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