VTK  9.0.1
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:
55  ~vtkNrrdReader() override;
56 
58  vtkInformationVector* outputVector) override;
59 
60  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
61  vtkInformationVector* outputVector) override;
62 
63  int ReadHeaderInternal(vtkCharArray* headerBuffer);
64  virtual int ReadHeader();
65  virtual int ReadHeader(vtkCharArray* headerBuffer);
66 
67  virtual int ReadDataAscii(vtkImageData* output);
68 
70 
71  enum
72  {
74  ENCODING_ASCII
75  };
76 
77  int Encoding;
78 
79 private:
80  vtkNrrdReader(const vtkNrrdReader&) = delete;
81  void operator=(const vtkNrrdReader&) = delete;
82 };
83 
84 #endif // vtkNrrdReader_h
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:36
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
Superclass of transformable binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Read nrrd files file system.
Definition: vtkNrrdReader.h:45
virtual int ReadDataAscii(vtkImageData *output)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStringArray * DataFiles
Definition: vtkNrrdReader.h:69
int ReadHeaderInternal(vtkCharArray *headerBuffer)
~vtkNrrdReader() override
int CanReadFile(const char *filename) override
static vtkNrrdReader * 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...
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called in response to a REQUEST_DATA request from the executive.
virtual int ReadHeader(vtkCharArray *headerBuffer)
virtual int ReadHeader()
a vtkAbstractArray subclass for strings