VTK  9.1.0
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
42class vtkCharArray;
43
44class VTKIOIMAGE_EXPORT vtkNrrdReader : public vtkImageReader
45{
46public:
48 static vtkNrrdReader* New();
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
51 int CanReadFile(VTK_FILEPATH const char* filename) override;
52
53protected:
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
69 template <typename T>
71 virtual int ReadDataGZip(vtkImageData* output);
72
74
75 enum
76 {
79 ENCODING_GZIP
80 };
81
83
84private:
85 vtkNrrdReader(const vtkNrrdReader&) = delete;
86 void operator=(const vtkNrrdReader&) = delete;
87};
88
89#endif // vtkNrrdReader_h
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:68
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
Superclass of transformable binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:113
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:73
int ReadHeaderInternal(vtkCharArray *headerBuffer)
static vtkNrrdReader * New()
~vtkNrrdReader() override
int CanReadFile(VTK_FILEPATH const char *filename) override
int vtkNrrdReaderReadDataGZipTemplate(vtkImageData *output, T *outBuffer)
virtual int ReadDataGZip(vtkImageData *output)
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
#define VTK_FILEPATH