VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
33 #ifndef __vtkImageClip_h
34 #define __vtkImageClip_h
35 
36 // I did not make this a subclass of in place filter because
37 // the references on the data do not matter. I make no modifications
38 // to the data.
39 #include "vtkImagingCoreModule.h" // For export macro
40 #include "vtkImageAlgorithm.h"
41 
42 class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
43 {
44 public:
45  static vtkImageClip *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
51  void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=0);
52  void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY,
53  int minZ, int maxZ);
54  void GetOutputWholeExtent(int extent[6]);
55  int *GetOutputWholeExtent() {return this->OutputWholeExtent;}
57 
58  void ResetOutputWholeExtent();
59 
61 
64  vtkSetMacro(ClipData, int);
65  vtkGetMacro(ClipData, int);
66  vtkBooleanMacro(ClipData, int);
68 
70  void SetOutputWholeExtent(int piece, int numPieces);
71 
72 protected:
73  vtkImageClip();
75 
76  // Time when OutputImageExtent was computed.
77  vtkTimeStamp CTime;
78  int Initialized; // Set the OutputImageExtent for the first time.
79  int OutputWholeExtent[6];
80 
81  int ClipData;
82 
83  virtual int RequestInformation (vtkInformation *,
84  vtkInformationVector **,
85  vtkInformationVector *);
86 
87  void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext);
88 
89  virtual int RequestData(vtkInformation *,
90  vtkInformationVector **,
91  vtkInformationVector *);
92 
93 private:
94  vtkImageClip(const vtkImageClip&); // Not implemented.
95  void operator=(const vtkImageClip&); // Not implemented.
96 };
97 
98 
99 
100 #endif
101 
102 
103 
int * GetOutputWholeExtent()
Definition: vtkImageClip.h:55
Reduces the image extent of the input.
Definition: vtkImageClip.h:42
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Generic algorithm superclass for image algs.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)