VTK  9.7.1
vtkSLCReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
17 #ifndef vtkSLCReader_h
18 #define vtkSLCReader_h
19 
20 #include "vtkIOImageModule.h" // For export macro
21 #include "vtkImageReader2.h"
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKIOIMAGE_EXPORT vtkSLCReader : public vtkImageReader2
25 {
26 public:
27  static vtkSLCReader* New();
28  vtkTypeMacro(vtkSLCReader, vtkImageReader2);
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
35  vtkGetMacro(Error, int);
37 
38  using Superclass::CanReadFile;
42  int CanReadFile(VTK_FILEPATH const char* fname) override;
46  const char* GetFileExtensions() override { return ".slc"; }
47 
51  const char* GetDescriptiveName() override { return "SLC"; }
52 
53 protected:
54  vtkSLCReader();
55  ~vtkSLCReader() override;
56 
57  // Reads the file name and builds a vtkStructuredPoints dataset.
59 
60  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
61  vtkInformationVector* outputVector) override;
62 
63  // Decodes an array of eight bit run-length encoded data.
64  unsigned char* Decode8BitData(unsigned char* in_ptr, int size);
65  int Error;
66 
67 private:
68  vtkSLCReader(const vtkSLCReader&) = delete;
69  void operator=(const vtkSLCReader&) = delete;
70 };
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
static vtkImageReader2 * New()
Store vtkAlgorithm input/output information.
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:46
a simple class to control print indentation
Definition: vtkIndent.h:28
const char * GetDescriptiveName() override
SLC.
Definition: vtkSLCReader.h:51
Superclass of binary file readers.
#define VTK_FILEPATH
read an SLC volume file.
Definition: vtkSLCReader.h:24
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
virtual int CanReadFile(const char *fname)
Return non zero if the reader can read the given file name.
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:55