Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkVolumeRayCastFunction.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkVolumeRayCastFunction_h
00012 #define __mitkVolumeRayCastFunction_h
00013 
00014 #include "mitkObject.h"
00015 #include "mitkVolumeDivider.h"
00016 
00017 #define MITK_RAY_STATUS_START 0
00018 #define MITK_RAY_STATUS_CASTING 1
00019 #define MITK_RAY_STATUS_FCASTING 3
00020 #define MITK_RAY_STATUS_RCASTING 5
00021 #define MITK_RAY_STATUS_TERMINATED 8
00022 
00023 class mitkVector;
00024 class mitkVolumeModel;
00025 class mitkVolumeRendererRayCasting;
00026 class mitkVolume;
00027 struct mitkRay
00028 {
00029     float m_Color[4];       
00030     
00031     mitkVector *m_RayStart;
00032     mitkVector *m_RayEnd;
00033     mitkVector *m_RayDirection;
00034     mitkVector *m_RayIncrement;
00035     
00036     int m_NumberOfStepsToTake;
00037     int m_NumberOfStepsTaken;
00038     int m_RayStatus;
00039 
00040     //assistant information
00041     int   m_ScalarDataType;
00042     int   m_DataIncrement[3];
00043     int   m_DataSize[3];
00044     float m_DataSpacing[3];
00045     float m_DataOrigin[3];
00046     union
00047     {
00048         void  *m_ScalarDataPointer;
00049         void const **m_ScalarDataSlices; //in case of out-of-core data
00050         mitkVolume *m_ScalarDataVol;
00051     };
00052     
00053     int   m_InterpolationType;      
00054     int   m_ClassificationMethod;
00055 
00056     int   m_MIPFunction;
00057     int   m_MaximizeOpacity;
00058     int   m_ScalarValue;
00059     
00060     //Shading
00061     int   m_Shading;    
00062     float *m_RedDiffuseShadingTable;
00063     float *m_GreenDiffuseShadingTable;
00064     float *m_BlueDiffuseShadingTable;
00065     float *m_RedSpecularShadingTable;
00066     float *m_GreenSpecularShadingTable;
00067     float *m_BlueSpecularShadingTable;      
00068     
00069     union
00070     {
00071         unsigned short *m_EncodedNormals;
00072         unsigned short const **m_EncodedNormalSlices; //in case of out-of-core data
00073         mitkVolume *m_EncodedNormalVol;
00074     };
00075 
00076     union
00077     {
00078         unsigned char  *m_GradientMagnitudes;
00079         unsigned char const **m_GradientMagnitudeSlices; //in case of out-of-core data
00080         mitkVolume *m_GradientMagnitudeVol;
00081     };
00082 
00083     //Transfer Function
00084     int m_TF_Dimension;
00085     int m_TF_ScalarOpacityMaxX;
00086     int m_TF_ScalarOpacityMaxY; 
00087     float *m_TF_ScalarOpacity;
00088     float *m_TF_GradientOpacity;
00089     float *m_TF_ScalarColorRed;
00090     float *m_TF_ScalarColorGreen;
00091     float *m_TF_ScalarColorBlue;
00092 
00093     //2DTFRGBA
00094     float *m_TF_2DOpacity; 
00095     float *m_TF_2DRed;
00096     float *m_TF_2DGreen;
00097     float *m_TF_2DBlue;
00098 
00099     // For the out-of-core data which is divided into sub-blocks with different
00100     // size and organized to a BSP tree
00101     CuboidBSPTreeNode *m_CurCuboidNode;
00102     unsigned char m_BlockType;
00103 };
00104 
00110 class MITK_VISUALIZATION_API mitkVolumeRayCastFunction : public mitkObject
00111 {
00112 public:
00113     MITK_TYPE(mitkVolumeRayCastFunction,mitkObject) 
00114 
00115     virtual void PrintSelf(ostream& os);                
00116     
00123     virtual void CastRay(mitkRay *rayInfo) = 0;
00124     
00125 protected:
00126     mitkVolumeRayCastFunction();    
00127     virtual ~mitkVolumeRayCastFunction();   
00128 
00129 private:
00130     mitkVolumeRayCastFunction(const mitkVolumeRayCastFunction&);
00131     void operator=(const mitkVolumeRayCastFunction&);
00132     
00133 };
00134 
00135  
00136 //#define DEFINED_mitkVolumeRayCastFunction
00137  
00138 
00139 
00140 #endif
00141 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3