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

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 
00044 #ifndef __vtkSLCReader_h
00045 #define __vtkSLCReader_h
00046 
00047 #include "vtkImageReader2.h"
00048 
00049 class VTK_IO_EXPORT vtkSLCReader : public vtkImageReader2 
00050 {
00051 public:
00052   static vtkSLCReader *New();
00053   vtkTypeRevisionMacro(vtkSLCReader,vtkImageReader2);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057 
00058   vtkSetStringMacro(FileName);
00059   vtkGetStringMacro(FileName);
00061 
00063 
00064   vtkGetMacro(Error,int);
00066   
00068 
00069   int CanReadFile(const char* fname);
00070   // Description:
00071   // .slc
00072   virtual const char* GetFileExtensions()
00073     {
00074       return ".slc";
00075     }
00077 
00079 
00080   virtual const char* GetDescriptiveName()
00081     {
00082       return "SLC";
00083     }
00085   
00086 protected:
00087   vtkSLCReader();
00088   ~vtkSLCReader();
00089 
00090   // Reads the file name and builds a vtkStructuredPoints dataset.
00091   virtual void ExecuteData(vtkDataObject*);
00092 
00093   // Not used now, but will be needed when this is made into an 
00094   // imaging filter.
00095   // Sets WholeExtent, Origin, Spacing, ScalarType 
00096   // and NumberOfComponents of output.
00097   void ExecuteInformation();
00098   
00099   // Decodes an array of eight bit run-length encoded data.
00100   unsigned char *Decode8BitData( unsigned char *in_ptr, int size );
00101   int Error;
00102 private:
00103   vtkSLCReader(const vtkSLCReader&);  // Not implemented.
00104   void operator=(const vtkSLCReader&);  // Not implemented.
00105 };
00106 
00107 #endif
00108 
00109