VTK
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 =========================================================================*/
28 #ifndef vtkImageClip_h
29 #define vtkImageClip_h
30 
31 // I did not make this a subclass of in place filter because
32 // the references on the data do not matter. I make no modifications
33 // to the data.
34 #include "vtkImagingCoreModule.h" // For export macro
35 #include "vtkImageAlgorithm.h"
36 
37 class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
38 {
39 public:
40  static vtkImageClip *New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=nullptr);
49  void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY,
50  int minZ, int maxZ);
51  void GetOutputWholeExtent(int extent[6]);
52  int *GetOutputWholeExtent() VTK_SIZEHINT(6) {return this->OutputWholeExtent;}
54 
55  void ResetOutputWholeExtent();
56 
58 
63  vtkSetMacro(ClipData, vtkTypeBool);
64  vtkGetMacro(ClipData, vtkTypeBool);
65  vtkBooleanMacro(ClipData, vtkTypeBool);
67 
68 protected:
69  vtkImageClip();
70  ~vtkImageClip() override {}
71 
72  // Time when OutputImageExtent was computed.
74  int Initialized; // Set the OutputImageExtent for the first time.
75  int OutputWholeExtent[6];
76 
78 
81  vtkInformationVector *) override;
82 
83  void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext);
84 
87  vtkInformationVector *) override;
88 
89 private:
90  vtkImageClip(const vtkImageClip&) = delete;
91  void operator=(const vtkImageClip&) = delete;
92 };
93 
94 
95 
96 #endif
97 
98 
99 
~vtkImageClip() override
Definition: vtkImageClip.h:70
vtkTimeStamp CTime
Definition: vtkImageClip.h:73
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:32
int vtkTypeBool
Definition: vtkABI.h:69
int * GetOutputWholeExtent()
The whole extent of the output has to be set explicitly.
Definition: vtkImageClip.h:52
a simple class to control print indentation
Definition: vtkIndent.h:33
Reduces the image extent of the input.
Definition: vtkImageClip.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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:77
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.