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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 
00034 #ifndef __vtkSLCReader_h
00035 #define __vtkSLCReader_h
00036 
00037 #include "vtkImageReader2.h"
00038 
00039 class VTK_IO_EXPORT vtkSLCReader : public vtkImageReader2 
00040 {
00041 public:
00042   static vtkSLCReader *New();
00043   vtkTypeRevisionMacro(vtkSLCReader,vtkImageReader2);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047 
00048   vtkSetStringMacro(FileName);
00049   vtkGetStringMacro(FileName);
00051 
00053 
00054   vtkGetMacro(Error,int);
00056   
00058 
00059   int CanReadFile(const char* fname);
00060   // Description:
00061   // .slc
00062   virtual const char* GetFileExtensions()
00063     {
00064       return ".slc";
00065     }
00067 
00069 
00070   virtual const char* GetDescriptiveName()
00071     {
00072       return "SLC";
00073     }
00075   
00076 protected:
00077   vtkSLCReader();
00078   ~vtkSLCReader();
00079 
00080   // Reads the file name and builds a vtkStructuredPoints dataset.
00081   virtual void ExecuteData(vtkDataObject*);
00082 
00083   // Not used now, but will be needed when this is made into an 
00084   // imaging filter.
00085   // Sets WholeExtent, Origin, Spacing, ScalarType 
00086   // and NumberOfComponents of output.
00087   void ExecuteInformation();
00088   
00089   // Decodes an array of eight bit run-length encoded data.
00090   unsigned char *Decode8BitData( unsigned char *in_ptr, int size );
00091   int Error;
00092 private:
00093   vtkSLCReader(const vtkSLCReader&);  // Not implemented.
00094   void operator=(const vtkSLCReader&);  // Not implemented.
00095 };
00096 
00097 #endif
00098 
00099