VTK
vtkImageReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageReader.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 =========================================================================*/
32 #ifndef __vtkImageReader_h
33 #define __vtkImageReader_h
34 
35 #include "vtkImageReader2.h"
36 
37 class vtkTransform;
38 
39 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
40 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
41 
43 {
44 public:
45  static vtkImageReader *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
52  vtkSetVector6Macro(DataVOI,int);
53  vtkGetVector6Macro(DataVOI,int);
55 
57 
63  vtkGetMacro(DataMask, vtkTypeUInt64);
64  vtkSetMacro(DataMask, vtkTypeUInt64);
66 
68 
71  virtual void SetTransform(vtkTransform*);
72  vtkGetObjectMacro(Transform,vtkTransform);
74 
75  // Warning !!!
76  // following should only be used by methods or template helpers, not users
77  void ComputeInverseTransformedExtent(int inExtent[6],
78  int outExtent[6]);
79  void ComputeInverseTransformedIncrements(vtkIdType inIncr[3],
80  vtkIdType outIncr[3]);
81 
82  int OpenAndSeekFile(int extent[6], int slice);
83 
85 
86  vtkSetStringMacro(ScalarArrayName);
87  vtkGetStringMacro(ScalarArrayName);
89 
90 protected:
92  ~vtkImageReader();
93 
94  vtkTypeUInt64 DataMask;
95 
97 
98  void ComputeTransformedSpacing (double Spacing[3]);
99  void ComputeTransformedOrigin (double origin[3]);
100  void ComputeTransformedExtent(int inExtent[6],
101  int outExtent[6]);
102  void ComputeTransformedIncrements(vtkIdType inIncr[3],
103  vtkIdType outIncr[3]);
104 
105  int DataVOI[6];
106 
108 
109  virtual int RequestInformation(vtkInformation* request,
110  vtkInformationVector** inputVector,
111  vtkInformationVector* outputVector);
112 
114 private:
115  vtkImageReader(const vtkImageReader&); // Not implemented.
116  void operator=(const vtkImageReader&); // Not implemented.
117 };
118 
119 #endif
static vtkImageReader2 * New()
Store vtkAlgorithm input/output information.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void ExecuteData(vtkDataObject *data)
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:58
int vtkIdType
Definition: vtkType.h:255
vtkTypeUInt64 DataMask
a simple class to control print indentation
Definition: vtkIndent.h:37
Superclass of transformable binary file readers.
vtkTransform * Transform
Superclass of binary file readers.
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
char * ScalarArrayName
#define VTK_IO_EXPORT
general representation of visualization data
Definition: vtkDataObject.h:70