00001 // Slice orientation markers utility class 00002 // 00003 // Mike Heck, FEI/VSG, March 2016 00004 00006 // 00007 // This class is part of the Open Inventor Medical utility library. 00008 // 00009 // The medical utility classes are provided as a prebuilt library named 00010 // "fei_inventor_medical", that can be used directly in an Open Inventor 00011 // application. The classes in the prebuilt library are documented and 00012 // supported by FEI. These classes are also provided as source code. 00013 // 00014 // Please see $OIVHOME/include/Medical/InventorMedical.h for the full text. 00015 // 00017 00018 #ifndef _SLICE_ORIENTATION_MARKERS_H_ 00019 #define _SLICE_ORIENTATION_MARKERS_H_ 00020 00021 #include <Inventor/nodes/SoAnnotation.h> 00022 00023 #include <Inventor/fields/SoSFEnum.h> 00024 #include <Inventor/fields/SoSFFloat.h> 00025 #include <Inventor/fields/SoSFString.h> 00026 00027 class SoFont; 00028 class SoFieldSensor; 00029 class SoText2; 00030 class SoTranslation; 00031 00085 class INVENTORMEDICAL_API SliceOrientationMarkers : public SoAnnotation { 00086 00087 SO_NODE_HEADER(SliceOrientationMarkers); 00088 00089 public: 00092 SoSFEnum axis; 00093 00096 SoSFFloat offset; 00097 00100 SoSFString fontName; 00101 00103 SoSFFloat fontSize; 00104 00106 static void initClass(); 00107 00109 static void exitClass(); 00110 00112 SliceOrientationMarkers(); 00113 00114 private: 00116 virtual ~SliceOrientationMarkers(); 00117 00119 void updateLetters(); 00120 00121 SoRef<SoFont> m_fontNode; 00122 00123 SoText2* m_textNodes[4]; 00124 SoTranslation* m_tranNodes[4]; 00125 00126 SoFieldSensor* m_axisSensor; 00127 SoFieldSensor* m_offsetSensor; 00128 static void fieldSensorCB( void* data, SoSensor* sensor ); 00129 }; 00130 00131 #endif 00132