VTK  9.3.1
vtkNrrdReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
26 #ifndef vtkNrrdReader_h
27 #define vtkNrrdReader_h
28 
29 #include "vtkIOImageModule.h" // For export macro
30 #include "vtkImageReader.h"
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkCharArray;
34 
35 class VTKIOIMAGE_EXPORT vtkNrrdReader : public vtkImageReader
36 {
37 public:
38  vtkTypeMacro(vtkNrrdReader, vtkImageReader);
39  static vtkNrrdReader* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  int CanReadFile(VTK_FILEPATH const char* filename) override;
43 
44 protected:
45  vtkNrrdReader();
46  ~vtkNrrdReader() override;
47 
48  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
49  vtkInformationVector* outputVector) override;
50 
51  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
52  vtkInformationVector* outputVector) override;
53 
54  int ReadHeaderInternal(vtkCharArray* headerBuffer);
55  virtual int ReadHeader();
56  virtual int ReadHeader(vtkCharArray* headerBuffer);
57 
58  virtual int ReadDataAscii(vtkImageData* output);
59 
60  template <typename T>
61  int vtkNrrdReaderReadDataGZipTemplate(vtkImageData* output, T* outBuffer);
62  virtual int ReadDataGZip(vtkImageData* output);
63 
65 
66  enum
67  {
70  ENCODING_GZIP
71  };
72 
73  int Encoding;
74 
75 private:
76  vtkNrrdReader(const vtkNrrdReader&) = delete;
77  void operator=(const vtkNrrdReader&) = delete;
78 };
79 
80 VTK_ABI_NAMESPACE_END
81 #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:40
vtkStringArray * DataFiles
Definition: vtkNrrdReader.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass of transformable binary file readers.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
int CanReadFile(VTK_FILEPATH const char *) override
vtkImageReader itself can read raw binary files.
Read nrrd files file system.
Definition: vtkNrrdReader.h:35
#define VTK_FILEPATH
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.