00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkCUDAROIDistanceVRScene_h
00011 #define __mitkCUDAROIDistanceVRScene_h
00012
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDAROIDistanceVR.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019
00020 class mitkSegmentedVolumeLut;
00021
00028 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAROIDistanceVRScene : public mitkVis2Scene3D
00029 {
00030 public:
00031 MITK_TYPE(mitkCUDAROIDistanceVRScene,mitkVis2Scene3D)
00032 mitkCUDAROIDistanceVRScene();
00033
00037 virtual void RenderGL();
00038
00043 void SetData(mitkICVolume *data);
00044
00049 void SetMaskVolume(mitkICVolume *data);
00050
00055 mitkICVolume* GetMaskVolume();
00056
00060 void SetDataModified();
00061
00065 void SetMaskModified();
00066
00071 void SetCurrentROI(int index);
00072
00079 void SetBackGroundColor(float r,float g, float b);
00080
00087 void GetBackGroundColor(float &r,float &g, float &b);
00088
00093 void SetBackGroundIsovalue(float isovalue_bg);
00094
00099 float GetBackGroundIsovalue();
00100
00105 void SetDistanceIsovalue(float isoDistance);
00106
00111 float GetDistanceIsovalue();
00112
00120 void SetDistanceSurfaceColor(float r,float g,float b, float a);
00121
00129 void GetDistanceSurfaceColor(float &r,float &g,float &b, float &a);
00130
00135 mitkRGBATransferFunction1D* GetTransferFunction(int index);
00136
00141 void SetTransferFunction(int index, mitkRGBATransferFunction1D* tf);
00142
00148 void SetStdSampleDistance(float stdSampleDistance);
00149
00155 float GetStdSampleDistance();
00156
00163 void SetLightDirection(float x,float y,float z);
00164
00171 void GetLightDirection(float &x,float &y,float &z);
00172
00177 void SetLightIntensity(float intensity);
00178
00185 void SetLightColor(float r,float g,float b);
00186
00191 void SetAmbient(float value);
00192
00197 float GetAmbient();
00198
00203 void SetDiffuse(float value);
00204
00209 float GetDiffuse();
00210
00215 void SetSpecular(float value);
00216
00221 float GetSpecular();
00222
00227 void SetSpecularPower(float value);
00228
00233 float GetSpecularPower();
00234
00239 void RotateLightDirection(bool turnOn);
00240
00244 virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00248 virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00252 virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00253
00258 void SetIllustrativeShading(int illustrative);
00259
00264 bool GetIllustrativeShading();
00265
00270 void SetCroppingBounds(const float CroppingBounds[6]);
00271
00276 void GetCroppingBounds(float CroppingBounds[6]);
00277
00278 mitkCUDAROIDistanceVR& GetKernelModule() { return m_module; }
00279
00280 protected:
00281 virtual ~mitkCUDAROIDistanceVRScene();
00282 virtual void GetSize3D(float size[3]);
00283
00284 private:
00285 mitkCUDAROIDistanceVRScene(const mitkCUDAROIDistanceVRScene&);
00286 void operator = (const mitkCUDAROIDistanceVRScene&);
00287
00288 void _initDistanceColorMap();
00289
00290 private:
00291 mitkRCPtr<mitkICVolume> m_Data;
00292 mitkRCPtr<mitkICVolume> m_Mask;
00293 mitkRCPtr<mitkICVolume> m_Distance;
00294
00295 mitkRCPtr<mitkRGBATransferFunction1D>* m_TFs;
00296 mitkLocalVersion* m_TFVersions;
00297
00298 int m_SampleNumber;
00299
00300 mitkSegmentedVolumeLut *m_CPU_LUT;
00301
00302 mitkCUDAROIDistanceVR m_module;
00303
00304 bool m_glewInit;
00305 bool m_dataModified;
00306 bool m_maskModified;
00307 bool m_disModified;
00308
00309 bool m_RotateLightDirection;
00310 bool m_RotatingLightDirection;
00311
00312 mitkVis2Vector4 m_OldLightDirection;
00313 };
00314
00315
00316 #endif