00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkCUDAWallCarvingVRScene_h
00011 #define __mitkCUDAWallCarvingVRScene_h
00012
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDAWallCarvingVR.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019
00020 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAWallCarvingVRScene : public mitkVis2Scene3D
00021 {
00022 public:
00023 MITK_TYPE(mitkCUDAWallCarvingVRScene,mitkVis2Scene3D)
00024 mitkCUDAWallCarvingVRScene();
00025
00026 virtual void RenderGL();
00027
00028 void SetData(mitkICVolume *data);
00029 void SetDataModified();
00030
00031 void SetDistanceVolume(mitkICVolume *disVol);
00032 void SetDistanceModified();
00033
00034 void SetBackGroundColor(float r,float g, float b);
00035 void GetBackGroundColor(float &r,float &g, float &b);
00036
00037 mitkRGBATransferFunction1D* GetTransferFunction();
00038 void SetTransferFunction(mitkRGBATransferFunction1D* tf);
00039
00040 void SetShade(bool shade);
00041 bool GetShade();
00042
00043 void ShadeOn();
00044 void ShadeOff();
00045
00046 void SetZeroSurfaceColor(float r,float g, float b);
00047 void GetZeroSurfaceColor(float &r,float &g, float &b);
00048
00049 void SetZeroSurfaceAlpha(float alpha);
00050 float GetZeroSurfaceAlpha();
00051
00052 void SetLightDirection(float x,float y,float z);
00053 void GetLightDirection(float &x,float &y,float &z);
00054
00055 void SetLightIntensity(float intensity);
00056 void SetLightColor(float r,float g,float b);
00057 void SetAmbient(float value);
00058 float GetAmbient();
00059 void SetDiffuse(float value);
00060 float GetDiffuse();
00061 void SetSpecular(float value);
00062 float GetSpecular();
00063 void SetSpecularPower(float value);
00064 float GetSpecularPower();
00065 void RotateLightDirection(bool turnOn);
00066
00067 virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00068 virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00069 virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00070
00071 void SetIllustrativeShading(int illustrative);
00072 bool GetIllustrativeShading();
00073
00074 void SetCroppingBounds(const float CroppingBounds[6]);
00075 void GetCroppingBounds(float CroppingBounds[6]);
00076
00077 void SetDistanceIsovalue(float isoDistance);
00078 float GetDistanceIsovalue();
00079
00080 mitkCUDAWallCarvingVR& GetKernelModule() { return m_module; }
00081
00082 protected:
00083 virtual ~mitkCUDAWallCarvingVRScene();
00084 virtual void GetSize3D(float size[3]);
00085
00086 private:
00087 mitkCUDAWallCarvingVRScene(const mitkCUDAWallCarvingVRScene&);
00088 void operator = (const mitkCUDAWallCarvingVRScene&);
00089
00090 private:
00091 mitkRCPtr<mitkICVolume> m_Data;
00092 mitkRCPtr<mitkICVolume> m_Distance;
00093
00094 mitkRCPtr<mitkRGBATransferFunction1D> m_TF;
00095 mitkLocalVersion m_TFVersion;
00096
00097 mitkCUDAWallCarvingVR m_module;
00098
00099 bool m_glewInit;
00100 bool m_dataModified;
00101 bool m_disModified;
00102
00103 bool m_RotateLightDirection;
00104 bool m_RotatingLightDirection;
00105
00106 mitkVis2Vector4 m_OldLightDirection;
00107 };
00108
00109
00110 #endif