VTK
vtkNrrdReader.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkNrrdReader.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 /*----------------------------------------------------------------------------
17  Copyright (c) Sandia Corporation
18  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
19 ----------------------------------------------------------------------------*/
20 
42 #ifndef vtkNrrdReader_h
43 #define vtkNrrdReader_h
44 
45 #include "vtkIOImageModule.h" // For export macro
46 #include "vtkImageReader.h"
47 
48 class vtkCharArray;
49 
50 class VTKIOIMAGE_EXPORT vtkNrrdReader : public vtkImageReader
51 {
52 public:
53  vtkTypeMacro(vtkNrrdReader, vtkImageReader);
54  static vtkNrrdReader *New();
55  virtual void PrintSelf(ostream &os, vtkIndent indent);
56 
57  virtual int CanReadFile(const char *filename);
58 
59 protected:
60  vtkNrrdReader();
61  ~vtkNrrdReader();
62 
63  virtual int RequestInformation(vtkInformation *request,
64  vtkInformationVector **inputVector,
65  vtkInformationVector *outputVector);
66 
67  virtual int RequestData(vtkInformation *request,
68  vtkInformationVector **inputVector,
69  vtkInformationVector *outputVector);
70 
71  int ReadHeaderInternal(vtkCharArray *headerBuffer);
72  virtual int ReadHeader();
73  virtual int ReadHeader(vtkCharArray *headerBuffer);
74 
75  virtual int ReadDataAscii(vtkImageData *output);
76 
78 
79  enum {
81  ENCODING_ASCII
82  };
83 
84  int Encoding;
85 
86 private:
87  vtkNrrdReader(const vtkNrrdReader &) VTK_DELETE_FUNCTION;
88  void operator=(const vtkNrrdReader &) VTK_DELETE_FUNCTION;
89 };
90 
91 #endif //vtkNrrdReader_h
Store vtkAlgorithm input/output information.
a vtkAbstractArray subclass for strings
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
static vtkImageReader * New()
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:38
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
vtkStringArray * DataFiles
Definition: vtkNrrdReader.h:77
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass of transformable binary file readers.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
Read nrrd files file system.
Definition: vtkNrrdReader.h:50
Store zero or more vtkInformation instances.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.