IO/vtkSLCReader.h Source File

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