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