VTK
dox/IO/vtkSLCReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSLCReader.h
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   vtkTypeMacro(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   int CanReadFile(const char* fname);
00056 
00057   virtual const char* GetFileExtensions()
00058     {
00059       return ".slc";
00060     }
00062 
00064 
00065   virtual const char* GetDescriptiveName()
00066     {
00067       return "SLC";
00068     }
00070   
00071 protected:
00072   vtkSLCReader();
00073   ~vtkSLCReader();
00074 
00075   // Reads the file name and builds a vtkStructuredPoints dataset.
00076   virtual void ExecuteData(vtkDataObject*);
00077 
00078   virtual int RequestInformation(vtkInformation* request,
00079                                  vtkInformationVector** inputVector,
00080                                  vtkInformationVector* outputVector);
00081   
00082   // Decodes an array of eight bit run-length encoded data.
00083   unsigned char *Decode8BitData( unsigned char *in_ptr, int size );
00084   int Error;
00085 private:
00086   vtkSLCReader(const vtkSLCReader&);  // Not implemented.
00087   void operator=(const vtkSLCReader&);  // Not implemented.
00088 };
00089 
00090 #endif
00091 
00092