00001
00002
00003
00004
00005
00006
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
00036
00037
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
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
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
00066 float *m_TF_2DOpacity;
00067 float *m_TF_2DRed;
00068 float *m_TF_2DGreen;
00069 float *m_TF_2DBlue;
00070
00071
00072 mitkMatrix *m_GridToView;
00073 mitkMatrix *m_GridToScreen;
00074 mitkMatrix *m_ProjectionToScreen;
00075 float m_JacobCoeffNear;
00076 float m_JacobCoeffScale;
00077
00078
00079 mitkFootprint2DGaussian *m_Footprint;
00080 mitkFootprint1DGaussian *m_Footprint1D;
00081 float m_KernelRadii;
00082 float m_AdjustRadii;
00083 float m_Coeff;
00084
00085
00086 int m_InterpolationType;
00087 int m_ClassificationMethod;
00088
00089
00090 int m_Mode;
00091 enum
00092 {
00093 INTEGRAL,
00094 MOP
00095 };
00096
00097
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
00107 int m_SheetOrder;
00108 int m_XOrder;
00109 int m_YOrder;
00110 int m_ZOrder;
00111
00112
00113 int *m_CropBounds;
00114 float *m_ClipInformation;
00115 int m_ClipCount;
00116 bool m_NeedVoxelCull;
00117
00118
00119 mitkScene *m_Scene;
00120 mitkVolumeModel *m_Vol;
00121
00122
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
00174
00175
00176
00177 #endif
00178