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

vtkUnstructuredGridLinearRayIntegrator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkUnstructuredGridLinearRayIntegrator.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 
00016 /*
00017  * Copyright 2004 Sandia Corporation.
00018  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00019  * license for use of this work by or on behalf of the
00020  * U.S. Government. Redistribution and use in source and binary forms, with
00021  * or without modification, are permitted provided that this Notice and any
00022  * statement of authorship are reproduced on all copies.
00023  */
00024 
00055 #ifndef __vtkUnstructuredGridLinearRayIntegrator_h
00056 #define __vtkUnstructuredGridLinearRayIntegrator_h
00057 
00058 #include "vtkUnstructuredGridVolumeRayIntegrator.h"
00059 
00060 class vtkLinearRayIntegratorTransferFunction;
00061 
00062 class VTK_RENDERING_EXPORT vtkUnstructuredGridLinearRayIntegrator : public vtkUnstructuredGridVolumeRayIntegrator
00063 {
00064 public:
00065   vtkTypeRevisionMacro(vtkUnstructuredGridLinearRayIntegrator,
00066                        vtkUnstructuredGridVolumeRayIntegrator);
00067   static vtkUnstructuredGridLinearRayIntegrator *New();
00068   virtual void PrintSelf(ostream &os, vtkIndent indent);
00069 
00070   virtual void Initialize(vtkVolumeProperty *property, vtkDataArray *scalars);
00071 
00072   virtual void Integrate(vtkDoubleArray *intersectionLengths,
00073                          vtkDataArray *nearIntersections,
00074                          vtkDataArray *farIntersections,
00075                          float color[4]);
00076 
00078 
00080   static void IntegrateRay(double length,
00081                            double intensity_front, double attenuation_front,
00082                            double intensity_back, double attenuation_back,
00083                            float color[4]);
00084   static void IntegrateRay(double length,
00085                            const double color_front[3],
00086                            double attenuation_front,
00087                            const double color_back[3],
00088                            double attenuation_back,
00089                            float color[4]);
00091 
00093 
00095   static float Psi(float length,
00096                    float attenuation_front, float attenuation_back);
00098 
00099 protected:
00100   vtkUnstructuredGridLinearRayIntegrator();
00101   ~vtkUnstructuredGridLinearRayIntegrator();
00102 
00103   vtkVolumeProperty *Property;
00104 
00105   vtkLinearRayIntegratorTransferFunction *TransferFunctions;
00106   vtkTimeStamp TransferFunctionsModified;
00107   int NumIndependentComponents;
00108 
00109 private:
00110   vtkUnstructuredGridLinearRayIntegrator(const vtkUnstructuredGridLinearRayIntegrator&);  // Not implemented.
00111   void operator=(const vtkUnstructuredGridLinearRayIntegrator&);  // Not implemented.
00112 };
00113 
00114 #endif //__vtkUnstructuredGridLinearRayIntegrator_h