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:
54  vtkNrrdReader();
55  ~vtkNrrdReader() override;
56 
57  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
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
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkImageReader
Superclass of transformable binary file readers.
Definition: vtkImageReader.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageReader::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkNrrdReader::DataFiles
vtkStringArray * DataFiles
Definition: vtkNrrdReader.h:69
vtkNrrdReader::Encoding
int Encoding
Definition: vtkNrrdReader.h:77
vtkImageReader::New
static vtkImageReader * New()
vtkCharArray
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:35
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkNrrdReader
Read nrrd files file system.
Definition: vtkNrrdReader.h:44
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkNrrdReader::ENCODING_RAW
@ ENCODING_RAW
Definition: vtkNrrdReader.h:73
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:36
vtkImageReader.h
vtkImageReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageReader::CanReadFile
int CanReadFile(const char *) override
vtkImageReader itself can read raw binary files.
Definition: vtkImageReader.h:97