VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSLCReader.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00030 #ifndef vtkSLCReader_h 00031 #define vtkSLCReader_h 00032 00033 #include "vtkIOImageModule.h" // For export macro 00034 #include "vtkImageReader2.h" 00035 00036 class VTKIOIMAGE_EXPORT vtkSLCReader : public vtkImageReader2 00037 { 00038 public: 00039 static vtkSLCReader *New(); 00040 vtkTypeMacro(vtkSLCReader,vtkImageReader2); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 vtkSetStringMacro(FileName); 00046 vtkGetStringMacro(FileName); 00048 00050 00051 vtkGetMacro(Error,int); 00053 00055 int CanReadFile(const char* fname); 00057 00058 virtual const char* GetFileExtensions() 00059 { 00060 return ".slc"; 00061 } 00063 00065 00066 virtual const char* GetDescriptiveName() 00067 { 00068 return "SLC"; 00069 } 00071 00072 protected: 00073 vtkSLCReader(); 00074 ~vtkSLCReader(); 00075 00076 // Reads the file name and builds a vtkStructuredPoints dataset. 00077 virtual void ExecuteDataWithInformation(vtkDataObject*, vtkInformation*); 00078 00079 virtual int RequestInformation(vtkInformation* request, 00080 vtkInformationVector** inputVector, 00081 vtkInformationVector* outputVector); 00082 00083 // Decodes an array of eight bit run-length encoded data. 00084 unsigned char *Decode8BitData( unsigned char *in_ptr, int size ); 00085 int Error; 00086 private: 00087 vtkSLCReader(const vtkSLCReader&); // Not implemented. 00088 void operator=(const vtkSLCReader&); // Not implemented. 00089 }; 00090 00091 #endif 00092 00093