VTK  9.0.20201201
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 
25 #ifndef vtkSLCReader_h
26 #define vtkSLCReader_h
27 
28 #include "vtkIOImageModule.h" // For export macro
29 #include "vtkImageReader2.h"
30 
31 class VTKIOIMAGE_EXPORT vtkSLCReader : public vtkImageReader2
32 {
33 public:
34  static vtkSLCReader* New();
35  vtkTypeMacro(vtkSLCReader, vtkImageReader2);
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
42  vtkGetMacro(Error, int);
44 
48  int CanReadFile(const char* fname) override;
52  const char* GetFileExtensions() override { return ".slc"; }
53 
57  const char* GetDescriptiveName() override { return "SLC"; }
58 
59 protected:
60  vtkSLCReader();
61  ~vtkSLCReader() override;
62 
63  // Reads the file name and builds a vtkStructuredPoints dataset.
65 
66  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
67  vtkInformationVector* outputVector) override;
68 
69  // Decodes an array of eight bit run-length encoded data.
70  unsigned char* Decode8BitData(unsigned char* in_ptr, int size);
71  int Error;
72 
73 private:
74  vtkSLCReader(const vtkSLCReader&) = delete;
75  void operator=(const vtkSLCReader&) = delete;
76 };
77 
78 #endif
vtkImageReader2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageReader2::ExecuteDataWithInformation
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSLCReader::GetFileExtensions
const char * GetFileExtensions() override
.slc
Definition: vtkSLCReader.h:52
vtkImageReader2::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...
vtkImageReader2::New
static vtkImageReader2 * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkX3D::size
Definition: vtkX3D.h:259
vtkImageReader2
Superclass of binary file readers.
Definition: vtkImageReader2.h:52
vtkSLCReader::Error
int Error
Definition: vtkSLCReader.h:71
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkSLCReader
read an SLC volume file.
Definition: vtkSLCReader.h:31
vtkSLCReader::GetDescriptiveName
const char * GetDescriptiveName() override
SLC.
Definition: vtkSLCReader.h:57
vtkImageReader2::CanReadFile
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
Definition: vtkImageReader2.h:283
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkImageReader2.h