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

mitkVolumeSplatFunction.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 __mitkVolumeSplatFunction_h
00012 #define __mitkVolumeSplatFunction_h
00013 
00014 #include "mitkObject.h"
00015 #include "mitkVisualizationIncludes.h"
00016 
00017 #define SPLAT_FORWARD 0
00018 #define SPLAT_BACKWARD 1
00019 
00020 #define SPLAT_SLICEX 0
00021 #define SPLAT_SLICEY 1
00022 #define SPLAT_SLICEZ 2
00023 
00024 #define SPLAT_OPACITY 0.98
00025 #define SPLAT_ZERO 0.000001f
00026 
00027 class mitkFootprint2DGaussian;
00028 class mitkFootprint1DGaussian;
00029 class mitkMatrix;
00030 class mitkScene;
00031 class mitkVolumeModel;
00032 
00033 struct mitkSplat
00034 {
00035 //  float m_Color[4];
00036 
00037     //volume information
00038     int   m_ScalarDataType;
00039     void  *m_ScalarDataPointer;
00040     int   m_DataIncrement[3];
00041     int   m_DataSize[3];
00042     float m_DataSpacing[3]; 
00043     
00044     //Shading
00045     int            m_Shading;   
00046     float          *m_RedDiffuseShadingTable;
00047     float          *m_GreenDiffuseShadingTable;
00048     float          *m_BlueDiffuseShadingTable;
00049     float          *m_RedSpecularShadingTable;
00050     float          *m_GreenSpecularShadingTable;
00051     float          *m_BlueSpecularShadingTable;     
00052     unsigned short *m_EncodedNormals;
00053     unsigned char  *m_GradientMagnitudes;   
00054 
00055     //Transfer Function
00056     int   m_TF_Dimension;
00057     int   m_TF_ScalarOpacityMaxX;
00058     int   m_TF_ScalarOpacityMaxY;   
00059     float *m_TF_ScalarOpacity;
00060     float *m_TF_GradientOpacity;
00061     float *m_TF_ScalarColorRed;
00062     float *m_TF_ScalarColorGreen;
00063     float *m_TF_ScalarColorBlue;
00064 
00065     //2DTFRGBA
00066     float *m_TF_2DOpacity; 
00067     float *m_TF_2DRed;
00068     float *m_TF_2DGreen;
00069     float *m_TF_2DBlue;
00070 
00071     //transformation matrix
00072     mitkMatrix *m_GridToView;
00073     mitkMatrix *m_GridToScreen;
00074     mitkMatrix *m_ProjectionToScreen;
00075     float      m_JacobCoeffNear;
00076     float      m_JacobCoeffScale;
00077 
00078     //footprint information
00079     mitkFootprint2DGaussian *m_Footprint;
00080     mitkFootprint1DGaussian *m_Footprint1D;
00081     float                   m_KernelRadii;
00082     float                   m_AdjustRadii;
00083     float                   m_Coeff;
00084 
00085     // classification and interpolation information
00086     int   m_InterpolationType;      
00087     int   m_ClassificationMethod;
00088 
00089     //Integral, MIP and X-Ray option information
00090     int m_Mode;
00091     enum
00092     {
00093         INTEGRAL,
00094         MOP
00095     };
00096     
00097     // image related information
00098     float         *m_SheetBuffer;
00099     float         *m_CompositeBuffer;
00100     unsigned char *m_Image;
00101     int           *m_RowBounds;
00102     int           *m_ImageMemorySize;
00103     int           *m_ImageInUseSize;
00104     int           *m_ImageOrigin;
00105 
00106     // splat order
00107     int m_SheetOrder;
00108     int m_XOrder;
00109     int m_YOrder;
00110     int m_ZOrder;
00111 
00112     //crop and clip information
00113     int   *m_CropBounds;
00114     float *m_ClipInformation;
00115     int   m_ClipCount;
00116     bool  m_NeedVoxelCull;
00117 
00118     //view and model information
00119     mitkScene        *m_Scene;
00120     mitkVolumeModel *m_Vol;
00121 
00122     //Grid sample distance
00123     int m_GridSampleDistance;
00124 
00125 };
00126 
00127 
00134 class MITK_VISUALIZATION_API mitkVolumeSplatFunction : public mitkObject
00135 {
00136 public:
00137     MITK_TYPE(mitkVolumeSplatFunction, mitkObject)
00138 
00139     virtual void PrintSelf(ostream &os);
00140 
00144     mitkVolumeSplatFunction();
00145 
00154     virtual bool IsParallel(){ return true; }
00155 
00161     virtual void Splat(mitkSplat *splatInform) = 0;
00162 
00163 protected:
00164     virtual ~mitkVolumeSplatFunction();
00165 
00166 private:
00167     mitkVolumeSplatFunction(const mitkVolumeSplatFunction&);
00168     void operator = (const mitkVolumeSplatFunction&);
00169 
00170 };
00171 
00172 
00173 //#define DEFINED_mitkVolumeSplatFunction
00174 
00175 
00176 
00177 #endif
00178 

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