From: <coe...@us...> - 2012-09-27 09:34:05
|
Revision: 426 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=426&view=rev Author: coertmetz Date: 2012-09-27 09:33:59 +0000 (Thu, 27 Sep 2012) Log Message: ----------- CM: Changed cout output to status field output. Modified Paths: -------------- trunk/Community/General/Modules/ML/MLXMarkerListCommunityModules/MLXMarkerListCommunityModules.def trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h Modified: trunk/Community/General/Modules/ML/MLXMarkerListCommunityModules/MLXMarkerListCommunityModules.def =================================================================== --- trunk/Community/General/Modules/ML/MLXMarkerListCommunityModules/MLXMarkerListCommunityModules.def 2012-09-27 07:46:30 UTC (rev 425) +++ trunk/Community/General/Modules/ML/MLXMarkerListCommunityModules/MLXMarkerListCommunityModules.def 2012-09-27 09:33:59 UTC (rev 426) @@ -87,6 +87,10 @@ Button update {} Field autoUpdate {} } + Separator {} + Field status { + edit = False + } } } } // MLModule XMarkerListFromFile Modified: trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp 2012-09-27 07:46:30 UTC (rev 425) +++ trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp 2012-09-27 09:33:59 UTC (rev 426) @@ -104,6 +104,9 @@ _updateFld = fields->addNotify("update"); _autoUpdateFld = fields->addBool("autoUpdate"); + // Status field + _statusFld = fields->addString("status", ""); + // Reactivate calls of handleNotification on field changes. handleNotificationOn(); } @@ -121,15 +124,15 @@ // Check for the display of keepVecInputAsIs if (_inputCoordinateSystemFld->getEnumValue()) { - _isVoxelFld->setBoolValue(true); + _isVoxelFld->setBoolValue(true); } else { - _isVoxelFld->setBoolValue(false); + _isVoxelFld->setBoolValue(false); } // Check if an input image is connected when coordinate system is set to voxel if (_inputCoordinateSystemFld->getEnumValue()==1 && !getUpdatedInImg(0)) { - std::cout << "When you select voxel as input coordinate system you should provide an input image!" << std::endl; + _statusFld->setStringValue("When you select voxel as input coordinate system you should provide an input image!"); return; } @@ -189,8 +192,11 @@ // Add marker to output list _outputXMarkerList.appendItem(marker); } + _statusFld->setStringValue("File successfully loaded!"); } else { - std::cout << "Cannot open file (" << filename << ")!" << std::endl; + std::stringstream outputString; + outputString << "Cannot open file (" << filename << ")!"; + _statusFld->setStringValue(outputString.str()); } } Modified: trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h =================================================================== --- trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h 2012-09-27 07:46:30 UTC (rev 425) +++ trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h 2012-09-27 09:33:59 UTC (rev 426) @@ -97,6 +97,9 @@ BaseField *_outputXMarkerListFld; XMarkerList _outputXMarkerList; + // Field to display status messages + StringField* _statusFld; + //@} //! Implements interface for the runtime type system of the ML. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |