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 00027 #ifndef __vtkSLCReader_h 00028 #define __vtkSLCReader_h 00029 00030 #include "vtkImageReader2.h" 00031 00032 class VTK_IO_EXPORT vtkSLCReader : public vtkImageReader2 00033 { 00034 public: 00035 static vtkSLCReader *New(); 00036 vtkTypeRevisionMacro(vtkSLCReader,vtkImageReader2); 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 00040 00041 vtkSetStringMacro(FileName); 00042 vtkGetStringMacro(FileName); 00044 00046 00047 vtkGetMacro(Error,int); 00049 00051 00052 int CanReadFile(const char* fname); 00053 // Description: 00054 // .slc 00055 virtual const char* GetFileExtensions() 00056 { 00057 return ".slc"; 00058 } 00060 00062 00063 virtual const char* GetDescriptiveName() 00064 { 00065 return "SLC"; 00066 } 00068 00069 protected: 00070 vtkSLCReader(); 00071 ~vtkSLCReader(); 00072 00073 // Reads the file name and builds a vtkStructuredPoints dataset. 00074 virtual void ExecuteData(vtkDataObject*); 00075 00076 virtual int RequestInformation(vtkInformation* request, 00077 vtkInformationVector** inputVector, 00078 vtkInformationVector* outputVector); 00079 00080 // Decodes an array of eight bit run-length encoded data. 00081 unsigned char *Decode8BitData( unsigned char *in_ptr, int size ); 00082 int Error; 00083 private: 00084 vtkSLCReader(const vtkSLCReader&); // Not implemented. 00085 void operator=(const vtkSLCReader&); // Not implemented. 00086 }; 00087 00088 #endif 00089 00090