MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLCSO/CSOBase/CSOModuleBase/CSOConvertor.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00009 //----------------------------------------------------------------------------------
00010 
00011 #ifndef __CSOConvertor_H
00012 #define __CSOConvertor_H
00013 
00014 
00015 #include "CSOBaseModule.h"
00016 
00017 
00018 ML_START_NAMESPACE
00019 
00020 
00022 
00024 class MLCSO_EXPORT CSOConvertor : public CSOBaseModule
00025 {
00026 
00027 public:
00028 
00030   CSOConvertor(int numInImages=1, int numOutImages=1);
00031 
00032 protected:
00033 
00034   /* VIRTUAL METHODS */
00035 
00037   virtual ~CSOConvertor();
00039   virtual void activateAttachments();
00041   virtual void handleNotification(Field* field);
00043   virtual void calculateOutputImageProperties(int outIndex);
00047   virtual void _calcOutSubImageMinMaxValue(double& minValue, double& maxValue, MLDataType& dType);
00048 
00049 
00050   /* FIELDS */
00051 
00053   BaseField* _inCSOListFld;
00054 
00056   NotifyField* _clearFld;
00057 
00059   FloatField* _foregroundValueFld;
00061   FloatField* _backgroundValueFld;
00063   BoolField* _copyInputImageFld;
00064 
00066   BoolField* _fillSurfaceFld;
00067 
00069   BoolField* _useImageValuesFld;
00070 
00072   BoolField* _listenInteractionNotificationsFld;
00074   BoolField* _listenInteractionFinishedFld;
00075 
00077   IntField* _boundingBoxMarginFld;
00078 
00080   Vector3Field* _startVoxelBoundingBoxFld;
00082   Vector3Field* _endVoxelBoundingBoxFld;
00084   Vector3Field* _startWorldBoundingBoxFld;
00086   Vector3Field* _endWorldBoundingBoxFld;
00087 
00090   StringField* _voxelBoundingBoxStringFld;
00091 
00092 
00093   /* MEMBER VARIABLES */
00094 
00096   CSOList* _inCSOList;
00098   bool _hasValidVoxelData;
00100   bool _isInNotificationCB;
00102   bool _canProduceOutputImage;
00104   bool _shouldAugmentBoundingBoxZ;
00105 
00106   
00107   /* METHODS */
00108 
00110   virtual void _clear();
00112   virtual void _process();
00114   void _setBoundingBoxFields(const CSOBoundingBox& voxelBB, const CSOBoundingBox& worldBB);
00116   static void _csoListNotifcationCB(void* userData, int notificationFlag);
00117 
00118 private:
00119 
00120   ML_MODULE_CLASS_HEADER(CSOConvertor);
00121 };
00122 
00124 
00125 
00126 ML_END_NAMESPACE
00127 
00128 
00129 #endif // __CSOConvertor_H
00130