MeVisLabToolboxReference
|
00001 #ifndef __SoView2DOverlay_H 00002 #define __SoView2DOverlay_H 00003 //---------------------------------------------------------------------------------- 00004 // **InsertLicense** code 00005 //---------------------------------------------------------------------------------- 00007 00013 //---------------------------------------------------------------------------------- 00014 00015 #include "XVEnterScope.h" 00016 00017 #include <Inventor/fields/SoFields.h> 00018 00019 #include "XVLeaveScope.h" 00020 00021 #ifndef __SoView2DCallback_H 00022 #include "SoView2DCallback.h" 00023 #endif 00024 #ifndef __SoSFMLImage_H 00025 #include "SoSFMLImage.h" 00026 #endif 00027 00028 ML_START_NAMESPACE 00029 00030 class LUTFunction; 00031 template <typename T> class LUTData; 00032 00033 ML_END_NAMESPACE 00034 00035 class SoView2D; 00036 00037 00039 00043 class SOVIEW2D_API SoView2DOverlay : public SoView2DCallback { 00044 00045 SO_NODE_HEADER(SoView2DOverlay); 00046 00047 public: 00049 00051 SoSFMLImage image; 00053 SoSFBool cacheTextures; 00055 SoSFEnum blendMode; 00057 SoSFBool inheritFilterMode; 00059 SoSFEnum filterMode; 00061 SoSFFloat alphaFactor; 00063 SoSFColor baseColor; 00065 SoSFBool overwriteCurrentTimePoint; 00067 SoSFInt32 timePoint; 00069 SoSFInt32 maxTimePoint; 00071 SoSFEnum lutPrecision; 00072 00075 SoSFBool useWorldCoords; 00076 00078 SoSFBool applyLut; 00079 00081 SoSFBool isCheckerTiling; 00082 00084 SoSFInt32 checkerTileSize; 00085 00087 SoSFBool areCheckerTilesInverted; 00088 00090 00092 static void initClass(); 00093 00095 SoView2DOverlay(); 00096 00098 virtual void startDrawing(View2DSliceList *slicelist); 00100 virtual void endDrawing(View2DSliceList *slicelist); 00101 00103 virtual void draw(View2DSliceList *dsl, View2DSlice* dslice, int slice); 00104 00106 virtual bool evalEvent(SoView2D* view2d, View2DSliceList* slicelist, 00107 View2DEvent* ec, View2DEventPhase phase); 00108 00110 void GLRender(SoGLRenderAction *action); 00111 00112 protected: 00113 00115 ml::LUTData<MLuint8>* _lutData; 00116 00118 ml::LUTFunction* _lutFunction; 00119 00121 bool _reloadData; 00123 int _id; 00125 int _oldTimePoint; 00127 bool _oldUseWorldCoords; 00129 unsigned int _imageSerial; 00130 00132 virtual ~SoView2DOverlay(); 00137 virtual int getTimePoint(View2DSliceList *slicelist, int slice); 00138 }; 00139 #endif