00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkIsosurfaceVRScene_h
00011 #define __mitkIsosurfaceVRScene_h
00012
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "modules/mitkIsosurfaceVR.h"
00016 #include "mitkICVolume.h"
00017
00018 class mitkCoherentVolume;
00019
00027 class MITK_VISUALIZATION2_API mitkIsosurfaceVRScene : public mitkVis2Scene3D
00028 {
00029 public:
00030 MITK_TYPE(mitkIsosurfaceVRScene,mitkVis2Scene3D)
00031 mitkIsosurfaceVRScene();
00032
00036 virtual void RenderGL();
00037
00042 void SetData(mitkICVolume *data);
00043
00047 void SetDataModified();
00048
00053 void SetCoherentData(mitkCoherentVolume *CVolume);
00054
00058 void SetCoherentDataModified();
00059
00066 void SetBackGroundColor(float r,float g, float b);
00067
00074 void GetBackGroundColor(float& r,float& g,float& b);
00075
00080 void SetIsovalue(float isovalue);
00081
00086 float GetIsovalue();
00087
00094 void SetSurfaceColor(float r,float g,float b);
00095
00102 void GetSurfaceColor(float &r,float &g,float &b);
00103
00110 void SetLightDirection(float x,float y,float z);
00111
00116 void SetLightIntensity(float intensity);
00117
00124 void SetLightColor(float r,float g,float b);
00125
00130 void SetAmbient(float value);
00131
00136 float GetAmbient();
00137
00142 void SetDiffuse(float value);
00143
00148 float GetDiffuse();
00149
00154 void SetSpecular(float value);
00155
00160 float GetSpecular();
00161
00166 void SetSpecularPower(float value);
00167
00172 float GetSpecularPower();
00173
00178 void RotateLightDirection(bool turnOn);
00179
00183 virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00187 virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00191 virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00192
00197 void SetIllustrativeShading(int illustrative);
00198
00203 bool GetIllustrativeShading();
00204
00209 void SetCroppingBounds(const float CroppingBounds[6]);
00210
00215 void GetCroppingBounds(float CroppingBounds[6]);
00216
00217 mitkIsosurfaceVR& GetKernelModule() { return m_module; }
00218
00219
00220 protected:
00221 virtual ~mitkIsosurfaceVRScene();
00222 virtual void GetSize3D(float size[3]);
00223
00224 private:
00225 mitkIsosurfaceVRScene(const mitkIsosurfaceVRScene&);
00226 void operator = (const mitkIsosurfaceVRScene&);
00227
00228 private:
00229 mitkRCPtr<mitkICVolume> m_Data;
00230
00231
00232 mitkIsosurfaceVR m_module;
00233
00234 bool m_RotateLightDirection;
00235 bool m_RotatingLightDirection;
00236
00237 mitkVis2Vector4 m_OldLightDirection;
00238 };
00239
00240 #endif