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 
36 #ifndef vtkNrrdReader_h
37 #define vtkNrrdReader_h
38 
39 #include "vtkIOImageModule.h" // For export macro
40 #include "vtkImageReader.h"
41 
42 class vtkCharArray;
43 
44 class VTKIOIMAGE_EXPORT vtkNrrdReader : public vtkImageReader
45 {
46 public:
47  vtkTypeMacro(vtkNrrdReader, vtkImageReader);
48  static vtkNrrdReader *New();
49  void PrintSelf(ostream &os, vtkIndent indent) override;
50 
51  int CanReadFile(const char *filename) override;
52 
53 protected:
54  vtkNrrdReader();
55  ~vtkNrrdReader() override;
56 
58  vtkInformationVector **inputVector,
59  vtkInformationVector *outputVector) override;
60 
61  int RequestData(vtkInformation *request,
62  vtkInformationVector **inputVector,
63  vtkInformationVector *outputVector) override;
64 
65  int ReadHeaderInternal(vtkCharArray *headerBuffer);
66  virtual int ReadHeader();
67  virtual int ReadHeader(vtkCharArray *headerBuffer);
68 
69  virtual int ReadDataAscii(vtkImageData *output);
70 
72 
73  enum {
75  ENCODING_ASCII
76  };
77 
78  int Encoding;
79 
80 private:
81  vtkNrrdReader(const vtkNrrdReader &) = delete;
82  void operator=(const vtkNrrdReader &) = delete;
83 };
84 
85 #endif //vtkNrrdReader_h
Store vtkAlgorithm input/output information.
a vtkAbstractArray subclass for strings
static vtkImageReader * New()
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:35
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
vtkStringArray * DataFiles
Definition: vtkNrrdReader.h:71
a simple class to control print indentation
Definition: vtkIndent.h:33
Superclass of transformable binary file readers.
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
Read nrrd files file system.
Definition: vtkNrrdReader.h:44
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.