VTK  9.1.0
vtkSLCReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSLCReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
64 #ifndef vtkSLCReader_h
65 #define vtkSLCReader_h
66 
67 #include "vtkIOImageModule.h" // For export macro
68 #include "vtkImageReader2.h"
69 
70 class VTKIOIMAGE_EXPORT vtkSLCReader : public vtkImageReader2
71 {
72 public:
73  static vtkSLCReader* New();
74  vtkTypeMacro(vtkSLCReader, vtkImageReader2);
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
81  vtkGetMacro(Error, int);
83 
87  int CanReadFile(VTK_FILEPATH const char* fname) override;
91  const char* GetFileExtensions() override { return ".slc"; }
92 
96  const char* GetDescriptiveName() override { return "SLC"; }
97 
98 protected:
100  ~vtkSLCReader() override;
101 
102  // Reads the file name and builds a vtkStructuredPoints dataset.
104 
106  vtkInformationVector* outputVector) override;
107 
108  // Decodes an array of eight bit run-length encoded data.
109  unsigned char* Decode8BitData(unsigned char* in_ptr, int size);
110  int Error;
111 
112 private:
113  vtkSLCReader(const vtkSLCReader&) = delete;
114  void operator=(const vtkSLCReader&) = delete;
115 };
116 
117 #endif
vtkSLCReader::New
static vtkSLCReader * New()
vtkSLCReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSLCReader::ExecuteDataWithInformation
void ExecuteDataWithInformation(vtkDataObject *, vtkInformation *) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:46
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkSLCReader::CanReadFile
int CanReadFile(VTK_FILEPATH const char *fname) override
Is the given file an SLC file?
vtkSLCReader::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...
vtkSLCReader::GetFileExtensions
const char * GetFileExtensions() override
.slc
Definition: vtkSLCReader.h:91
vtkSLCReader::~vtkSLCReader
~vtkSLCReader() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkImageReader2
Superclass of binary file readers.
Definition: vtkImageReader2.h:162
vtkSLCReader::vtkSLCReader
vtkSLCReader()
vtkSLCReader::Error
int Error
Definition: vtkSLCReader.h:110
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkSLCReader
read an SLC volume file.
Definition: vtkSLCReader.h:71
vtkSLCReader::GetDescriptiveName
const char * GetDescriptiveName() override
SLC.
Definition: vtkSLCReader.h:96
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkImageReader2.h
vtkSLCReader::Decode8BitData
unsigned char * Decode8BitData(unsigned char *in_ptr, int size)