VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkUnstructuredGridLinearRayIntegrator.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 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 00045 #ifndef __vtkUnstructuredGridLinearRayIntegrator_h 00046 #define __vtkUnstructuredGridLinearRayIntegrator_h 00047 00048 #include "vtkRenderingVolumeModule.h" // For export macro 00049 #include "vtkUnstructuredGridVolumeRayIntegrator.h" 00050 00051 class vtkLinearRayIntegratorTransferFunction; 00052 class vtkVolumeProperty; 00053 00054 class VTKRENDERINGVOLUME_EXPORT vtkUnstructuredGridLinearRayIntegrator : public vtkUnstructuredGridVolumeRayIntegrator 00055 { 00056 public: 00057 vtkTypeMacro(vtkUnstructuredGridLinearRayIntegrator, 00058 vtkUnstructuredGridVolumeRayIntegrator); 00059 static vtkUnstructuredGridLinearRayIntegrator *New(); 00060 virtual void PrintSelf(ostream &os, vtkIndent indent); 00061 00062 virtual void Initialize(vtkVolume *volume, vtkDataArray *scalars); 00063 00064 virtual void Integrate(vtkDoubleArray *intersectionLengths, 00065 vtkDataArray *nearIntersections, 00066 vtkDataArray *farIntersections, 00067 float color[4]); 00068 00070 00072 static void IntegrateRay(double length, 00073 double intensity_front, double attenuation_front, 00074 double intensity_back, double attenuation_back, 00075 float color[4]); 00076 static void IntegrateRay(double length, 00077 const double color_front[3], 00078 double attenuation_front, 00079 const double color_back[3], 00080 double attenuation_back, 00081 float color[4]); 00083 00085 00087 static float Psi(float length, 00088 float attenuation_front, float attenuation_back); 00090 00091 protected: 00092 vtkUnstructuredGridLinearRayIntegrator(); 00093 ~vtkUnstructuredGridLinearRayIntegrator(); 00094 00095 vtkVolumeProperty *Property; 00096 00097 vtkLinearRayIntegratorTransferFunction *TransferFunctions; 00098 vtkTimeStamp TransferFunctionsModified; 00099 int NumIndependentComponents; 00100 00101 private: 00102 vtkUnstructuredGridLinearRayIntegrator(const vtkUnstructuredGridLinearRayIntegrator&); // Not implemented. 00103 void operator=(const vtkUnstructuredGridLinearRayIntegrator&); // Not implemented. 00104 }; 00105 00106 #endif //__vtkUnstructuredGridLinearRayIntegrator_h