Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

IO/vtkSLCReader.h

Go to the documentation of this file.
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   // Not used now, but will be needed when this is made into an 
00080   // imaging filter.
00081   // Sets WholeExtent, Origin, Spacing, ScalarType 
00082   // and NumberOfComponents of output.
00083   void ExecuteInformation();
00084   
00085   // Decodes an array of eight bit run-length encoded data.
00086   unsigned char *Decode8BitData( unsigned char *in_ptr, int size );
00087   int Error;
00088 private:
00089   vtkSLCReader(const vtkSLCReader&);  // Not implemented.
00090   void operator=(const vtkSLCReader&);  // Not implemented.
00091 };
00092 
00093 #endif
00094 
00095