00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkSLCReader.h,v $ 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 "vtkImageReader2.h" 00034 00035 class VTK_IO_EXPORT vtkSLCReader : public vtkImageReader2 00036 { 00037 public: 00038 static vtkSLCReader *New(); 00039 vtkTypeRevisionMacro(vtkSLCReader,vtkImageReader2); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00043 00044 vtkSetStringMacro(FileName); 00045 vtkGetStringMacro(FileName); 00047 00049 00050 vtkGetMacro(Error,int); 00052 00054 00055 int CanReadFile(const char* fname); 00056 // Description: 00057 // .slc 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 ExecuteData(vtkDataObject*); 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