You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(144) |
Jul
(5) |
Aug
(23) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(34) |
Apr
(1) |
May
(10) |
Jun
(12) |
Jul
(17) |
Aug
(28) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(3) |
2011 |
Jan
(4) |
Feb
(7) |
Mar
(5) |
Apr
(1) |
May
|
Jun
(15) |
Jul
(1) |
Aug
(7) |
Sep
(9) |
Oct
(3) |
Nov
|
Dec
(1) |
2012 |
Jan
(1) |
Feb
(13) |
Mar
(6) |
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bro...@us...> - 2009-07-29 06:02:56
|
Revision: 179 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=179&view=rev Author: broersen Date: 2009-07-29 06:02:47 +0000 (Wed, 29 Jul 2009) Log Message: ----------- ENH: Added conversion to load correct MeVisLab data types from different Matlab data types Modified Paths: -------------- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp Modified: trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2009-07-26 07:59:11 UTC (rev 178) +++ trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2009-07-29 06:02:47 UTC (rev 179) @@ -222,6 +222,7 @@ _statusFld->setStringValue("Matlab script contains errors!"); _clearAllVariables(); } + mxDestroyArray(mtmp); mtmp = NULL; } // If the script string was not valid, clear all data so that // the user notes this. @@ -283,48 +284,76 @@ // Proof if Matlab is started. if (!_checkMatlabIsStarted()) { - std::cerr << "calcOutImageProps(): Cannot finding matlab engine!" << std::endl << std::flush; + std::cerr << "calcOutImageProps(): Cannot find Matlab engine!" << std::endl << std::flush; return; } // Get variable name in the matlab workspace of the output image std::string outname = _outDataNameFld[outIndex]->getStringValue(); + mxArray *m_pImage = engGetVariable(m_pEngine, outname.c_str()); - // Get the size of the image via the matlab workspace - std::ostringstream dim; - dim << "mevtmpdim=size(" << outname << ")"; - engEvalString(m_pEngine, dim.str().c_str()); - mxArray *m_Y = engGetVariable(m_pEngine, "mevtmpdim"); - - // If we could find the variable and calculate its size, go on. - if(m_Y != NULL) + // If we can find the variable and calculate its size, go on. + if(m_pImage != NULL) { - const mwSize m_numDims = mxGetN(m_Y); - double *ext = static_cast<double*>(mxGetPr(m_Y)); + const mwSize m_numDims = mxGetNumberOfDimensions(m_pImage); Vector outExt = Vector(1,1,1,1,1,1); for (size_t i=0; i<m_numDims; i++) { - outExt[i] = static_cast<MLint>(ext[i]); + outExt[i] = static_cast<MLint>(mxGetDimensions(m_pImage)[i]); } // Set page size. getOutImg(outIndex)->setPageExt(outExt); // Set output image size. getOutImg(outIndex)->setImgExt(outExt); // Set output image datatype. - getOutImg(outIndex)->setDataType(MLdoubleType); - mxDestroyArray(m_Y); - m_Y = NULL; - // Delete temp variable. - engEvalString(m_pEngine, "clear mevtmpdim"); + switch (mxGetClassID(m_pImage)) { + case mxDOUBLE_CLASS: + getOutImg(outIndex)->setDataType(MLdoubleType); + break; + case mxSINGLE_CLASS: + getOutImg(outIndex)->setDataType(MLfloatType); + break; + case mxINT8_CLASS: + getOutImg(outIndex)->setDataType(MLint8Type); + break; + case mxUINT8_CLASS: + getOutImg(outIndex)->setDataType(MLuint8Type); + break; + case mxINT16_CLASS: + getOutImg(outIndex)->setDataType(MLint16Type); + break; + case mxUINT16_CLASS: + getOutImg(outIndex)->setDataType(MLuint16Type); + break; + case mxINT32_CLASS: + getOutImg(outIndex)->setDataType(MLint32Type); + break; + case mxUINT32_CLASS: + getOutImg(outIndex)->setDataType(MLuint32Type); + break; + case mxINT64_CLASS: // Matlab does not support basic operations on this type + //getOutImg(outIndex)->setDataType(MLint64Type); + //break; + default: + getOutImg(outIndex)->setDataType(ML_BAD_DATA_TYPE); + std::cerr << "calcOutImageProps(): Output type from Matlab not supported!" << std::endl << std::flush; + } + mxDestroyArray(m_pImage); m_pImage = NULL; // Get min and max values in matlab workspace and set them in MeVisLab - std::ostringstream minmaxCommand, maxCommand; + std::ostringstream minmaxCommand; minmaxCommand << "mevtmpminval = min(" << outname << "(:));" << "mevtmpmaxval = max(" << outname << "(:));"; engEvalString(m_pEngine, minmaxCommand.str().c_str()); mxArray *minVal = engGetVariable(m_pEngine, "mevtmpminval"); mxArray *maxVal = engGetVariable(m_pEngine, "mevtmpmaxval"); - getOutImg(outIndex)->setMinVoxelValue(*static_cast<double*>(mxGetPr(minVal))); - getOutImg(outIndex)->setMaxVoxelValue(*static_cast<double*>(mxGetPr(maxVal))); + // if min and max are not defined, set default values + if ((minVal==NULL) || (minVal==NULL)) { + getOutImg(outIndex)->setMinVoxelValue(0); + getOutImg(outIndex)->setMaxVoxelValue(127); + } else { + getOutImg(outIndex)->setMinVoxelValue(mxGetScalar(minVal)); + getOutImg(outIndex)->setMaxVoxelValue(mxGetScalar(maxVal)); + } mxDestroyArray(minVal); minVal = NULL; mxDestroyArray(maxVal); maxVal = NULL; engEvalString(m_pEngine, "clear mevtmpminval mevtmpmaxval"); @@ -372,16 +401,51 @@ } // Get matlab image data. - mxArray *m_Y = engGetVariable(m_pEngine, (_outDataNameFld[outIndex]->getStringValue()).c_str()); + mxArray *m_pImage = engGetVariable(m_pEngine, (_outDataNameFld[outIndex]->getStringValue()).c_str()); - if ( (m_Y != NULL) ) - { - // Copy images back from matlab. - TSubImg<MLdouble> subImgBuf(outSubImg->getBox(), MLdoubleType, mxGetPr(m_Y)); - outSubImg->copySubImage(subImgBuf); - - mxDestroyArray(m_Y); - m_Y = NULL; + if ( (m_pImage != NULL) ) { + // Copy different types of images from Matlab. + switch (mxGetClassID(m_pImage)) { + case mxDOUBLE_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLdoubleType, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxSINGLE_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLfloatType, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxINT8_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLint8Type, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxUINT8_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLuint8Type, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxINT16_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLint16Type, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxUINT16_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLuint16Type, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxINT32_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLint32Type, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxUINT32_CLASS: { + SubImg subImgBuf(outSubImg->getBox(), MLuint32Type, mxGetPr(m_pImage)); + outSubImg->copySubImage(subImgBuf); + } break; + case mxINT64_CLASS: // Matlab does not support basic operations on this type + //SubImg subImgBuf(outSubImg->getBox(), MLint64Type, mxGetPr(m_pImage)); + //outSubImg->copySubImage(subImgBuf); + //} break; + default: + std::cerr << "calcOutSubImage(): Output type from Matlab not supported!" << std::endl << std::flush; + } + mxDestroyArray(m_pImage); m_pImage = NULL; } else { @@ -476,7 +540,7 @@ // Internal loop. size_t i = 0; - // Get names form gui. + // Get names from GUI. std::ostringstream inXMarkerStr, outXMarkerStr; inXMarkerStr << _inXMarkerNameFld->getStringValue(); outXMarkerStr << _outXMarkerNameFld->getStringValue(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ss...@us...> - 2009-07-26 07:59:19
|
Revision: 178 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=178&view=rev Author: ssaur Date: 2009-07-26 07:59:11 +0000 (Sun, 26 Jul 2009) Log Message: ----------- added module AscendingAortaDetection Added Paths: ----------- trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/ trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.def trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/html/ trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/html/AscendingAortaDetection.html trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.bat trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.pro trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.sh trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.cpp trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.h trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionSystem.h trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.cpp trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.h Added: trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.def =================================================================== --- trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.def (rev 0) +++ trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.def 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,96 @@ +//---------------------------------------------------------------------------------- +//! CVLAscendingAortaDetection module definitions. +/*! +// \file CVLAscendingAortaDetection.def +// \author Stefan Saur +// \date 2007-03-24 +// +*/ +//---------------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------------- +// MLModule AscendingAortaDetection +//---------------------------------------------------------------------------------- +MLModule AscendingAortaDetection { + DLL = "CVLAscendingAortaDetection" + + genre = "" + author = "Stefan Saur" + status = "stable" + comment = "Automatic detection of the ascending aorta in computed tomography coronary angiography data sets." + keywords = "" + seeAlso = "" + documentation = "$(LOCAL)/html/AscendingAortaDetection.html" + + Window { + Category "Main" { + + Box "Input" { + Field primaryThreshold {} + Field secondaryThreshold {} + Field minDiameter {} + Field maxDiameter {} + Field distanceCluster {} + Field increment {} + Field ratioLimit {} + Field useRatioLimit {} + Field startSearchArea {} + Field endSearchArea {} + } // Box "input" + + Box "Output" { + Field seedPoint { edit = NO } + Field runTime { edit = NO } + } // Box "output" + + Horizontal { + Field autoApply {} + Button apply {} + } + + + } // Category "Main" + + Category "LargestCluster" { + Field priClusterSize { title = "ClusterSize" edit = NO } + Field priMeanIntensity { title = "MeanIntensity" edit = NO } + Field priStdIntensity { title = "StdIntensity" edit = NO } + Field priBaryCenter { title = "BaryCenter" edit = NO } + Field priLowerCenter { title = "LowerCenter" edit = NO } + Field priUpperCenter { title = "UpperCenter" edit = NO } + Field priRadiusBC { title = "RadiusBaryCenter" edit = NO } + Field priBBLower { title = "BbLower" edit = NO } + Field priBBUpper { title = "BbUpper" edit = NO } + Field extensionLargestCluster { title = "Extension" edit = NO } + Field meanRadiusLargestCluster { title = "MeanRadisu" edit = NO } + Field stdRadiusLargestCluster { title = "StdRadius" edit = NO } + } // Category "LargestCluster" + + Category "SecondLargestCluster" { + Field secClusterSize { title = "ClusterSize" edit = NO } + Field secMeanIntensity { title = "MeanIntensity" edit = NO } + Field secStdIntensity { title = "StdIntensity" edit = NO } + Field secBaryCenter { title = "BaryCenter" edit = NO } + Field secLowerCenter { title = "LowerCenter" edit = NO } + Field secUpperCenter { title = "UpperCenter" edit = NO } + Field secRadiusBC { title = "RadiusBaryCenter" edit = NO } + Field secBBLower { title = "BbLower" edit = NO } + Field secBBUpper { title = "BbUpper" edit = NO } + Field extensionSecondLargestCluster { title = "Extension" edit = NO } + Field meanRadiusSecondLargestCluster { title = "MeanRadius" edit = NO } + Field stdRadiusSecondLargestCluster { title = "StdRadius" edit = NO } + } // Category "SecondLargestCluster" + + Category "Info" { + Vertical { expandY = yes + TextView info { + autoApply = yes + mw = 400 + mh = 300 + } // TextView + } // Vertical + } // Category "Info" + } // Window + +} // MLModule AscendingAortaDetection \ No newline at end of file Added: trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/html/AscendingAortaDetection.html =================================================================== --- trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/html/AscendingAortaDetection.html (rev 0) +++ trunk/Community/General/Modules/ML/CVLAscendingAortaDetection/html/AscendingAortaDetection.html 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,195 @@ +<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + + + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + + <meta name="Description" content="Template for an ILAB module"> + + + <title>AscendingAortaDetection</title> +<!--===============================================================--><!-- CommandBox --><!--===============================================================--> +</head> + + +<body> + +<center><a href="#Purpose">Purpose</a> +<a href="#Usage">Usage</a> +<a href="#Inputs">Inputs</a> +<a href="#Outputs">Outputs</a> +<a href="#Parameters">Parameters</a> +<a href="#EventInteract">Events&Interaction</a> +<a href="#Example">Example</a> +<a href="#Tips&Tricks">Tips&Tricks</a> +<a href="#KnownBugs">Known Bugs</a> +<hr width="100%"></center> + +<h2> +AscendingAortaDetection</h2> + +<h3> +<a name="Purpose"></a>Purpose</h3> + +<blockquote> + <p> +The <b>AscendingAorataDetection</b> module allows to detect the ascending aorta within a computed tomography coronary angiography (CTCA) data set. With some parameter changes, it is also possible to detect the descending aorta. The module is based on the publication<br/> +<br/> +<i>Automatic Ascending Aorta Detection in CTA Datasets</i><br/> +Stefan C. Saur and Caroline K\xFChnel and Tobias Boskamp and G\xE1bor Sz\xE9kely and Philippe Cattin<br/> +Bildverarbeitung f\xFCr die Medizin 2008<br/> +<a href="ftp://ftp.vision.ee.ethz.ch/publications/proceedings/eth_biwi_00536.pdf">Download paper in pdf format</a> + + </p> + +</blockquote> + +<h3> +<a name="Usage"></a>Usage</h3> + +<blockquote> +<p> + Just connect the input image, adapt the parameters (per default, they are set to detect the ascending aorta) and press the <b>Apply</b> button to start the detection. As output, the world coordinates of a seed point within the ascending aorta is given. Further, all candidate points are given at the output <b>outXMarkerList</b>. The candidate points from largest cluster representing the ascending aorta are given at the output <b>outXMarkerListLargestCluster</b> whereas the candidates from the second largest cluster are given at <b>outXMarkerListSecondLargestCluster</b>. +</p> +</blockquote> + +<h3> +<a name="Inputs"></a>Inputs</h3> + +<blockquote> +The module has one input image which will be internally casted to MLuint16type. +</blockquote> + +<h3> +<a name="Outputs"></a>Outputs</h3> + +<blockquote> +The module has three XMarkerLists as output\ +<ul> + <li><b>outXMarkerList</b>: all candidate points as determined by the algorithm. Points from different clusters have a different XMarker <i>type</i> property.</li> + <li><b>outXMarkerListLargestCluster</b>: all candidate points from the largest cluster.</li> + <li><b>outXMarkerListSecondLargestCluster</b>: all candidate points from the second largest cluster.</li> +</ul> +</blockquote> + +<h3> +<a name="Parameters"></a>Parameters</h3> + +<blockquote> + + <h4><b>Main</b></h4> + + + <ul> + <li><span style="font-weight: bold;">Primary Threshold</span>: primary threshold th_p in gray values.</li> + <li><span style="font-weight: bold;">Secondary Threshold</span>: secondary threshold th_s in gray values.</li> + <li><span style="font-weight: bold;">Min Diameter</span>: minimum diameter d_min in mm.</li> + <li><span style="font-weight: bold;">Max Diameter</span>: maximum diameter d_max in mm.</li> + <li><span style="font-weight: bold;">Distance Cluster</span>: distance limit for clustering d_clust.</li> + <li><span style="font-weight: bold;">Increment</span>: increment of search ray delta_x, delta_y, delta_z.</li> + <li><span style="font-weight: bold;">Radio Limit</span>: ratio a.</li> + <li><span style="font-weight: bold;">Use Ratio Limit</span>: if checked, ratio criterion is applied in the detection process.</li> + <li><span style="font-weight: bold;">Start Search Area</span>: start of search range VOI_x, VOI_y, VOI_z.</li> + <li><span style="font-weight: bold;">End Search Area</span>: end of search range VOI_x, VOI_y, VOI_z.</li> + <li><span style="font-weight: bold;">Seed Point</span>: seed point within the ascending aorta.</li> + <li><span style="font-weight: bold;">Run Time</span>: run time of the algorithm in seconds.</li> + <li><span style="font-weight: bold;">Auto Apply</span>: if checked, the algorithm is triggered upon connection of an input image.</li> + <li><span style="font-weight: bold;">Apply</span>: manually run algorithm.</li> + + <li><span style="font-weight: bold;">CommandList</span>: List of fields that should be touched. One field per line in the form <i>moduleName.fieldName</i>.</li> + + + <li><span style="font-weight: bold;">Apply</span>: Touch all fields one after the other as listed in <b>CommandList</b>.</li> + + </ul> + +</blockquote> + +<blockquote> + +<h4>LargestCluster</h4> + Statistical information about the detected largest cluster. + <ul> + <li><span style="font-weight: bold;">ClusterSize</span>: size of cluster i.e. number of candidate points.</li> + <li><span style="font-weight: bold;">MeanIntensity</span>: mean intensity within bounding box.</li> + <li><span style="font-weight: bold;">StdIntensity</span>: std intensity within bounding box.</li> + <li><span style="font-weight: bold;">BaryCenter</span>: barycenter of cluster.</li> + <li><span style="font-weight: bold;">LowerCenter</span>: center point at lower extend (z smallest) of cluster.</li> + <li><span style="font-weight: bold;">UpperCenter</span>: center point at upper extend (z largest) of cluster.</li> + <li><span style="font-weight: bold;">RadiusBaryCenter</span>: radius at bary center of cluster.</li> + <li><span style="font-weight: bold;">BbLower</span>: bounding box for cluster (see source code on how it is defined).</li> + <li><span style="font-weight: bold;">BbUpper</span>: bounding box for cluster (see source code on how it is defined).</li> + <li><span style="font-weight: bold;">Extension</span>: exentsion in z direction in mm.</li> + <li><span style="font-weight: bold;">MeanRadius</span>: mean radius in mm of candidates points within cluster.</li> + <li><span style="font-weight: bold;">StdRadius</span>: std of radius in mm of candidates points within cluster.</li> + </ul> +</blockquote> + +<blockquote> + +<h4>SecondLargestCluster</h4> + Statistical information about the detected second largest cluster (equivalent to the information for the largest cluster). + <ul> + <li><span style="font-weight: bold;">ClusterSize</span>: size of cluster i.e. number of candidate points.</li> + <li><span style="font-weight: bold;">MeanIntensity</span>: mean intensity within bounding box.</li> + <li><span style="font-weight: bold;">StdIntensity</span>: std intensity within bounding box.</li> + <li><span style="font-weight: bold;">BaryCenter</span>: barycenter of cluster.</li> + <li><span style="font-weight: bold;">LowerCenter</span>: center point at lower extend (z smallest) of cluster.</li> + <li><span style="font-weight: bold;">UpperCenter</span>: center point at upper extend (z largest) of cluster.</li> + <li><span style="font-weight: bold;">RadiusBaryCenter</span>: radius at bary center of cluster.</li> + <li><span style="font-weight: bold;">BbLower</span>: bounding box for cluster (see source code on how it is defined).</li> + <li><span style="font-weight: bold;">BbUpper</span>: bounding box for cluster (see source code on how it is defined).</li> + <li><span style="font-weight: bold;">Extension</span>: exentsion in z direction in mm.</li> + <li><span style="font-weight: bold;">MeanRadius</span>: mean radius in mm of candidates points within cluster.</li> + <li><span style="font-weight: bold;">StdRadius</span>: std of radius in mm of candidates points within cluster.</li> + </ul> +</blockquote> + +<blockquote> +<h4>Info</h4> + <ul> + <li><span style="font-weight: bold;">Info</span>: Textfield providing additional output information from the algorithm.</li> + </ul> +</blockquote> + + + + + + <h3> + </h3> + + + <h3> + <a name="EventInteract"></a>Events & Interaction</h3> + + + <blockquote>None.</blockquote> + + + <h3> + <a name="Example"></a>Example</h3> + + + <blockquote>None.</blockquote> + + + <h3> + <a name="Tips&Tricks"></a>Tips & Tricks</h3> + + + <blockquote>None.</blockquote> + + + <h3> + <a name="KnownBugs"></a>Known Bugs</h3> + + + <blockquote>None.</blockquote> + +</blockquote> + +</body> +</html> Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.bat =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.bat (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.bat 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1 @@ +"%MLAB_ROOT%\MeVis\Foundation\BuildTools\Scripts\createProject.bat" CVLAscendingAortaDetection Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.pro =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.pro (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.pro 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,40 @@ +# --------- CVLAscendingAortaDetection profile ------------------- +# +# Platform independent project and build file for +# project CVLAscendingAortaDetection. +# + +TARGET = CVLAscendingAortaDetection + +DESTDIR = ../../../lib +DLLDESTDIR = ../../../lib + +# add dependencies of this project here + +CONFIG += dll ML MLTools MLBase + +# set high warn level (warn 4 on MSCV) +WARN = HIGH + + +MLAB_PACKAGES += MeVisLab_Standard + +# make sure that this file is included after CONFIG and MLAB_PACKAGES +include ($(MLAB_MeVis_Foundation)/Configuration/IncludePackages.pri) + +DEFINES += CVLASCENDINGAORTADETECTION_EXPORTS + +HEADERS += \ + CVLAscendingAortaDetectionInit.h \ + CVLAscendingAortaDetectionSystem.h \ + mlAscendingAortaDetection.h + +SOURCES += \ + CVLAscendingAortaDetectionInit.cpp \ + mlAscendingAortaDetection.cpp + +# additional files that are NOT compiled +RELATEDFILES += \ + ../../../Modules/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.def + + Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.sh =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.sh (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetection.sh 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,2 @@ +#!/bin/bash +python $MLAB_ROOT/MeVis/Foundation/BuildTools/Scripts/createProject.py CVLAscendingAortaDetection \ No newline at end of file Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.cpp =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.cpp (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.cpp 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,48 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. +/*! +// \file CVLAscendingAortaDetectionInit.cpp +// \author Stefan Saur +// \date 2007-03-24 +// +*/ +//---------------------------------------------------------------------------------- + + +// Local includes +#ifndef __CVLAscendingAortaDetectionSystem_H +#include "CVLAscendingAortaDetectionSystem.h" +#endif + +// Include definition of ML_INIT_LIBRARY. +#ifndef __mlLibraryInitMacros_H +#include "mlLibraryInitMacros.h" +#endif + +// Include all module headers ... +#ifndef __mlAscendingAortaDetection_H +#include "mlAscendingAortaDetection.h" +#endif + +ML_START_NAMESPACE + +//---------------------------------------------------------------------------------- +//! Calls init functions of all modules to add their types to the runtime type +//! system of the ML. +//---------------------------------------------------------------------------------- +int CVLAscendingAortaDetectionInit (void) +{ + ML_TRACE_IN("CVLAscendingAortaDetectionInit ()") + + AscendingAortaDetection::initClass(); + // Add initClass calls from all other modules here... + + return 1; +} + +ML_END_NAMESPACE + + +//! Calls the init method implemented above during load of shared library. +ML_INIT_LIBRARY(CVLAscendingAortaDetectionInit) + Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.h =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.h (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionInit.h 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,26 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. +/*! +// \file CVLAscendingAortaDetectionInit.h +// \author Stefan Saur +// \date 2007-03-24 +// +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __CVLAscendingAortaDetectionInit_H +#define __CVLAscendingAortaDetectionInit_H + + +ML_START_NAMESPACE + +//! Calls init functions of all modules to add their types to the runtime type +//! system of the ML. +int CVLAscendingAortaDetectionInit (void); + +ML_END_NAMESPACE + +#endif // __CVLAscendingAortaDetectionInit_H + + Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionSystem.h =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionSystem.h (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/CVLAscendingAortaDetectionSystem.h 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,34 @@ +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations. +/*! +// \file CVLAscendingAortaDetectionSystem.h +// \author Stefan Saur +// \date 2007-03-24 +// +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __CVLAscendingAortaDetectionSystem_H +#define __CVLAscendingAortaDetectionSystem_H + + +// DLL export macro definition +#ifdef WIN32 +#ifdef CVLASCENDINGAORTADETECTION_EXPORTS +// Use the CVLASCENDINGAORTADETECTION_EXPORT macro to export classes and functions +#define CVLASCENDINGAORTADETECTION_EXPORT __declspec(dllexport) +#else +// If included by external modules, exported symbols are declared as import symbols +#define CVLASCENDINGAORTADETECTION_EXPORT __declspec(dllimport) +#endif + +#else +// No export declarations are necessary for non-Windows systems +#define CVLASCENDINGAORTADETECTION_EXPORT +#endif + + +#endif // __CVLAscendingAortaDetectionSystem_H + + Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.cpp =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.cpp (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.cpp 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,875 @@ +//---------------------------------------------------------------------------------- +//! The ML module class AscendingAortaDetection. +/*! +// \file mlAscendingAortaDetection.h +// \author Stefan Saur +// \date 2007-03-24 +// +// as published and described in +// "Automatic Ascending Aorta Detection in CTA Datasets" +// ftp://ftp.vision.ee.ethz.ch/publications/proceedings/eth_biwi_00536.pdf +// +// @InProceedings{eth_biwi_00536, +// author = {Stefan C. Saur and Caroline K\"uhnel and Tobias Boskamp and G\xE1bor Sz\xE9kely and Philippe Cattin}, +// title = {Automatic Ascending Aorta Detection in CTA Datasets}, +// booktitle = {Bildverarbeitung f\xFCr der Medizin 2008}, +// year = {2008}, +// month = {April}, +// pages = {323-327}} +// +// This code was created by support of the research project Co-Me (http://co-me.ch) +// at the Computer Vision Laboratory of ETH Zurich (http://www.vision.ee.ethz.ch) +// +// YOU MUST CITE THIS PAPER WHEN USING THE ALGORITHM IN YOUR PUBLICATION +*/ +//---------------------------------------------------------------------------------- + + +// Local includes +#ifndef __mlAscendingAortaDetection_H +#include "mlAscendingAortaDetection.h" +#endif + +ML_START_NAMESPACE + +//! Implements code for the runtime type system of the ML +ML_BASEOP_CLASS_SOURCE(AscendingAortaDetection, BaseOp); + + +bool sortClusterPoints(XMarker elem1, XMarker elem2) +{ + return (elem1.z() < elem2.z()); +} + + +//---------------------------------------------------------------------------------- +//! Constructor +//---------------------------------------------------------------------------------- +AscendingAortaDetection::AscendingAortaDetection (void) + : BaseOp(1, 0) // in, out +{ + ML_TRACE_IN("AscendingAortaDetection::AscendingAortaDetection()") + + FieldContainer *fields = getFieldContainer(); + + // Suppress calls of handleNotification on field changes. + handleNotificationOff(); + + // input parameters + // primary threshold th_p in gray values + (_primaryThresholdFld = fields->addInt("primaryThreshold"))->setIntValue(1204); + // secondary threshold th_s in gray values + (_secondaryThresholdFld = fields->addInt("secondaryThreshold"))->setIntValue(1124); + // minimum diameter d_min in mm + (_minDiameterFld = fields->addInt("minDiameter"))->setIntValue(20); + // maximum diameter d_max in mm + (_maxDiameterFld = fields->addInt("maxDiameter"))->setIntValue(70); + // increment of search ray delta_x, delta_y, delta_z + (_incrementFld = fields->addVec3f("increment"))->setVec3fValue(vec3(1.0, 5.0, 1.0)); + // search range VOI_x, VOI_y, VOI_z + (_startSearchAreaFld = fields->addVec3f("startSearchArea"))->setVec3fValue(vec3(0.0, 0.25, 0.5)); + (_endSearchAreaFld = fields->addVec3f("endSearchArea"))->setVec3fValue(vec3(0.75, 0.70, 1.0)); + // ratio a + (_ratioLimitFld = fields->addDouble("ratioLimit"))->setDoubleValue(0.25); + (_useRatioLimitFld = fields->addBool("useRatioLimit"))->setBoolValue(true); + // distance limit for clustering d_clust + (_distanceClusterFld = fields->addVec3f("distanceCluster"))->setVec3fValue(vec3(5.0, 5.0, 5.0)); + + // apply + (_applyFld = fields->addNotify("apply")); + (_autoApplyFld = fields->addBool("autoApply"))->setBoolValue(false); + + // output + (_outXMarkerListFld = fields->addBase("outXMarkerList"))->setBaseValue(&_outXMarkerList); + (_outXMarkerListLargestClusterFld = fields->addBase("outXMarkerListLargestCluster"))->setBaseValue(&_outLargestCluster); + (_outXMarkerListSecondLargestClusterFld = fields->addBase("outXMarkerListSecondLargestCluster"))->setBaseValue(&_outSecondLargestCluster); + + // seedpoint for subsequent aorta segmentation as described in paper + (_seedPointFld = fields->addVec3f("seedPoint"))->setVec3fValue(vec3(0, 0, 0)); + + // primary / largest cluster + // size of cluster i.e. number of candidate points + (_priClusterSizeFld = fields->addInt("priClusterSize"))->setIntValue(0); + // mean intensity within bounding box + (_priMeanIntensityFld = fields->addDouble("priMeanIntensity"))->setDoubleValue(0.0); + // mean intensity within bounding box + (_priStdIntensityFld = fields->addDouble("priStdIntensity"))->setDoubleValue(0.0); + // barycenter of cluster + (_priBaryCenterFld = fields->addVec3f("priBaryCenter"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + // center point at lower extend (z smallest) of cluster + (_priLowerCenterFld = fields->addVec3f("priLowerCenter"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + // center point at upper extend (z largest) of cluster + (_priUpperCenterFld = fields->addVec3f("priUpperCenter"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + // radius at bary center of cluster + (_priRadiusBCFld = fields->addVec2f("priRadiusBC"))->setVec2fValue(vec2(0.0, 0.0)); + // bounding box for cluster (see computation on how it is defined) + (_priBBLowerFld = fields->addVec3f("priBBLower"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + (_priBBUpperFld = fields->addVec3f("priBBUpper"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + // exentsion in z direction in mm + (_extensionLargestClusterFld = fields->addDouble("extensionLargestCluster"))->setDoubleValue(0.0); + // mean radius in mm of candidates points within largest cluster + (_meanRadiusLargestClusterFld = fields->addDouble("meanRadiusLargestCluster"))->setDoubleValue(0.0); + // std of radius in mm of candidates points within largest cluster + (_stdRadiusLargestClusterFld = fields->addDouble("stdRadiusLargestCluster"))->setDoubleValue(0.0); + + + // secondary / second largest cluster + // description equivalent to largest cluster + (_secClusterSizeFld = fields->addInt("secClusterSize"))->setIntValue(0); + (_secMeanIntensityFld = fields->addDouble("secMeanIntensity"))->setDoubleValue(0.0); + (_secStdIntensityFld = fields->addDouble("secStdIntensity"))->setDoubleValue(0.0); + (_secBaryCenterFld = fields->addVec3f("secBaryCenter"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + (_secLowerCenterFld = fields->addVec3f("secLowerCenter"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + (_secUpperCenterFld = fields->addVec3f("secUpperCenter"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + (_secRadiusBCFld = fields->addVec2f("secRadiusBC"))->setVec2fValue(vec2(0.0, 0.0)); + (_secBBLowerFld = fields->addVec3f("secBBLower"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + (_secBBUpperFld = fields->addVec3f("secBBUpper"))->setVec3fValue(vec3(0.0, 0.0, 0.0)); + (_extensionSecondLargestClusterFld = fields->addDouble("extensionSecondLargestCluster"))->setDoubleValue(0.0); + (_meanRadiusSecondLargestClusterFld = fields->addDouble("meanRadiusSecondLargestCluster"))->setDoubleValue(0.0); + (_stdRadiusSecondLargestClusterFld = fields->addDouble("stdRadiusSecondLargestCluster"))->setDoubleValue(0.0); + + // info + (_infoFld = fields->addString("info"))->setStringValue(""); + + // statistic + (_runTimeFld = fields->addDouble("runTime"))->setDoubleValue(0.0); + + _applyFld->attachField(_outXMarkerListFld); + _applyFld->attachField(_outXMarkerListLargestClusterFld); + _applyFld->attachField(_outXMarkerListSecondLargestClusterFld); + + _virtInVol = NULL; + _outXMarkerList.clear(); + _outLargestCluster.clear(); + _outSecondLargestCluster.clear(); + + + // Reactivate calls of handleNotification on field changes. + handleNotificationOn(); +} + +//---------------------------------------------------------------------------------- +//! Destructor +//---------------------------------------------------------------------------------- +AscendingAortaDetection::~AscendingAortaDetection(void) +{ + ML_TRACE_IN("AscendingAortaDetection::~AscendingAortaDetection()") + ML_DELETE(_virtInVol); +} + +//---------------------------------------------------------------------------------- +//! Handle field changes of the field \c field. +//---------------------------------------------------------------------------------- +void AscendingAortaDetection::handleNotification (Field *field) +{ + ML_TRACE_IN("AscendingAortaDetection::handleNotification()") + + if ( (field == _applyFld) && (getUpdatedInImg(0)) ) { + _process(); + } + if ((field == getInField(0)) && getUpdatedInImg(0) && _autoApplyFld->getBoolValue() ) { + _process(); + } +} + + +//---------------------------------------------------------------------------------- +//! Main routine for the detection of the ascending aorta. +//---------------------------------------------------------------------------------- +void AscendingAortaDetection::_process() +{ + ML_TRACE_IN("AscendingAortaDetection::_process()") + _ss.str(""); + + // ++++++++++++++ TIME MEASUREMENT START ++++++++++++++ // + TimeCounter timeWhole; + + // any problems creating the virtual volume from the input volume? + if (!_initVirtualVolumes()) { + return; + } + + + // now we can process + int i, j; // loop variables + + // virtual volume is casted to MLuint16 + TVirtualVolume<MLuint16> vInVol(*_virtInVol); + + _outXMarkerList.clear(); + + Vector imgExt = getInImg(0)->getImgExt(); + vec3 voxSize = getInImg(0)->getVoxelSize(); + + vec3 startArea = _startSearchAreaFld->getVec3fValue(); // parameter where to start looking for aorta + vec3 endArea = _endSearchAreaFld->getVec3fValue(); // parameter where to stop looking for aorta + + TimeCounter timeCandidates; + + // read thresholds + unsigned primeThreshold = _primaryThresholdFld->getIntValue(); + unsigned secondThreshold = _secondaryThresholdFld->getIntValue(); + + + // determine search line distance + vec3 increment = _incrementFld->getVec3fValue(); + // convert mm to voxcel unit + int incX = increment[0] / voxSize[0]; + int incY = increment[1] / voxSize[1]; + int incZ = increment[2] / voxSize[2]; + + // minimum step size is 1 + if (incX < 1) { + incX = 1; + } + + if (incY < 1) { + incY = 1; + } + + if (incZ < 1) { + incZ = 1; + } + + _ss << "search ray increment " << incX << " | " << incY << " | " << incZ << " voxels" << std::endl; + + // search range in z direction + for (int z = imgExt[2]*startArea[2]; z < imgExt[2]*endArea[2]; z+=incZ) + { + // search range in y direction + for (int y = imgExt[1]*startArea[1]; y < imgExt[1]*endArea[1]; y+=incY) + { + int startX = 0; + int stopX = 0; + bool isPrimaryThreshold = false; + + // search range in x direction + for (int x = imgExt[0]*startArea[0]; x < imgExt[0]*endArea[0]; x+=incX) + { + int value = vInVol.getVoxel(Vector(x, y, z, 0, 0, 0)); + + // primary threshold is obtained for the first time for a object + if ( (!isPrimaryThreshold) && (value > _primaryThresholdFld->getIntValue()) ) { + isPrimaryThreshold = true; + startX = x; + stopX = x; + } + // candidate mode, primary threshold was triggered, looking for transition to secondary threshold + else if ( (isPrimaryThreshold) && (value > _primaryThresholdFld->getIntValue()) ) { + stopX = x; + } + // transition under secondary threshold + else if ( (isPrimaryThreshold) && (value < _secondaryThresholdFld->getIntValue()) ) { + double diameterX = (stopX - startX) * voxSize[0]; + // check if diameter is within allowed range for aorta + if ( (diameterX > _minDiameterFld->getIntValue()) && (diameterX < _maxDiameterFld->getIntValue()) ) { + int centerX = (stopX+startX)/2; + + // now look in y direction for this point + int startY = y; + int stopY = y; + int loopY = y; // just a loop variable + + int value = vInVol.getVoxel(Vector(centerX, loopY, z, 0, 0, 0)); + // first look for transition to the front + while ( (loopY>0) && (value > _secondaryThresholdFld->getIntValue()) ) + { + if (value > _primaryThresholdFld->getIntValue()) { + startY--; + } + loopY--; + value = vInVol.getVoxel(Vector(centerX, loopY, z, 0, 0, 0)); + } + + // now look for transition to the back + loopY = y; + value = vInVol.getVoxel(Vector(centerX, loopY, z, 0, 0, 0)); + while ( (loopY<imgExt[1]-1) && (value > _secondaryThresholdFld->getIntValue()) ) + { + if (value > _primaryThresholdFld->getIntValue()) { + stopY++; + } + loopY++; + value = vInVol.getVoxel(Vector(centerX, loopY, z, 0, 0, 0)); + } + + double diameterY = (stopY - startY) * voxSize[1]; + + // check if diameter is within allowed range for aorta + if ( (diameterY > _minDiameterFld->getIntValue()) && (diameterY < _maxDiameterFld->getIntValue()) ) + { + bool isRatioLimitOk = true; + + // should ratio limit be considered + if (_useRatioLimitFld->isOn()) { + isRatioLimitOk = (fabs(diameterY / diameterX - 1.0) < _ratioLimitFld->getDoubleValue() ); + } + + if (isRatioLimitOk) { + int centerY = (stopY+startY)/2; + vec3 voxPos = vec3(centerX, centerY, z); + + double diameterDiag1 = _singleRayBothDirections(voxPos, vec3(1, -1, 0), imgExt, primeThreshold, secondThreshold, voxSize); + double diameterDiag2 = _singleRayBothDirections(voxPos, vec3(1, 1, 0), imgExt, primeThreshold, secondThreshold, voxSize); + + if ( (diameterDiag1 > _minDiameterFld->getIntValue()) && (diameterDiag1 < _maxDiameterFld->getIntValue()) + && (diameterDiag2 > _minDiameterFld->getIntValue()) && (diameterDiag2 < _maxDiameterFld->getIntValue())) { + vec3 worldPos; + getInImg(0)->transformToWorldCoord(voxPos, worldPos); + XMarker tmpMarker = XMarker(worldPos); + tmpMarker.vec[0] = diameterX / 2.0; + tmpMarker.vec[1] = diameterY / 2.0; + tmpMarker.type = 0; + _outXMarkerList.push_back(tmpMarker); + } + } + } + } + + isPrimaryThreshold = false; + } + } + } + } + + _ss << "TIME AscendingAortaDetection.GetCandidates : " << timeCandidates.getRunningTimeInSeconds() << std::endl; + + + TimeCounter timeClustering; + + + // make clusters (assume a maximum number of 512 clusters) + int counter[512]; + for (j=0; j<512; j++) { + counter[j] = 0; + } + + int currClusterLabel = 1; + + for (i=0; i<_outXMarkerList.getSize(); i++) + { + XMarker *currXMarker = (XMarker*)_outXMarkerList.getItemAt(i); + int tmpClusterLabel; + // XMarker already belongs to cluster + if (currXMarker->type > 0) { + tmpClusterLabel = currXMarker->type; + } + // new cluster + else { + currXMarker->type = currClusterLabel; + tmpClusterLabel = currClusterLabel; + currClusterLabel++; + } + + // merge clusters if distance is within an ellipsoid + // + // ellipsoid equation + // x^2/a^2 + y^2/b^2 + z^2/c^2 = 1 + + vec3 distanceCluster = _distanceClusterFld->getVec3fValue(); + double a = distanceCluster[0]; + double b = distanceCluster[1]; + double c = distanceCluster[2]; + + for (j=0; j<_outXMarkerList.getSize(); j++) + { + if (j!=i) { + XMarker *tmpXMarker = (XMarker*)_outXMarkerList.getItemAt(j); + // compute distance between two XMarkers + // XMarker positions are stored in world coordinates + double distanceSquare = (currXMarker->x()-tmpXMarker->x()) * (currXMarker->x()-tmpXMarker->x()) / (a*a) + + (currXMarker->y()-tmpXMarker->y()) * (currXMarker->y()-tmpXMarker->y()) / (b*b) + + (currXMarker->z()-tmpXMarker->z()) * (currXMarker->z()-tmpXMarker->z()) / (c*c); + + // if distance smaller than threshold + if (distanceSquare < 1) { + if (tmpXMarker->type == 0) { + tmpXMarker->type = tmpClusterLabel; + } + else { + _mergeClusters(tmpXMarker->type, tmpClusterLabel); + } + } + } + } + } + + for (i=0; i<_outXMarkerList.getSize(); i++) + { + counter[((XMarker*)_outXMarkerList.getItemAt(i))->type]++; + } + + + int maxNumber = 0; + int maxLabel = 0; + int secMaxNumber = 0; + int secMaxLabel = 0; + + + // determine largest and second largest cluster + for (i=0; i<currClusterLabel; i++) + { + _ss << "cluster " << i+1 << " - size: " << counter[i] << std::endl; + + if (counter[i] > secMaxNumber) { + secMaxNumber = counter[i]; + secMaxLabel = i; + } + + if (counter[i] > maxNumber) { + secMaxNumber = maxNumber; + secMaxLabel = maxLabel; + maxNumber = counter[i]; + maxLabel = i; + } + } + + _ss << "-------------------------------------" << std::endl; + _ss << "largest cluster : " << maxLabel << " ( " << maxNumber << " elements) " << std::endl; + _ss << "second largest cluster : " << secMaxLabel << " ( " << secMaxNumber << " elements) " << std::endl; + + + _outLargestCluster.clear(); + _outSecondLargestCluster.clear(); + + // fill up largest cluster and second largest cluster list + for (i=0; i<_outXMarkerList.getSize(); i++) + { + XMarker *tmpMarker = (XMarker*)_outXMarkerList.getItemAt(i); + if (tmpMarker->type == maxLabel) { + _outLargestCluster.push_back(*tmpMarker); + } + if (tmpMarker->type == secMaxLabel) { + _outSecondLargestCluster.push_back(*tmpMarker); + } + } + + + + // get 90% quantile + std::sort(_outLargestCluster.begin(), _outLargestCluster.end(), sortClusterPoints); + + int pIndex = (_outLargestCluster.size() * 0.9); + + if (_outLargestCluster.size()) { + XMarker pMarker = _outLargestCluster.at(pIndex); + _seedPointFld->setVec3fValue(vec3(pMarker.x(), pMarker.y(), pMarker.z())); + } + else { + _seedPointFld->setVec3fValue(vec3(-1.0, -1.0, -1.0)); + } + _seedPointFld->notifyAttachments(); + + + // ++++++++++++++ TIME MEASUREMENT END ++++++++++++++ // + _runTimeFld->setDoubleValue(timeWhole.getRunningTimeInSeconds()); + _ss << "TIME AscendingAortaDetection.Clustering : " << timeClustering.getRunningTimeInSeconds() << std::endl; + _ss << "TIME AscendingAortaDetection : " << timeWhole.getRunningTimeInSeconds() << std::endl; + +_infoFld->setStringValue(_ss.str()); + // compute statistics about largest and second largest cluster + // pri = primary -> largestCluster + // sec = secondoary -> secondLargestCluster + + vec3 priBaryCenter; + vec3 priLowerCenter; + vec3 priUpperCenter; + double priMean; + double priStd; + vec2 priRadiusBC; + vec3 priBBLower; + vec3 priBBUpper; + + _computeBB(_outLargestCluster, priBaryCenter, priLowerCenter, priUpperCenter, priMean, priStd, priRadiusBC, priBBLower, priBBUpper); + _priClusterSizeFld->setIntValue(_outLargestCluster.getSize()); + _priMeanIntensityFld->setDoubleValue(priMean); + _priStdIntensityFld->setDoubleValue(priStd); + _priBaryCenterFld->setVec3fValue(priBaryCenter); + _priLowerCenterFld->setVec3fValue(priLowerCenter); + _priUpperCenterFld->setVec3fValue(priUpperCenter); + _priRadiusBCFld->setVec2fValue(priRadiusBC); + _priBBLowerFld->setVec3fValue(priBBLower); + _priBBUpperFld->setVec3fValue(priBBUpper); + + vec3 secBaryCenter; + vec3 secLowerCenter; + vec3 secUpperCenter; + double secMean; + double secStd; + vec2 secRadiusBC; + vec3 secBBLower; + vec3 secBBUpper; + + _computeBB(_outSecondLargestCluster, secBaryCenter, secLowerCenter, secUpperCenter, secMean, secStd, secRadiusBC, secBBLower, secBBUpper); + _secClusterSizeFld->setIntValue(_outSecondLargestCluster.getSize()); + _secMeanIntensityFld->setDoubleValue(secMean); + _secStdIntensityFld->setDoubleValue(secStd); + _secBaryCenterFld->setVec3fValue(secBaryCenter); + _secLowerCenterFld->setVec3fValue(secLowerCenter); + _secUpperCenterFld->setVec3fValue(secUpperCenter); + _secRadiusBCFld->setVec2fValue(secRadiusBC); + _secBBLowerFld->setVec3fValue(secBBLower); + _secBBUpperFld->setVec3fValue(secBBUpper); + + double extMinZ = DBL_MAX; + double extMaxZ = DBL_MIN; + + for (int i=0; i<_outLargestCluster.getSize(); i++) + { + XMarker *tmpMarker = (XMarker*)_outLargestCluster.getItemAt(i); + + if (tmpMarker->z() < extMinZ) { + extMinZ = tmpMarker->z(); + } + + if (tmpMarker->z() > extMaxZ) { + extMaxZ = tmpMarker->z(); + } + } + _extensionLargestClusterFld->setDoubleValue(extMaxZ-extMinZ); + + extMinZ = DBL_MAX; + extMaxZ = DBL_MIN; + double minY = 0.0; + double minX = 0.0; + + for (int i=0; i<_outSecondLargestCluster.getSize(); i++) + { + XMarker *tmpMarker = (XMarker*)_outSecondLargestCluster.getItemAt(i); + + if (tmpMarker->z() < extMinZ) { + extMinZ = tmpMarker->z(); + minX = tmpMarker->x(); + minY = tmpMarker->y(); + } + + if (tmpMarker->z() > extMaxZ) { + extMaxZ = tmpMarker->z(); + } + + } + + _secLowerCenterFld->setVec3fValue(vec3(minX, minY, extMinZ)); + _extensionSecondLargestClusterFld->setDoubleValue(extMaxZ-extMinZ); + + _statistics(); + _infoFld->setStringValue(_ss.str()); + + _ss << "TIME AscendingAortaDetection.statistics: " << timeWhole.getRunningTimeInSeconds() << std::endl; + +} + +//---------------------------------------------------------------------------------- +//! Compute bounding box and some other statistics of given cluster. +//---------------------------------------------------------------------------------- +void AscendingAortaDetection::_computeBB(XMarkerList &_list, vec3 &baryCenter, vec3 &lowerCenter, vec3 &upperCenter, double &mean, double &std, vec2 &radiusBC, vec3 &bbLower, vec3 &bbUpper) +{ + TVirtualVolume<MLuint16> vInVol(*_virtInVol); + + if (_list.getSize() == 0) { + return; + } + + baryCenter = vec3(0, 0, 0); + double minZCoord = DBL_MAX; + double maxZCoord = -DBL_MAX; + for (int i=0; i<_list.getSize(); i++) + { + XMarker *tmpMarker = (XMarker*)_list.getItemAt(i); + baryCenter[0] += tmpMarker->x(); + baryCenter[1] += tmpMarker->y(); + baryCenter[2] += tmpMarker->z(); + + if (tmpMarker->z() < minZCoord) { + minZCoord = tmpMarker->z(); + lowerCenter = vec3(tmpMarker->x(), tmpMarker->y(), tmpMarker->z()); + } + + if (tmpMarker->z() > maxZCoord) { + maxZCoord = tmpMarker->z(); + upperCenter = vec3(tmpMarker->x(), tmpMarker->y(), tmpMarker->z()); + } + } + baryCenter[0] /= (double)_list.getSize(); + baryCenter[1] /= (double)_list.getSize(); + baryCenter[2] /= (double)_list.getSize(); + + // get radius of aorta at baryCenter + vec3 baryCenterVox ; // baryCenter in voxel coordinates + getInImg(0)->transformToVoxelCoord(baryCenter, baryCenterVox); + + // radius at barycenter + radiusBC[0] = 0.5 * _singleRayBothDirections(baryCenterVox, vec3(1, 0, 0), getInImg(0)->getImgExt(), _primaryThresholdFld->getIntValue(), _secondaryThresholdFld->getIntValue(), getInImg(0)->getVoxelSize()); + radiusBC[1] = 0.5 * _singleRayBothDirections(baryCenterVox, vec3(0, 1, 0), getInImg(0)->getImgExt(), _primaryThresholdFld->getIntValue(), _secondaryThresholdFld->getIntValue(), getInImg(0)->getVoxelSize()); + + // extension of bounding box in xy-plane + double bbExtension = _minDiameterFld->getIntValue()*0.5*0.6; // 0.5 to get the radius, 0.6 -> 60% of radius + + bool ok = false; + + while (!ok) + { + Vector corner[8]; + vec3 cornerWorld; + vec3 cornerVoxel; + + cornerWorld = vec3(baryCenter[0]-bbExtension, baryCenter[1]-bbExtension, baryCenter[2]); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[0] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]+bbExtension, baryCenter[1]-bbExtension, baryCenter[2]); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[1] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]-bbExtension, baryCenter[1]+bbExtension, baryCenter[2]); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[2] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]+bbExtension, baryCenter[1]+bbExtension, baryCenter[2]); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[3] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]-bbExtension, baryCenter[1]-bbExtension, (baryCenter[2]+minZCoord)/2.0); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[4] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]+bbExtension, baryCenter[1]-bbExtension, (baryCenter[2]+minZCoord)/2.0); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[5] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]-bbExtension, baryCenter[1]+bbExtension, (baryCenter[2]+minZCoord)/2.0); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[6] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + cornerWorld = vec3(baryCenter[0]+bbExtension, baryCenter[1]+bbExtension, (baryCenter[2]+minZCoord)/2.0); + getInImg(0)->transformToVoxelCoord(cornerWorld, cornerVoxel); + corner[7] = Vector(cornerVoxel[0], cornerVoxel[1], cornerVoxel[2], 0, 0, 0); + + + // check the 8 corners of the bounding box if their intensity is greater than the primary threshold + if ( (vInVol.getVoxel(corner[0]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[1]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[2]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[3]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[4]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[5]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[6]) > _primaryThresholdFld->getIntValue()) + && (vInVol.getVoxel(corner[7]) > _primaryThresholdFld->getIntValue()) ) { + ok = true; + } + else { + bbExtension -= 1.0; + } + if (bbExtension < 0) { + ok = true; + bbExtension = 0.0; + } + + } + + bbLower = vec3(baryCenter[0]-bbExtension, baryCenter[1]-bbExtension, baryCenter[2]); + bbUpper = vec3(baryCenter[0]+bbExtension, baryCenter[1]+bbExtension, (baryCenter[2]+minZCoord)/2.0); + + // compute statistics + vec3 bbLowerVox; + vec3 bbUpperVox; + getInImg(0)->transformToVoxelCoord(bbLower, bbLowerVox); + getInImg(0)->transformToVoxelCoord(bbUpper, bbUpperVox); + + bbLowerVox[0] = (int)bbLowerVox[0]; + bbLowerVox[1] = (int)bbLowerVox[1]; + bbLowerVox[2] = (int)bbLowerVox[2]; + bbUpperVox[0] = (int)bbUpperVox[0]; + bbUpperVox[1] = (int)bbUpperVox[1]; + bbUpperVox[2] = (int)bbUpperVox[2]; + + for (int i=0; i<3; i++) + { + if (bbUpperVox[i] < bbLowerVox[i]) { + int tmp = bbLowerVox[i]; + bbLowerVox[i] = bbUpperVox[i]; + bbUpperVox[i] = tmp; + } + } + + // mean + mean = 0.0; + unsigned meanCounter = 0; + for (int z = bbLowerVox[2]; z <= bbUpperVox[2]; z++) + { + for (int y = bbLowerVox[1]; y <= bbUpperVox[1]; y++) + { + for (int x = bbLowerVox[0]; x <= bbLowerVox[0]; x++) + { + unsigned value = vInVol.getVoxel(Vector(x, y, z, 0, 0, 0)); + meanCounter++; + mean += value; + } + } + } + mean /= (double)meanCounter; + + // standard deviation + std = 0.0; + for (int z = bbLowerVox[2]; z <= bbUpperVox[2]; z++) + { + for (int y = bbLowerVox[1]; y <= bbUpperVox[1]; y++) + { + for (int x = bbLowerVox[0]; x <= bbLowerVox[0]; x++) + { + unsigned value = vInVol.getVoxel(Vector(x, y, z, 0, 0, 0)); + std += (value - mean) * (value - mean); + } + } + } + std /= (double)meanCounter; + std = sqrt(std); +} + +//---------------------------------------------------------------------------------- +//! Compute some additional statistics. +//---------------------------------------------------------------------------------- +void AscendingAortaDetection::_statistics() +{ + // mean radius largest cluster + double meanRadiusLargestCluster = 0.0; + for (int i=0; i<_outLargestCluster.getSize(); i++) { + XMarker *tmpMarker = (XMarker*)_outLargestCluster.getItemAt(i); + meanRadiusLargestCluster += tmpMarker->vec[0]; + meanRadiusLargestCluster += tmpMarker->vec[1]; + } + meanRadiusLargestCluster /= (2.0 * _outLargestCluster.getSize()); + _ss << "meanRadiusLargestCluster " << meanRadiusLargestCluster << std::endl; + + // mean radius second largest cluster + double meanRadiusSecondLargestCluster = 0.0; + for (int i=0; i<_outSecondLargestCluster.getSize(); i++) { + XMarker *tmpMarker = (XMarker*)_outSecondLargestCluster.getItemAt(i); + meanRadiusSecondLargestCluster += tmpMarker->vec[0]; + meanRadiusSecondLargestCluster += tmpMarker->vec[1]; + } + meanRadiusSecondLargestCluster /= (2.0 * _outSecondLargestCluster.getSize()); + _ss << "meanRadiusSecondLargestCluster " << meanRadiusSecondLargestCluster << std::endl; + + // std radius largest cluster + double stdRadiusLargestCluster = 0.0; + for (int i=0; i<_outLargestCluster.getSize(); i++) + { + XMarker *tmpMarker = (XMarker*)_outLargestCluster.getItemAt(i); + stdRadiusLargestCluster += (tmpMarker->vec[0]-meanRadiusLargestCluster) * (tmpMarker->vec[0]-meanRadiusLargestCluster); + stdRadiusLargestCluster += (tmpMarker->vec[1]-meanRadiusLargestCluster) * (tmpMarker->vec[1]-meanRadiusLargestCluster); + } + stdRadiusLargestCluster /= (2.0 * _outLargestCluster.getSize()); + stdRadiusLargestCluster = sqrt(stdRadiusLargestCluster); + _ss << "stdRadiusLargestCluster " << stdRadiusLargestCluster << std::endl; + + // std radius second largest cluster + double stdRadiusSecondLargestCluster = 0.0; + for (int i=0; i<_outSecondLargestCluster.getSize(); i++) + { + XMarker *tmpMarker = (XMarker*)_outSecondLargestCluster.getItemAt(i); + stdRadiusSecondLargestCluster += (tmpMarker->vec[0]-meanRadiusSecondLargestCluster) * (tmpMarker->vec[0]-meanRadiusSecondLargestCluster); + stdRadiusSecondLargestCluster += (tmpMarker->vec[1]-meanRadiusSecondLargestCluster) * (tmpMarker->vec[1]-meanRadiusSecondLargestCluster); + } + stdRadiusSecondLargestCluster /= (2.0 * _outSecondLargestCluster.getSize()); + stdRadiusSecondLargestCluster = sqrt(stdRadiusSecondLargestCluster); + _ss << "stdRadiusSecondLargestCluster " << stdRadiusSecondLargestCluster << std::endl; + + _meanRadiusLargestClusterFld->setDoubleValue(meanRadiusLargestCluster); + _stdRadiusLargestClusterFld->setDoubleValue(stdRadiusLargestCluster); + _meanRadiusSecondLargestClusterFld->setDoubleValue(meanRadiusSecondLargestCluster); + _stdRadiusSecondLargestClusterFld->setDoubleValue(stdRadiusSecondLargestCluster); +} + +//---------------------------------------------------------------------------------- +//! Merge two clusters in _outXMarkerList as given by their cluster label. +//---------------------------------------------------------------------------------- +void AscendingAortaDetection::_mergeClusters(int from, int to) +{ + for (int i=0; i<_outXMarkerList.getSize(); i++) + { + XMarker *tmpXMarker = (XMarker*)_outXMarkerList.getItemAt(i); + if (tmpXMarker->type == from) + { + tmpXMarker->type = to; + } + } +} + +//---------------------------------------------------------------------------------- +//! _initVirtualVolumes +//! return value 1: no problems while creating virtual volume +//! return value -1: error while creating virtual volume +//! +//---------------------------------------------------------------------------------- +int AscendingAortaDetection::_initVirtualVolumes() +{ + + if (_virtInVol) { + ML_DELETE(_virtInVol); + } + + if (getUpdatedInImg(0)) { + //ML_CHECK_NEW(_virtInVol, VirtualVolume(this, 0, getInImg(0)->getDataType())); + // explicitely cast to MLuint16Type + ML_CHECK_NEW(_virtInVol, VirtualVolume(this, 0, MLuint16Type)); + } + else { + _virtInVol = NULL; + } + + if (CVL_IS_VIRTUALVOLUME_NOT_OK(_virtInVol)) { + return -1; + } + return 1; +} + +//---------------------------------------------------------------------------------- +//! Propagate ray in two directions. +//---------------------------------------------------------------------------------- +double AscendingAortaDetection::_singleRayBothDirections(vec3 start, vec3 direction, Vector imgExt, unsigned primeThreshold, unsigned secondThreshold, vec3 voxSize) +{ + double result = 0.0; + + vec3 resDir1 = _singleRay(start, direction, imgExt, primeThreshold, secondThreshold); + vec3 resDir2 = _singleRay(start, -direction, imgExt, primeThreshold, secondThreshold); + + result = sqrt((resDir1[0]-resDir2[0])*(resDir1[0]-resDir2[0])*voxSize[0]*voxSize[0] + + (resDir1[1]-resDir2[1])*(resDir1[1]-resDir2[1])*voxSize[1]*voxSize[1] + + (resDir1[2]-resDir2[2])*(resDir1[2]-resDir2[2])*voxSize[2]*voxSize[2]); + + return result; +} + +//---------------------------------------------------------------------------------- +//! Propagate ray in one direction as described in the paper. +//---------------------------------------------------------------------------------- +vec3 AscendingAortaDetection::_singleRay(vec3 start, vec3 direction, Vector imgExt, unsigned primeThreshold, unsigned secondThreshold) +{ + TVirtualVolume<MLuint16> vInVol(*_virtInVol); + vec3 result = start; + + unsigned value = vInVol.getVoxel(CVL_VEC3_TO_VECTOR(start)); + + // as long as intensity greater than second threshold + while (value > secondThreshold) + { + start = start + direction; + if (CVL_IS_IN_VOLUME(start, imgExt)) { + value = vInVol.getVoxel(CVL_VEC3_TO_VECTOR(start)); + // the result is the last voxel with an intensity greater than + // the primary threshold + if (value > primeThreshold) { + result = start; + } + } + else { + // this will cause the while loop to end + value = 0; + } + } + return result; +} + +ML_END_NAMESPACE + Added: trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.h =================================================================== --- trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.h (rev 0) +++ trunk/Community/General/Sources/ML/CVLAscendingAortaDetection/mlAscendingAortaDetection.h 2009-07-26 07:59:11 UTC (rev 178) @@ -0,0 +1,208 @@ +//---------------------------------------------------------------------------------- +//! The ML module class AscendingAortaDetection. +/*! +// \file mlAscendingAortaDetection.h +// \author Stefan Saur +// \date 2007-03-24 +// +// as published and described in +// "Automatic Ascending Aorta Detection in CTA Datasets" +// ftp://ftp.vision.ee.ethz.ch/publications/proceedings/eth_biwi_00536.pdf +// +// @InProceedings{eth_biwi_00536, +// author = {Stefan C. Saur and Caroline K\"uhnel and Tobias Boskamp and G\xE1bor Sz\xE9kely and Philippe Cattin}, +// title = {Automatic Ascending Aorta Detection in CTA Datasets}, +// booktitle = {Bildverarbeitung f\xFCr der Medizin 2008}, +// year = {2008}, +// month = {April}, +// pages = {323-327}} +// +// This code was created by support of the research project Co-Me (http://co-me.ch) +// at the Computer Vision Laboratory of ETH Zurich (http://www.vision.ee.ethz.ch) +// +// YOU MUST CITE THIS PAPER WHEN USING THE ALGORITHM IN YOUR PUBLICATION +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __mlAscendingAortaDetection_H +#define __mlAscendingAortaDetection_H + + +// Local includes +#ifndef __CVLAscendingAortaDetectionSystem_H +#include "CVLAscendingAortaDetectionSystem.h" +#endif + +// ML includes +#include "mlOperatorIncludes.h" +#include "mlVersion.h" + +//! Include Virtual volume classes from MLTools project. +#include "mlTVirtualVolume.h" + +//! Include XMarker stuff +#include "mlXMarkerList.h" +#include "mlTimeCounter.h" + +#include <sstream> + +ML_START_NAMESPACE + +// checks if a given virtual volume is valid +#define CVL_IS_VIRTUALVOLUME_NOT_OK(vv) (!vv || (vv && !vv->isValid())) +// converts a vec3 to a vector +#define CVL_VEC3_TO_VECTOR(input) Vector(input[0], input[1], input[2], 0, 0, 0) +// check if given point is within volume +#define CVL_IS_IN_VOLUME(point, extension) (point[0] >= 0) && (point[1] >= 0) && (point[2] >= 0) && (point[0]<extension[0]) && (point[1]<extension[1]) && (point[2]<extension[2]) + + +//! +class CVLASCENDINGAORTADETECTION_EXPORT AscendingAortaDetection : public BaseOp +{ +public: + + //! Constructor. + AscendingAortaDetection (void); + //! Destructor. + ~AscendingAortaDetection (void); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); + + +private: + + + //! Propagate ray in one direction, returns points which meets threshold conditions. + vec3 _singleRay(vec3 start, vec3 direction, Vector imgExt, unsigned primeThreshold, unsigned secondThreshold); + //! Propagate ray in two directions, returns diameter. + double _singleRayBothDirections(vec3 start, vec3 direction, Vector imgExt, unsigned primeThreshold, unsigned secondThreshold, vec3 voxSize); + //! Initialize virtual volume. + int _initVirtualVolumes(); + //! Main routine. + void _process(); + //! Merge two clusters in _outXMarkerList as given by their cluster label. + void _mergeClusters(int from, int to); + //! Compute some additional statistics. + void _statistics(); + //! Compute bounding box and some other statistics of given cluster. + void _computeBB(XMarkerList &_list, vec3 &baryCenter, vec3 &lowerCenter, vec3 &upperCenter, double &mean, double &std, vec2 &radiusBC, vec3 &bbLower, vec3 &bbUpper); + + std::stringstream _ss; + + //! MarkerList with all clusters. + XMarkerList _outXMarkerList; + //! MarkerList with largest cluster. + XMarkerList _outLargestCluster; + //! MarkerList with second largest cluster. + XMarkerList _outSecondLargestCluster; + + //! Virtual volume of input image. + VirtualVolume *_virtInVol; + + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- + + //! Output field for MarkerList with all clusters. + BaseField *_outXMarkerListFld; + //! Output field for MarkerList with largest cluster. + BaseField *_outXMarkerListLargestClusterFld; + //! Output field for MarkerList with second largest cluster. + BaseField *_outXMarkerListSecondLargestClusterFld; + //! Primary threshold th_p in gray values. + IntField *_primaryThresholdFld; + //! Secondary threshold th_s in gray values. + IntField *_secondaryThresholdFld; + //! Minimum diameter d_min in mm + IntField *_minDiameterFld; + //! Maximum diameter d_max in mm + IntField *_maxDiameterFld; + //! Distance limit for clustering d_clust. + Vec3fField *_distanceClusterFld; + //! Ratio a. + DoubleField *_ratioLimitFld; + //! Apply ratio limit. + BoolField *_useRatioLimitFld; + //! Output during computation. + StringField *_infoFld; + //! increment for search rays in mm + Vec3fField *_incrementFld; + //! percentage in respect to the image extension where the algorithm starts looking for the aorta + Vec3fField *_startSearchAreaFld; + //! percentage in respect to the image extension where the algorithm... [truncated message content] |
From: <ss...@us...> - 2009-07-22 16:47:35
|
Revision: 177 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=177&view=rev Author: ssaur Date: 2009-07-22 16:47:31 +0000 (Wed, 22 Jul 2009) Log Message: ----------- added module SegmentationEvaluationMetric Added Paths: ----------- trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/ trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.def trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/html/ trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/html/SegmentationEvaluationMetric.html trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/networks/ trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/networks/SegmentationEvaluationMetricExample.mlab trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.bat trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.pro trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.sh trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.cpp trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.h trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricSystem.h trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.cpp trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.h Added: trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.def =================================================================== --- trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.def (rev 0) +++ trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.def 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,55 @@ +//---------------------------------------------------------------------------------- +//! CVLSegmentationEvaluationMetric module definitions. +/*! +// \file CVLSegmentationEvaluationMetric.def +// \author Stefan Saur +// \date 2009-07-21 +*/ +//---------------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------------- +// MLModule SegmentationEvaluationMetric +//---------------------------------------------------------------------------------- +MLModule SegmentationEvaluationMetric { + DLL = "CVLSegmentationEvaluationMetric" + + genre = "" + author = "Stefan Saur" + status = "work-in-progress" + comment = "" + keywords = "sensitivity, specificity, TP, TN, FP, FN, prevalence, dice coefficient, similarity" + seeAlso = "" + documentation = "$(LOCAL)/html/SegmentationEvaluationMetric.html" + exampleNetwork = "$(LOCAL)/networks/SegmentationEvaluationMetricExample.mlab" + + Window { + Category "Main" { + Box "Input" { + Vertical { + Field segmentationThreshold { title = "Segmentation Image Threshold" tooltip = "all values above threshold are regarded as foreground" } + Field referenceThreshold { title = "Reference Image Threshold" tooltip = "all values above threshold are regarded as foreground"} + Horizontal { + CheckBox isAutoApply {} + Button apply {} + } + } + } + Box "Output" { + Vertical { + Field truePositive { title = "True positive (TP)" edit = NO minLength = 10} + Field trueNegative { title = "True negative (TN)" edit= NO } + Field falsePositive { title = "False positive (FP)" edit = NO } + Field falseNegative { title = "False negative (FN)" edit = NO } + Field sensitivity { title = "Sensitivity" edit = NO } + Field specificity { title = "Specificity" edit = NO } + Field prevalence { title = "Prevalence" edit = NO } + Field levelOfTest { title = "Level of Test" edit = NO } + Field diceSimilarityCoefficient { title = "Dice Similarity Coefficient" edit = NO } + Field cFactor { title = "C-Factor" edit = NO } + } + } + } + } +} // MLModule SegmentationEvaluationMetric + Added: trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/html/SegmentationEvaluationMetric.html =================================================================== --- trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/html/SegmentationEvaluationMetric.html (rev 0) +++ trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/html/SegmentationEvaluationMetric.html 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,182 @@ +<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + + + + + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + + + + <meta name="GENERATOR" content="Mozilla/4.78 [en] (Windows NT 5.0; U) [Netscape]"> + + + + + <meta name="Description" content="MeVisLab module help page template"> + + + + + <title>SegmentationEvaluationMetric</title> +</head> + + +<body> + + + +<center><a href="#Purpose">Purpose</a> <a href="#Usage">Usage</a> +<a href="#Details">Details</a> <a href="#Inputs">Inputs</a> +<a href="#Outputs">Outputs</a> <a href="#Parameters">Parameters</a> +<a href="#EventInteract">Events&Interaction</a> <a href="#Example">Example</a> +<a href="#Tips&Tricks">Tips&Tricks</a> <a href="#KnownBugs">Known +Bugs</a> +<hr width="100%"></center> + + + +<h2> +SegmentationEvaluationMetric</h2> + + + +<h3> +<a name="Purpose"></a>Purpose</h3> + + + +<blockquote>Metric computation for the assessment of segmentation results. Given a segmentation and a reference segmentation, the module <b>SegmentationEvaluationMetric</b> computes some measures as described in:<br/> + +<i>Statistical validation metric for accuracy assessment in medical image segmentation</i><br/> +Aleksandra Popovic, Matias de la Fuente, Martin Engelhardt, Klaus Radermacher<br/> +Int J CARS, 2007(2):169-181<br/> +<a href="http://dx.doi.org/10.1007/s11548-007-0125-1 ">DOI 10.1007/s11548-007-0125-1</a> +<br/> +to evaluate the segmentation result. +</blockquote> + + +<h3> +<a name="Usage"></a>Usage</h3> + +<blockquote>Connect <b>input0</b> with the segmentation result and <b>input1</b> with the reference image. Set the thresholds for the segmentation and reference image in the parameters (all voxels above the corresponding threshold are regarded as foreground) and press the <b>Apply</b> button. +</blockquote> + + + +<h3> +<a name="Details"></a>Details</h3> + + + +<blockquote>None.</blockquote> + + + +<h3> +<a name="Inputs"></a>Inputs</h3> + + + +<blockquote> +<ul> + <li><b>input0</b> - segmentation image</li> + <li><b>input1</b> - reference image</li> +</ul> +</blockquote> + + + +<h3> +<a name="Outputs"></a>Outputs</h3> + + + +<blockquote>The module has no outputs.</blockquote> + + + +<h3> +<a name="Parameters"></a>Parameters</h3> + + + +<blockquote> + + <h4>Input</h4> + + <ul> + <li><b>Segmentation Image Threshold</b> - all voxels with an intensity value greater this threshold are regarded as foreground in the segmentation image (input0).</li> + <li><b>Reference Image Threshold</b> - all voxels with an intensity value greater this threshold are regarded as foreground in the reference image (input1).</li> + <li><b>Is auto apply</b> - if checked, computation is started whenever the input changes.</li> + <li><b>Apply</b> - start the computation.</li> + </ul> + + <br/> + + <h4>Output</h4> + <ul> + <li><b>True positive</b> - # of true positive voxels.</li> + <li><b>True negative</b> - # of true negative voxels.</li> + <li><b>False positive</b> - # of false positive voxels.</li> + <li><b>False negative</b> - # of false negative voxels.</li> + <li><b>Sensitivity</b></li> + <li><b>Specificity</b></li> + <li><b>Prevalence</b></li> + <li><b>Level of Test</b></li> + <li><b>Dice Similarity Coefficient</b></li> + <li><b>C-Factor</b></li> + </ul> + + +</blockquote> + + + +<h3> +<a name="EventInteract"></a>Events & Interaction</h3> + + + +<blockquote>Describe which mouse clicks or movements, or keystrokes are +needed for proper operation or how they are influenced by certain +parameters. Also the usage of other or untypical devices should be +discussed here. +</blockquote> + + + +<h3> +<a name="Example"></a>Example</h3> + + + +<blockquote>See example network.</blockquote> + + + +<h3> +<a name="Tips&Tricks"></a>Tips & Tricks</h3> + + + +<blockquote>None.</blockquote> + + + +<h3> +<a name="KnownBugs"></a>Known Bugs</h3> + + + +<blockquote>None.<br> + +</blockquote> + + + +</body> +</html> Added: trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/networks/SegmentationEvaluationMetricExample.mlab =================================================================== --- trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/networks/SegmentationEvaluationMetricExample.mlab (rev 0) +++ trunk/Community/General/Modules/ML/CVLSegmentationEvaluationMetric/networks/SegmentationEvaluationMetricExample.mlab 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,140 @@ +// MDL v1 utf8 +network { + watchlist = "" +} +module Comment { + internal { + frame = "-275 -123 88 56" + moduleGroupName = "" + windows { + window _default { + geometry = "37 368 256 209" + sizeHint = "256 209" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = Comment + comment = "Press the apply button to compute the segmentation statistics." + } + internalFields = "" +} +module Threshold { + internal { + frame = "41 133 96 56" + moduleGroupName = "" + windows { + window _default { + geometry = "509 491 268 92" + sizeHint = "268 92" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = Threshold1 + threshold = 1300 + minValue = 0 + maxValue = 4095 + relativeThreshold = FALSE + } +} +module Threshold { + internal { + frame = "-115 133 88 56" + moduleGroupName = "" + windows { + window _default { + geometry = "509 491 268 92" + sizeHint = "268 92" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = Threshold + threshold = 1500 + minValue = 0 + maxValue = 4095 + relativeThreshold = FALSE + } +} +module Bypass { + internal { + frame = "29 57 120 64" + moduleGroupName = "" + } + fields { + instanceName = ReferenceImage + ignoreNextNotify = FALSE + noBypass = FALSE + } +} +module Bypass { + internal { + frame = "-143 49 144 64" + moduleGroupName = "" + } + fields { + instanceName = SegmentationResult + ignoreNextNotify = FALSE + noBypass = FALSE + } +} +module LocalImage { + internal { + frame = "-63 245 96 56" + moduleGroupName = "" + } + fields { + instanceName = LocalImage + name = $(DemoDataPath)/Bone.tiff + trueName = "C:/Program Files/MeVisLab2.0VC8/Packages/MeVisLab/Resources/DemoData/Bone.tiff" + autoLoad = TRUE + status = "File open" + } + internalFields = "" +} +module SegmentationEvaluationMetric { + internal { + frame = "-99 -27 200 56" + moduleGroupName = "" + windows { + window _default { + geometry = "638 298 264 423" + sizeHint = "264 423" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = SegmentationEvaluationMetric + segmentationThreshold = 0 + referenceThreshold = 0 + truePositive = 0 + trueNegative = 0 + falsePositive = 0 + falseNegative = 0 + sensitivity = 0 + specificity = 0 + prevalence = 0 + levelOfTest = 0 + diceSimilarityCoefficient = 0 + cFactor = 0 + isAutoApply = FALSE + } +} +connections { + Threshold1.input0 = LocalImage.outImage + Threshold.input0 = LocalImage.outImage + ReferenceImage.input0 = Threshold1.output0 + SegmentationResult.input0 = Threshold.output0 + SegmentationEvaluationMetric.input0 = SegmentationResult.output0 + SegmentationEvaluationMetric.input1 = ReferenceImage.output0 +} +networkModel = "" Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.bat =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.bat (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.bat 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,3 @@ +"%MLAB_ROOT%\MeVis\Foundation\BuildTools\Scripts\createProject.bat" CVLSegmentationEvaluationMetric + + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.pro =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.pro (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.pro 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,41 @@ +# ----------------------------------------------------------------------------- +# CVLSegmentationEvaluationMetric project profile +# +# \file CVLSegmentationEvaluationMetric.pro +# \author Stefan Saur +# \date 2009-07-21 +# ----------------------------------------------------------------------------- + +TEMPLATE = lib + +TARGET = CVLSegmentationEvaluationMetric + +DESTDIR = ../../../lib +DLLDESTDIR = ../../../lib + +# set high warn level (warn 4 on MSCV) +WARN = HIGH + +# add used projects here (see included pri files below for available projects) +CONFIG += dll ML + +MLAB_PACKAGES += MeVisLab_Standard + +# make sure that this file is included after CONFIG and MLAB_PACKAGES +include ($(MLAB_MeVis_Foundation)/Configuration/IncludePackages.pri) + +DEFINES += CVLSEGMENTATIONEVALUATIONMETRIC_EXPORTS + +HEADERS += \ + CVLSegmentationEvaluationMetricInit.h \ + CVLSegmentationEvaluationMetricSystem.h \ + mlSegmentationEvaluationMetric.h + +SOURCES += \ + CVLSegmentationEvaluationMetricInit.cpp \ + mlSegmentationEvaluationMetric.cpp + +# additional files that are NOT compiled +RELATEDFILES += \ + ../../../Modules/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.def + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.sh =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.sh (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetric.sh 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,35 @@ +#! /bin/bash +#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------- +# +# Copyright (c) 2001-2009, MeVis Medical Solutions AG, Bremen, Germany +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of MeVis Medical Solutions AG nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY MEVIS MEDICAL SOLUTIONS AG ''AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL MEVIS MEDICAL SOLUTIONS AG BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#----------------------------------------------------------------------------- +if [ "`uname -s`" = "Darwin" && "$MLAB_ROOT" = "" ]; then + echo "Generate Xcode projects by double-clicking the file 'CVLSegmentationEvaluationMetric.pro' in Finder or use the MeVisLabProjectGenerator.app from the command line to customize the project creation." +else + python $MLAB_ROOT/MeVis/Foundation/BuildTools/Scripts/createProject.py CVLSegmentationEvaluationMetric +fi + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.cpp =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.cpp (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.cpp 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,42 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. +/*! +// \file CVLSegmentationEvaluationMetricInit.cpp +// \author Stefan Saur +// \date 2009-07-21 +*/ +//---------------------------------------------------------------------------------- + + +// Local includes +#include "CVLSegmentationEvaluationMetricSystem.h" + +// Include definition of ML_INIT_LIBRARY. +#include "mlLibraryInitMacros.h" + +// Include all module headers ... +#include "mlSegmentationEvaluationMetric.h" + + +ML_START_NAMESPACE + +//---------------------------------------------------------------------------------- +//! Calls init functions of all modules to add their types to the runtime type +//! system of the ML. +//---------------------------------------------------------------------------------- +int CVLSegmentationEvaluationMetricInit () +{ + ML_TRACE_IN("CVLSegmentationEvaluationMetricInit ()") + + SegmentationEvaluationMetric::initClass(); + // Add initClass calls from all other modules here... + + return 1; +} + +ML_END_NAMESPACE + + +//! Calls the init method implemented above during load of shared library. +ML_INIT_LIBRARY(CVLSegmentationEvaluationMetricInit) + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.h =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.h (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricInit.h 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,25 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. +/*! +// \file CVLSegmentationEvaluationMetricInit.h +// \author Stefan Saur +// \date 2009-07-21 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __CVLSegmentationEvaluationMetricInit_H +#define __CVLSegmentationEvaluationMetricInit_H + + +ML_START_NAMESPACE + +//! Calls init functions of all modules to add their types to the runtime type +//! system of the ML. +int CVLSegmentationEvaluationMetricInit (); + +ML_END_NAMESPACE + +#endif // __CVLSegmentationEvaluationMetricInit_H + + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricSystem.h =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricSystem.h (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/CVLSegmentationEvaluationMetricSystem.h 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,33 @@ +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations. +/*! +// \file CVLSegmentationEvaluationMetricSystem.h +// \author Stefan Saur +// \date 2009-07-21 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __CVLSegmentationEvaluationMetricSystem_H +#define __CVLSegmentationEvaluationMetricSystem_H + + +// DLL export macro definition +#ifdef WIN32 +#ifdef CVLSEGMENTATIONEVALUATIONMETRIC_EXPORTS +// Use the CVLSEGMENTATIONEVALUATIONMETRIC_EXPORT macro to export classes and functions +#define CVLSEGMENTATIONEVALUATIONMETRIC_EXPORT __declspec(dllexport) +#else +// If included by external modules, exported symbols are declared as import symbols +#define CVLSEGMENTATIONEVALUATIONMETRIC_EXPORT __declspec(dllimport) +#endif + +#else +// No export declarations are necessary for non-Windows systems +#define CVLSEGMENTATIONEVALUATIONMETRIC_EXPORT +#endif + + +#endif // __CVLSegmentationEvaluationMetricSystem_H + + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.cpp =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.cpp (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.cpp 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,296 @@ +//---------------------------------------------------------------------------------- +//! The ML module class SegmentationEvaluationMetric. +/*! +// \file mlSegmentationEvaluationMetric.cpp +// \author Stefan Saur +// \date 2009-07-21 +// +// Validatation metric for accuracy assessment in medical image segmentation as described in +// +// "Statistical validation metric for accuracy assessment in medical image segmentation" +// Aleksandra Popovic, Matias de la Fuente, Martin Engelhardt, Klaus Radermacher +// Int J CARS, 2007(2):169-181 +// DOI 10.1007/s11548-007-0125-1 +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "mlSegmentationEvaluationMetric.h" + +ML_START_NAMESPACE + + +//! Implements code for the runtime type system of the ML +ML_BASEOP_CLASS_SOURCE(SegmentationEvaluationMetric, BaseOp); + +//---------------------------------------------------------------------------------- +//! Constructor +//---------------------------------------------------------------------------------- +SegmentationEvaluationMetric::SegmentationEvaluationMetric () + : BaseOp(2, 0) +{ + ML_TRACE_IN("SegmentationEvaluationMetric::SegmentationEvaluationMetric ()"); + + // Suppress calls of handleNotification on field changes to + // avoid side effects during initialization phase. + handleNotificationOff(); + + // Get reference to the container for parameters/fields. + FieldContainer &fields = *getFieldContainer(); + + // Add fields to the module and set their values. + // Also attach them to the output images to notify connected modules about changes. + + (_segmentationThresholdFld = fields.addInt("segmentationThreshold"))->setIntValue(0); + (_referenceThresholdFld = fields.addInt("referenceThreshold"))->setIntValue(0); + + (_truePositiveFld = fields.addInt("truePositive"))->setIntValue(0); + (_trueNegativeFld = fields.addInt("trueNegative"))->setIntValue(0); + (_falsePositiveFld = fields.addInt("falsePositive"))->setIntValue(0); + (_falseNegativeFld = fields.addInt("falseNegative"))->setIntValue(0); + (_sensitivityFld = fields.addDouble("sensitivity"))->setDoubleValue(0.0); + (_specificityFld = fields.addDouble("specificity"))->setDoubleValue(0.0); + (_prevalenceFld = fields.addDouble("prevalence"))->setDoubleValue(0.0); + (_levelOfTestFld = fields.addDouble("levelOfTest"))->setDoubleValue(0.0); + (_diceSimilarityCoefficientFld = fields.addDouble("diceSimilarityCoefficient"))->setDoubleValue(0.0); + (_cFactorFld = fields.addDouble("cFactor"))->setDoubleValue(0.0); + + (_isAutoApplyFld = fields.addBool("isAutoApply"))->setBoolValue(false); + _applyFld = fields.addNotify("apply"); + + // Connect input field(s) with output field(s) to notify + // connected modules if input image(s) change. + for (int inIdx=0; inIdx < 2; ++inIdx){ + for (int outIdx=0; outIdx < 0; ++outIdx){ + getInField(inIdx)->attachField(getOutField(outIdx)); + } + } + + // Reactivate calls of handleNotification on field changes. + handleNotificationOn(); + + // Activate inplace data buffers for output outIndex and input inIndex. + // setOutImgInplace(outIndex, inIndex); + + // Activate page data bypass from input inIdx to output outIdx. + // Note that the module must still be able to calculate the output image. + // setBypass(outIndex, inIndex); + + // Activate parallel execution of calcOutSubImage. + // setThreadSupport(supportMode); + // with supportMode = + // NO_THREAD_SUPPORT //! The module is not thread safe at all. + // CALC_OUTSUBIMAGE_ON_STD_TYPES //! calcOutSubImage can be called in parallel for scalar voxel types. + // CALC_OUTSUBIMAGE_ON_CARRIER_TYPES //! calcOutSubImage can be called in parallel for carrier voxel types. + // CALC_OUTSUBIMAGE_ON_ALL_TYPES //! calcOutSubImage can be called in parallel for all voxel types. + // Warning: You should be familiar with multithreading before activating this feature. + + // Specify whether the module can only process standard scalar voxel types or + // also registered voxel types (vec2, mat2, complexf, Vector, etc.) + // setVoxelDataTypeSupport(permittedTypes); + // with permittedTypes = + // ONLY_STANDARD_TYPES //! Only standard scalar voxels are supported. + // FULLY_OPERATIONAL //! Scalar and registered voxels types are supported. + // MINIMUM_OPERATIONAL //! Scalar and registered voxel types are supported. + // //! Voxel operators are not used by algorithm. + // + // See ML Programming Guide, "Configuring Image Processing Behaviour of the BaseOp" + // for further details. +} + +//---------------------------------------------------------------------------------- +//! Handle field changes of the field field. +//---------------------------------------------------------------------------------- +void SegmentationEvaluationMetric::handleNotification (Field *field) +{ + ML_TRACE_IN("SegmentationEvaluationMetric::handleNotification ()"); + + if (getUpdatedInImg(0) && getUpdatedInImg(1) && (_isAutoApplyFld->isOn() || (field == _applyFld))) { + _process(); + } +} + +//---------------------------------------------------------------------------------- +//! Update internal module state after load or clone and enable notification handling again. +//---------------------------------------------------------------------------------- +void SegmentationEvaluationMetric::activateAttachments () +{ + ML_TRACE_IN("SegmentationEvaluationMetric::activateAttachments ()"); + + // Update members to new field state here. + // Call super class functionality to enable notification handling again. + BaseOp::activateAttachments (); +} + +//---------------------------------------------------------------------------------- +//! Calls correctly typed (template) version of \c calcOutSubImage to calculate page +//! \c outSubImg of output image with index \c outSubImg. +//---------------------------------------------------------------------------------- +CALC_OUTSUBIMAGE2_CPP(SegmentationEvaluationMetric); + +//---------------------------------------------------------------------------------- +//! Template for type specific page calculation. Called by +//! CALC_OUTSUBIMAGE2_CPP(SegmentationEvaluationMetric). +//---------------------------------------------------------------------------------- +template <typename T> +void SegmentationEvaluationMetric::calcOutSubImage (TSubImg<T> *outSubImg, int outIndex, + TSubImg<T> *inSubImg1, + TSubImg<T> *inSubImg2) +{ + ML_TRACE_IN("template <typename T> SegmentationEvaluationMetric::calcOutSubImage ()") + + outSubImg; + int segThreshold = _segmentationThresholdFld->getIntValue(); + int refThreshold = _referenceThresholdFld->getIntValue(); + + // called by processAllPages for the virtual output image with the index -1 + if (outIndex == -1) { + // Clamp page box to valid image regions since pages can reach outside the image. + SubImgBox box = SubImgBox::intersect(inSubImg1->getBox(), getInImg(0)->getBoxFromImgExt()); + + // Scan all voxels in both input subimages which have identical + // extents (as specified in calcInSubImageProps). + Vector p = box.v1; + for (p.u = box.v1.u; p.u <= box.v2.u; p.u++) + { + for (p.t = box.v1.t; p.t <= box.v2.t; p.t++) + { + for (p.c = box.v1.c; p.c <= box.v2.c; p.c++) + { + for (p.z = box.v1.z; p.z <= box.v2.z; p.z++) + { + for (p.y = box.v1.y; p.y <= box.v2.y; p.y++) + { + + // Calculate first voxel position in x row. + p.x = box.v1.x; + + // Get pointers to first voxels in x-rows of all input subimages. + T* i1P = inSubImg1->getImgPos(p); + T* i2P = inSubImg2->getImgPos(p); + + // Iterate over all voxels in input lines. + for (; p.x <= box.v2.x; p.x++) + { + T val1 = (*i1P); // segmentation + T val2 = (*i2P); // reference (ground truth) segmentation + + // true positive + if ( (val1 > segThreshold) && (val2 > refThreshold) ) { + _numTruePositive++; + } + // true negative + if ( (val1 <= segThreshold) && (val2 <= refThreshold) ) { + _numTrueNegative++; + } + // false positive + if ( (val1 > segThreshold) && (val2 <= refThreshold) ) { + _numFalsePositive++; + } + // false negative + if ( (val1 <= segThreshold) && (val2 > refThreshold) ) { + _numFalseNegative++; + } + // Move pointers forward in all input images. + ++i1P; + ++i2P; + } + } + } + } + } + } + } +} + + +//---------------------------------------------------------------------------------- +//! Main routine. +//---------------------------------------------------------------------------------- +void SegmentationEvaluationMetric::_process() +{ + ML_TRACE_IN("SegmentationEvaluationMetric::_process ()"); + + _numTruePositive = 0; + _numTrueNegative = 0; + _numFalsePositive = 0; + _numFalseNegative = 0; + double sensitivity = 0.0; + double specificity = 0.0; + unsigned int numVoxels = 0; + double prevalence = 0.0; + double levelOfTest = 0.0; + double dsc = 0.0; + double cFactor = 0.0; + + + + + // process all pages + MLErrorCode err = processAllPages(-1,0); + + if (err==ML_RESULT_OK) { + + // sensitivity + if ( (_numTruePositive + _numFalseNegative) > 0) { + sensitivity = _numTruePositive / (double)(_numTruePositive+_numFalseNegative); + } + + // specificity + if ( (_numTrueNegative + _numFalsePositive) > 0) { + specificity = _numTrueNegative / (double) (_numTrueNegative+_numFalsePositive); + } + + // total number of voxels + numVoxels = _numTruePositive + _numFalsePositive + _numFalseNegative + _numTrueNegative; + + // prevalence + if (numVoxels > 0) { + prevalence = (_numTruePositive + _numFalseNegative) / (double)numVoxels; + } + + // level of test + if (numVoxels > 0) { + levelOfTest = (_numTruePositive + _numFalsePositive) / (double)numVoxels; + } + + // Dice similarity coefficient + if ( 2*_numTruePositive + _numFalsePositive + _numFalseNegative > 0) { + dsc = 2.0 * _numTruePositive / (double)(2.0*_numTruePositive + _numFalsePositive + _numFalseNegative); + } + + // C-Factor + double p = sensitivity; + double q = specificity; + double d = (2.0 * p * (1 - q)) / (p + (1-q)) + (2 * (1-p) * q) / ((1-p) + p); + + if ( (p >= q) && (p > 1-q) ) { + cFactor = d; + } + else if ( (p < q) && (p > 1-q) ) { + cFactor = -d; + } + else if ( (p <= 1-q) ) { + // undefined + } + } + else { + // Set error status. + std::cerr << MLGetErrorCodeDescription(err); + } + + // set output + _truePositiveFld->setIntValue(_numTruePositive); + _trueNegativeFld->setIntValue(_numTrueNegative); + _falsePositiveFld->setIntValue(_numFalsePositive); + _falseNegativeFld->setIntValue(_numFalseNegative); + _sensitivityFld->setDoubleValue(sensitivity); + _specificityFld->setDoubleValue(specificity); + _prevalenceFld->setDoubleValue(prevalence); + _levelOfTestFld->setDoubleValue(levelOfTest); + _diceSimilarityCoefficientFld->setDoubleValue(dsc); + _cFactorFld->setDoubleValue(cFactor); +} + +ML_END_NAMESPACE + Added: trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.h =================================================================== --- trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.h (rev 0) +++ trunk/Community/General/Sources/ML/CVLSegmentationEvaluationMetric/mlSegmentationEvaluationMetric.h 2009-07-22 16:47:31 UTC (rev 177) @@ -0,0 +1,124 @@ +//---------------------------------------------------------------------------------- +//! The ML module class SegmentationEvaluationMetric. +/*! +// \file mlSegmentationEvaluationMetric.h +// \author Stefan Saur +// \date 2009-07-21 +// +// Validatation metric for accuracy assessment in medical image segmentation as described in +// +// "Statistical validation metric for accuracy assessment in medical image segmentation" +// Aleksandra Popovic, Matias de la Fuente, Martin Engelhardt, Klaus Radermacher +// Int J CARS, 2007(2):169-181 +// DOI 10.1007/s11548-007-0125-1 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __mlSegmentationEvaluationMetric_H +#define __mlSegmentationEvaluationMetric_H + + +// Local includes +#include "CVLSegmentationEvaluationMetricSystem.h" + +// ML includes +#include "mlOperatorIncludes.h" + +ML_START_NAMESPACE + + +//! +class CVLSEGMENTATIONEVALUATIONMETRIC_EXPORT SegmentationEvaluationMetric : public BaseOp +{ +public: + + //! Constructor. + SegmentationEvaluationMetric (); + + //! Handle field changes of the field field. + virtual void handleNotification (Field *field); + + //! Update internal module state after load or clone and enable notification handling again. + virtual void activateAttachments (); + + //! Calculates page \c outSubImg of output image with index \c outIndex by using \c inSubimgs. + //! \param outSubImg The subimage of output image \c outIndex calculated from \c inSubImgs. + //! \param outIndex The index of the output the subimage is calculated for. + //! \param inSubImgs Array of subimage(s) of the input(s) whose extents were specified + //! by \c calcInSubImageBox. Array size is given by \c getInputNum(). + virtual void calcOutSubImage (SubImg *outSubImg, int outIndex, SubImg *inSubImgs); + + //! Method template for type-specific page calculation. Called by \c calcOutSubImage(). + //! \param outSubImg The typed subimage of output image \c outIndex calculated from \c inSubImg?. + //! \param outIndex The index of the output the subimage is calculated for. + //! \param inSubImg1 Temporary subimage of input 1. + //! \param inSubImg2 Temporary subimage of input 2. + template <typename T> + void calcOutSubImage (TSubImg<T> *outSubImg, int outIndex, + TSubImg<T> *inSubImg1, + TSubImg<T> *inSubImg2); + + +private: + + //! Main routine. + void _process(); + + //! Number of true positives. + unsigned int _numTruePositive; + //! Number of true negatives. + unsigned int _numTrueNegative; + //! Number of false positives. + unsigned int _numFalsePositive; + //! Number of false negatives. + unsigned int _numFalseNegative; + + + // ---------------------------------------------------------- + //! \name Module field declarations + //@{ + // ---------------------------------------------------------- + + //! Threshold for segmentation image. + IntField *_segmentationThresholdFld; + //! Threshold for reference image. + IntField *_referenceThresholdFld; + //! True positive. + IntField *_truePositiveFld; + //! True negative. + IntField *_trueNegativeFld; + //! False positive. + IntField *_falsePositiveFld; + //! False negative. + IntField *_falseNegativeFld; + //! Sensitivity. + DoubleField *_sensitivityFld; + //! Specificity. + DoubleField *_specificityFld; + //! Prevalence. + DoubleField *_prevalenceFld; + //! Level of Test. + DoubleField *_levelOfTestFld; + //! Dice Similarity Coefficient + DoubleField *_diceSimilarityCoefficientFld; + //! c-Factor. + DoubleField *_cFactorFld; + + //! Apply. + NotifyField *_applyFld; + //! is auto apply. + BoolField *_isAutoApplyFld; + + + //@} + + //! Implements interface for the runtime type system of the ML. + ML_BASEOP_CLASS_HEADER(SegmentationEvaluationMetric) +}; + + +ML_END_NAMESPACE + +#endif // __mlSegmentationEvaluationMetric_H + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bro...@us...> - 2009-07-22 14:22:57
|
Revision: 176 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=176&view=rev Author: broersen Date: 2009-07-22 14:22:46 +0000 (Wed, 22 Jul 2009) Log Message: ----------- ENH: -Added clear input XMarker data in _clearAllVariables Modified Paths: -------------- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp Modified: trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2009-07-01 12:05:43 UTC (rev 175) +++ trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2009-07-22 14:22:46 UTC (rev 176) @@ -184,7 +184,7 @@ || (field == _calculateFld) ) { // Check if Matlab is started. if (!_checkMatlabIsStarted()) { - _statusFld->setStringValue("Cannot finding matlab engine!"); + _statusFld->setStringValue("Cannot find Matlab engine!"); return; } @@ -236,8 +236,8 @@ // we can check if they change. A notification is only sent upon change. double tmpScalars[6]; for(int k=0; k<6; ++k) { - tmpScalars[k] = _scalarFld[k]->getDoubleValue(); - } + tmpScalars[k] = _scalarFld[k]->getDoubleValue(); + } _getScalarsBackFromMatlab(); for(int k=0; k<6; ++k) { if(tmpScalars[k] == _scalarFld[k]->getDoubleValue()) { @@ -259,7 +259,7 @@ //---------------------------------------------------------------------------------- //! Configures (in)validation handling of inputs which are not connected or up to date. //---------------------------------------------------------------------------------- -BaseOp::INPUT_HANDLE MatlabScriptWrapper::handleInput(int inIndex, INPUT_STATE /*state*/) const +BaseOp::INPUT_HANDLE MatlabScriptWrapper::handleInput (int inIndex, INPUT_STATE /*state*/) const { ML_TRACE_IN("MatlabScriptWrapper::handleInput ()"); @@ -276,7 +276,7 @@ //---------------------------------------------------------------------------------- //! Sets properties of the output image at output \c outIndex. //---------------------------------------------------------------------------------- -void MatlabScriptWrapper::calcOutImageProps(int outIndex) +void MatlabScriptWrapper::calcOutImageProps (int outIndex) { ML_TRACE_IN("MatlabScriptWrapper::calcOutImageProps ()"); @@ -287,7 +287,7 @@ return; } - // Get variable name in the matlab workspace of the ouput image + // Get variable name in the matlab workspace of the output image std::string outname = _outDataNameFld[outIndex]->getStringValue(); // Get the size of the image via the matlab workspace @@ -315,7 +315,7 @@ mxDestroyArray(m_Y); m_Y = NULL; // Delete temp variable. - engEvalString(m_pEngine, "clear mevtmpdim"); + engEvalString(m_pEngine, "clear mevtmpdim"); // Get min and max values in matlab workspace and set them in MeVisLab std::ostringstream minmaxCommand, maxCommand; @@ -339,7 +339,7 @@ //---------------------------------------------------------------------------------- //! Request input image in fixed datatype. //---------------------------------------------------------------------------------- -void MatlabScriptWrapper::calcInSubImageProps(int /*inIndex*/, InSubImageProps &props, int /*outIndex*/) +void MatlabScriptWrapper::calcInSubImageProps (int /*inIndex*/, InSubImageProps &props, int /*outIndex*/) { // Request input image in double type. props.inSubImgDType = MLdoubleType; @@ -426,10 +426,11 @@ // Get whole image. MLErrorCode localErr = getTile(getInOp(i),getInOpIndex(i), - SubImgBox(Vector(0, 0, 0, 0, 0, 0), Vector(imgSize.x-1, imgSize.y-1, imgSize.z-1, imgSize.c-1, imgSize.t-1, imgSize.u-1)), - MLdoubleType, - &data, - ScaleShiftData(1,0)); + SubImgBox(Vector(0, 0, 0, 0, 0, 0), + Vector(imgSize.x-1, imgSize.y-1, imgSize.z-1,imgSize.c-1, imgSize.t-1, imgSize.u-1)), + MLdoubleType, + &data, + ScaleShiftData(1,0)); // Check and save error code if necessary. if (localErr != ML_RESULT_OK) { @@ -477,7 +478,7 @@ size_t i = 0; // Get names form gui. std::ostringstream inXMarkerStr, outXMarkerStr; - inXMarkerStr << _inXMarkerNameFld->getStringValue(); + inXMarkerStr << _inXMarkerNameFld->getStringValue(); outXMarkerStr << _outXMarkerNameFld->getStringValue(); // Combine string. @@ -631,7 +632,7 @@ // Fill marker with zeros. XMarker outMarker(vec6(0),vec3(0),0); - // Write matlab points to marker. + // Write matlab points to marker and prevent writing more than 6 dimensions for(j=0; j<cols && cols<=6; j++) { outMarker.pos[j] = dataPos[i + j*rows]; } @@ -645,6 +646,7 @@ } } + // Write matlab type vec to marker. if(dataType!=NULL) { // Set type only if number points and types equal otherwise zero. @@ -675,7 +677,7 @@ // Check if Matlab is started. if (!_checkMatlabIsStarted()) { - std::cerr << "_copyInputScalarsToMatlab(): Cannot finding matlab engine!" << std::endl << std::flush; + std::cerr << "_copyInputScalarsToMatlab(): Cannot find matlab engine!" << std::endl << std::flush; return; } // Internal loop. @@ -751,7 +753,10 @@ clearString << _outDataNameFld[i]->getStringValue() << " "; } - // Clear XMarker data + // Clear input XMarker data + clearString << _inXMarkerNameFld->getStringValue() << " "; + + // Clear output XMarker data clearString << _outXMarkerNameFld->getStringValue(); // Evaluate the string in Matlab This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ss...@us...> - 2009-07-01 12:05:45
|
Revision: 175 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=175&view=rev Author: ssaur Date: 2009-07-01 12:05:43 +0000 (Wed, 01 Jul 2009) Log Message: ----------- added documentation to CommandBox Modified Paths: -------------- trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script Added Paths: ----------- trunk/Community/General/Modules/Macros/CommandBox/html/ trunk/Community/General/Modules/Macros/CommandBox/html/CommandBox.html Modified: trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def 2009-06-29 10:22:58 UTC (rev 174) +++ trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def 2009-07-01 12:05:43 UTC (rev 175) @@ -17,6 +17,7 @@ exampleNetwork = "$(LOCAL)/CommandBoxExample.mlab" externalDefinition = "$(LOCAL)/CommandBox.script" + documentation = "$(LOCAL)/html/CommandBox.html" scriptOnly = yes } // MacroModule CommandBox Modified: trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script 2009-06-29 10:22:58 UTC (rev 174) +++ trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script 2009-07-01 12:05:43 UTC (rev 175) @@ -50,7 +50,7 @@ tooltip = "call MLAB.processEvents after each command" } CheckBox isProcessInventorQueue { - title = "ProcessInventorQueue" + title = "Process inventor queue" tooltip = "call MLAB.processInventorQueue after each command" } } // Row @@ -72,19 +72,19 @@ Horizontal { CheckBox isLoop { - title = "do loop" + title = "Do loop" tooltip = "Process 'Command List' in a loop between start and stop value" } Field startLoop { - title = "start" + title = "Start" tooltip = "Start value for loop" } Field stopLoop { - title = "stop" + title = "Stop" tooltip = "Stop value for loop" } Field val { - title = "value" + title = "Value" edit = NO tooltip = "Current iteration value of loop" } Added: trunk/Community/General/Modules/Macros/CommandBox/html/CommandBox.html =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/html/CommandBox.html (rev 0) +++ trunk/Community/General/Modules/Macros/CommandBox/html/CommandBox.html 2009-07-01 12:05:43 UTC (rev 175) @@ -0,0 +1,151 @@ +<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + + + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + + <meta name="GENERATOR" content="Mozilla/4.78 [en] (Windows NT 5.0; U) [Netscape]"> + + + <meta name="Description" content="Template for an ILAB module"> + + + <title>CommandBox</title> +<!--===============================================================--><!-- CommandBox --><!--===============================================================--> +</head> + + +<body> + +<center><a href="#Purpose">Purpose</a> +<a href="#Usage">Usage</a> +<a href="#Inputs">Inputs</a> +<a href="#Outputs">Outputs</a> +<a href="#Parameters">Parameters</a> +<a href="#EventInteract">Events&Interaction</a> +<a href="#Example">Example</a> +<a href="#Tips&Tricks">Tips&Tricks</a> +<a href="#KnownBugs">Known Bugs</a> +<hr width="100%"></center> + +<h2> +CommandBox</h2> + +<h3> +<a name="Purpose"></a>Purpose</h3> + +<blockquote> + <p> +The <b>CommandBox</b> macro allows to touch several buttons/fields one after the other. It is useful when several buttons within a network have to be touched each time to process it. To speed up, these buttons can be defined in a list and automatically be touched one after the other by just one mouse-click. Furthermore, there is an option to process all buttons multiple times in a loop - useful when running a network on a large number of data. + + </p> + +</blockquote> + +<h3> +<a name="Usage"></a>Usage</h3> + +<blockquote> +<p> + Write the fields to be touched into the <b>CommandList</b>. One field per line in the form <i>moduleName.fieldName</i>. For a comment (in a separate line), use the character <i>#</i>. Finally, press the <b>Apply</b> button to touch all the listed fields in your network. +</p> +</blockquote> + +<h3> +<a name="Inputs"></a>Inputs</h3> + +<blockquote> +The module has no input. +</blockquote> + +<h3> +<a name="Outputs"></a>Outputs</h3> + +<blockquote> +The module has no output. +</blockquote> + +<h3> +<a name="Parameters"></a>Parameters</h3> + +<blockquote> + + <h4><b>Main</b></h4> + + + <ul> + + <li><span style="font-weight: bold;">CommandList</span>: List of fields that should be touched. One field per line in the form <i>moduleName.fieldName</i>.</li> + + + <li><span style="font-weight: bold;">Apply</span>: Touch all fields one after the other as listed in <b>CommandList</b>.</li> + + </ul> + +</blockquote> + +<blockquote> + +<h4>Parameters</h4> + + <ul> + <li><span style="font-weight: bold;">Process events</span>: If checked, the command <i>MLAB.processEvents</i> is executed after each field being touched.</li> + <li><span style="font-weight: bold;">Process inventor queue</span>: If checked, the command <i>MLAB.processInventorQueue</i> is executed after each field being touched.</li> + <li><span style="font-weight: bold;">Log commands</span>: if checked, the touched fields are logged into the console.</li> + <li><span style="font-weight: bold;">Sleep [ms]:</span>: Idle time between touching two fields in milli seconds.</li> + </ul> +</blockquote> + +<blockquote> + +<h4>Loop</h4> + + + + <ul> + <li><span style="font-weight: bold;">Do loop</span>: If checked, the CommandList is processed multiple times, as defined by the loop parameters <b>Start</b> and <b>Stop</b>.</li> + <li><span style="font-weight: bold;">Start</span>: Start value of the loop.</li> + <li><span style="font-weight: bold;">Stop</span>: Stop value of the loop.</li> + <li><span style="font-weight: bold;">Value:</span>: Current value of the loop (start Size <= value <= Stop).</li> + </ul> +</blockquote> + + + + <h3> + </h3> + + + <h3> + <a name="EventInteract"></a>Events & Interaction</h3> + + + <blockquote>None.</blockquote> + + + <h3> + <a name="Example"></a>Example</h3> + + + <blockquote>The example network demonstrates the usage of the module by touching two different buttons of two Counter modules.</blockquote> + + + <h3> + <a name="Tips&Tricks"></a>Tips & Tricks</h3> + + + <blockquote>None.</blockquote> + + + <h3> + <a name="KnownBugs"></a>Known Bugs</h3> + + + <blockquote>None.</blockquote> + +</blockquote> + +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ss...@us...> - 2009-06-29 10:22:59
|
Revision: 174 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=174&view=rev Author: ssaur Date: 2009-06-29 10:22:58 +0000 (Mon, 29 Jun 2009) Log Message: ----------- added CommandBox macro Added Paths: ----------- trunk/Community/General/Modules/Macros/CommandBox/ trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def trunk/Community/General/Modules/Macros/CommandBox/CommandBox.js trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script trunk/Community/General/Modules/Macros/CommandBox/CommandBoxExample.mlab Added: trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def (rev 0) +++ trunk/Community/General/Modules/Macros/CommandBox/CommandBox.def 2009-06-29 10:22:58 UTC (rev 174) @@ -0,0 +1,23 @@ +//---------------------------------------------------------------------------------- +//! CommandBox module definition +/*! +// \file CommandBox.def +// \author Stefan Saur +// \date 2007-11-28 +*/ +//---------------------------------------------------------------------------------- + +MacroModule CommandBox { + genre = "" + author = "Stefan Saur" + status = "stable" + comment = "Touches a list of trigger fields." + keywords = "" + seeAlso = "" + + exampleNetwork = "$(LOCAL)/CommandBoxExample.mlab" + externalDefinition = "$(LOCAL)/CommandBox.script" + scriptOnly = yes + +} // MacroModule CommandBox + Added: trunk/Community/General/Modules/Macros/CommandBox/CommandBox.js =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/CommandBox.js (rev 0) +++ trunk/Community/General/Modules/Macros/CommandBox/CommandBox.js 2009-06-29 10:22:58 UTC (rev 174) @@ -0,0 +1,63 @@ +//---------------------------------------------------------------------------------- +//! Macro module CommandBox +/*! +// \file CommandBox.js +// \author Stefan Saur +// \date 2007-11-28 +// +// +*/ +//---------------------------------------------------------------------------------- + +function processOnce() +{ + var commandList = ctx.field("commandList").value; + var commands = new Array(); + var isVerbose = ctx.field("isVerbose").value; + var isProcessEvents = ctx.field("isProcessEvents").value; + var isProcessInventorQueue = ctx.field("isProcessInventorQueue").value; + var sleep = ctx.field("sleep").value; + commands = commandList.split('\n'); + for (var i=0; i<commands.length; i++) + { + var command = commands[i]; + if ( (command != '') && (command.charAt(0) != '#') ) { + if (isVerbose) { + MLAB.log("CommandBox ... " + command); + } + ctx.parent().field(command).touch(); + if (isProcessEvents) { + MLAB.processEvents(); + } + if (isProcessInventorQueue) { + MLAB.processInventorQueue(); + } + MLAB.msleep(sleep); + } + } + +} + +function apply() +{ + if (ctx.field("isLoop").value) { + var start = ctx.field("startLoop").value; + var stop = ctx.field("stopLoop").value; + for (var i=start; i<=stop;i++) { + ctx.field("val").setValue(i); + processOnce(); + } + } + else { + processOnce(); + } + +} + +//# MeVis signature v1 +//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBAKyWeOZdMOT9Sj40ZS32A8i8GAjHkcHh3QT05EJBoHkqE3S0/FOcZM6SFkMLVcjiDmzBdoc9REZUIl5061137BkCARE=:mbUARszcrJxTM2e3H2YskVHojl15mYg4OBjlYsSeJfjTYEVwkgvJJ0eFJB4r7/u64QtiMUxLsor5/MgAGO4iCA== +//# owner: MeVis Internal Developer +//# date: 2007-07-05T03:39:16 +//# hash: Tzy7AGzs3RTVPEX8HYNWb67yw48RjE3KzJBfPjHXAcvDneKgDMcD//dT2Tvl6AZmx/gsbhkHVMhWl3KW+V/IXA== +//# MeVis end + Added: trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script (rev 0) +++ trunk/Community/General/Modules/Macros/CommandBox/CommandBox.script 2009-06-29 10:22:58 UTC (rev 174) @@ -0,0 +1,107 @@ +//---------------------------------------------------------------------------------- +//! Macro module CommandBox +/*! +// \file CommandBox.script +// \author Stefan Saur +// \date 2007-11-28 +// +// +*/ +//---------------------------------------------------------------------------------- + + +Interface { + Inputs {} + Outputs {} + Parameters { + Field isVerbose { type = bool value = false} + Field isProcessEvents { type = bool value = true } + Field isProcessInventorQueue { type = bool value = true } + Field commandList { type = string } + Field apply { type = trigger } + Field sleep { type = int value = 1000 } + Field startLoop { type = int value = 0 } + Field stopLoop { type = int value = 1 } + Field val { type = int value = 0 } + Field isLoop { type = bool value = false } + } +} + + +Commands { + source = $(LOCAL)/CommandBox.js + FieldListener apply { command = apply } +} + +Window "CommandBox" { + Category "Main" { + Vertical { expandY = yes + TextView commandList { + autoApply = yes + mw = 200 + mh = 300 + } + } // Vertical + Box "Parameters" { + Table { + Row { + CheckBox isProcessEvents { + title = "Process events" + tooltip = "call MLAB.processEvents after each command" + } + CheckBox isProcessInventorQueue { + title = "ProcessInventorQueue" + tooltip = "call MLAB.processInventorQueue after each command" + } + } // Row + Row { + CheckBox isVerbose { + title = "Log commands" + tooltip = "Log commands to console" + } + Field sleep { + title = "Sleep [ms]" + tooltip = "Idle time in milli seconds after each command" + } + } // Row + } // Table + } // Box + + Box "Loop" { + tooltip = "Process 'Command List' in a loop between start and stop value" + Horizontal { + + CheckBox isLoop { + title = "do loop" + tooltip = "Process 'Command List' in a loop between start and stop value" + } + Field startLoop { + title = "start" + tooltip = "Start value for loop" + } + Field stopLoop { + title = "stop" + tooltip = "Stop value for loop" + } + Field val { + title = "value" + edit = NO + tooltip = "Current iteration value of loop" + } + } + } + + Horizontal { + Button apply {} + } + + } // Category "Main" +} // Window "CommandBox" + +//# MeVis signature v1 +//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBAKyWeOZdMOT9Sj40ZS32A8i8GAjHkcHh3QT05EJBoHkqE3S0/FOcZM6SFkMLVcjiDmzBdoc9REZUIl5061137BkCARE=:mbUARszcrJxTM2e3H2YskVHojl15mYg4OBjlYsSeJfjTYEVwkgvJJ0eFJB4r7/u64QtiMUxLsor5/MgAGO4iCA== +//# owner: MeVis Internal Developer +//# date: 2007-07-05T03:39:16 +//# hash: NZnpFvlIWb2UTMKyWzOuJEZzoHM/s9TlAdYpIMv062KgFHHoXp8DNyyPGqjQINHxx+W07/BC6aUcPMYZinaBFw== +//# MeVis end + Added: trunk/Community/General/Modules/Macros/CommandBox/CommandBoxExample.mlab =================================================================== --- trunk/Community/General/Modules/Macros/CommandBox/CommandBoxExample.mlab (rev 0) +++ trunk/Community/General/Modules/Macros/CommandBox/CommandBoxExample.mlab 2009-06-29 10:22:58 UTC (rev 174) @@ -0,0 +1,100 @@ +// MDL v1 utf8 +network { + watchlist = "" +} +module Comment { + internal { + frame = "-131 -235 88 56" + windows { + window _default { + geometry = "62 73 256 209" + sizeHint = "256 209" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = Comment + comment = "A CommandBox touches the fields given in the CommandList. In this example, the +'up' button from the module 'CounterOne' and the 'down' button from the module 'CounterTwo' are touched. " + } + internalFields = "" +} +module Counter { + internal { + frame = "33 49 96 64" + windows { + window _default { + geometry = "638 368 336 178" + sizeHint = "336 178" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = CounterTwo + currentValue = 10 + minValue = 0 + maxValue = 10 + startValue = 10 + stepValue = 1 + loop = TRUE + checkConsistency = TRUE + } + internalFields = "" +} +module Counter { + internal { + frame = "21 -71 104 64" + windows { + window _default { + geometry = "641 154 336 178" + sizeHint = "336 178" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = CounterOne + currentValue = 0 + minValue = 0 + maxValue = 10 + startValue = 0 + stepValue = 1 + loop = TRUE + checkConsistency = TRUE + } + internalFields = "" +} +module CommandBox { + internal { + frame = "-135 -131 112 56" + windows { + window _default { + geometry = "56 348 397 486" + sizeHint = "397 486" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = CommandBox + isVerbose = TRUE + isProcessEvents = TRUE + isProcessInventorQueue = TRUE + commandList = "CounterOne.up +# tihs is a comment +CounterTwo.down" + sleep = 1000 + startLoop = 0 + stopLoop = 1 + val = 0 + isLoop = FALSE + } + internalFields = "" +} +connections = "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 14:05:02
|
Revision: 172 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=172&view=rev Author: wolfspindler Date: 2009-06-26 12:43:25 +0000 (Fri, 26 Jun 2009) Log Message: ----------- BUG: -Doxygen search engine deactivated, because it does not work for unknown reasons. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 12:10:27 UTC (rev 171) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 12:43:25 UTC (rev 172) @@ -6,7 +6,7 @@ HAVE_DOT = NO GENERATE_QHP = YES RECURSIVE = YES -SEARCHENGINE = YES +SEARCHENGINE = NO ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 4 EXTRACT_LOCAL_CLASSES = YES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 13:03:36
|
Revision: 173 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=173&view=rev Author: wolfspindler Date: 2009-06-26 13:03:32 +0000 (Fri, 26 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class indexes. -Some stuff translated to english, minor typos and bugs fixed, some node and inheritance infos added for more compact overview information. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/AnimationParser.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptCommandObject.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h trunk/UMD/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartInit.h trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h trunk/UMD/METK/Sources/ML/METKPicking/METKPickingInit.h trunk/UMD/METK/Sources/ML/METKPicking/METKPickingSystem.h trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceInit.h trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceSystem.h Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/AnimationParser.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/AnimationParser.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/AnimationParser.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,6 @@ //---------------------------------------------------------------------------------- -/*! AnimationParser is the class for script parsing. +//! AnimationParser is the class for script parsing. +/*! // \file AnimationParser.h // \author Konrad M\xFChler // \date 2005-07-05 Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptCommandObject.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptCommandObject.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptCommandObject.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,6 @@ //---------------------------------------------------------------------------------- -/*! kScriptCommandObject is the class for handling a single command object. +//! kScriptCommandObject is the class for handling a single command object. +/*! // \file kScriptCommandObject.h // \author Konrad M\xFChler // \date 2005-07-05 Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,6 @@ //---------------------------------------------------------------------------------- -/*! kScriptFrameEntry is the class for handling a single frame entry. +//! kScriptFrameEntry is the class for handling a single frame entry. +/*! // \file kScriptFrameEntry.h // \author Konrad M\xFChler // \date 2005-07-05 @@ -23,7 +24,7 @@ using namespace std; -//! kScriptFrameEntry is the class for handling a single frame entry (contains i.e. command id, number of frames for instruction, current frame for this instruction). +//! kScriptFrameEntry is the class for handling a single frame entry (contains i.e. command id, number of frames for instruction, current frame for this instruction). class ANIMATION_EXPORT kScriptFrameEntry { private: Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,6 @@ //---------------------------------------------------------------------------------- -/*! kScriptFrameList is the class for handling a list of frame objects. +//! kScriptFrameList is the class for handling a list of frame objects. +/*! // \file kScriptFrameList.h // \author Konrad M\xFChler // \date 2005-07-05 Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,6 @@ //---------------------------------------------------------------------------------- -/*! kScriptFrameObject ist a representation of one frame with the list of all instructions. +//! kScriptFrameObject ist a representation of one frame with the list of all instructions. +/*! // \file kScriptFrameObject.h // \author Konrad M\xFChler // \date 2005-07-05 Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,6 @@ //---------------------------------------------------------------------------------- -/*! kScriptIniObject is the class for information about a script like length or realtime. +//! kScriptIniObject is the class for information about a script like length or realtime. +/*! // \file kScriptIniObject.h // \author Konrad M\xFChler // \date 2005-07-05 @@ -22,7 +23,7 @@ using namespace std; -//! kScriptIniObject is the class for information about a script like length or realtime. +//! kScriptIniObject is the class for information about a script like length or realtime. class ANIMATION_EXPORT kScriptIniObject { private: Modified: trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleRectangleCampath.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,3 +1,7 @@ + +//! Class GoogleRectangleCampath derived from AbstractCampath. +//! \file GoogleRectangleCampath.h + #ifndef _GOOGLERECTANGLECAMPATH_ #define _GOOGLERECTANGLECAMPATH_ @@ -5,6 +9,7 @@ ML_START_NAMESPACE +//! Class GoogleRectangleCampath derived from AbstractCampath. class GoogleRectangleCampath:public AbstractCampath{ public: GoogleRectangleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, Modified: trunk/UMD/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/Animation/UMDCampath/HeightCampath.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,3 +1,7 @@ + +//! Class HeightCampath derived from AbstractCampath. +//! \file HeightCampath.h + #ifndef _HEIGHTCAMPATH_ #define _HEIGHTCAMPATH_ @@ -5,6 +9,7 @@ ML_START_NAMESPACE +//! Class HeightCampath derived from AbstractCampath. class HeightCampath:public AbstractCampath{ public: HeightCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, Modified: trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartInit.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartInit.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartInit.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,5 +1,7 @@ //---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. /*! +// \file METKLiftChartInit.h // \author Christian Tietjen // */ @@ -12,7 +14,7 @@ ML_START_NAMESPACE -//! Calls init functions of all modules to add their types to the runtime type +//! Calls init functions of all modules to add their types to the runtime type //! system of the ML. int METKLiftChartInit (void); Modified: trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,4 +1,5 @@ //---------------------------------------------------------------------------------- +//! Project global and OS specific declarations. /*! // \file METKLiftChartSystem.h // \author Christian Tietjen Modified: trunk/UMD/METK/Sources/ML/METKPicking/METKPickingInit.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKPicking/METKPickingInit.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKPicking/METKPickingInit.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------------- //! Dynamic library and runtime type system initialization. /*! -// \file METKMessagingInit.h +// \file METKPickingInit.h // \author Christian Tietjen // \date 2006-05-16 // @@ -15,7 +15,7 @@ ML_START_NAMESPACE -//! Calls init functions of all modules to add their types to the runtime type +//! Calls init functions of all modules to add their types to the runtime type //! system of the ML. int METKPickingInit (void); Modified: trunk/UMD/METK/Sources/ML/METKPicking/METKPickingSystem.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKPicking/METKPickingSystem.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKPicking/METKPickingSystem.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------------- //! Project global and OS specific declarations. /*! -// \file METKMessagingSystem.h +// \file METKPickingSystem.h // \author Christian Tietjen // \date 2006-05-16 // Modified: trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,6 +1,6 @@ //! ML ObjMgrClient module METKPicking. -//! \file METKPicking.h +//! \file mlMETKPicking.h #ifndef __MLMETKPICKING_H #define __MLMETKPICKING_H Modified: trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceInit.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceInit.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceInit.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------------- //! Dynamic library and runtime type system initialization. /*! -// \file METKMessagingInit.h +// \file METKSurfaceDistanceInit.h // \author Christian Tietjen // \date 2006-05-16 // @@ -15,7 +15,7 @@ ML_START_NAMESPACE -//! Calls init functions of all modules to add their types to the runtime type +//! Calls init functions of all modules to add their types to the runtime type //! system of the ML. int METKSurfaceDistanceInit (void); Modified: trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceSystem.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceSystem.h 2009-06-26 12:43:25 UTC (rev 172) +++ trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceSystem.h 2009-06-26 13:03:32 UTC (rev 173) @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------------- //! Project global and OS specific declarations. /*! -// \file METKMessagingSystem.h +// \file METKSurfaceDistanceSystem.h // \author Christian Tietjen // \date 2006-05-16 // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 12:10:29
|
Revision: 171 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=171&view=rev Author: wolfspindler Date: 2009-06-26 12:10:27 +0000 (Fri, 26 Jun 2009) Log Message: ----------- BUG: -Path stripping did not work as expected. Reverted and one more parent level stripped. Maybe that works better. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:54:42 UTC (rev 170) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 12:10:27 UTC (rev 171) @@ -15,4 +15,4 @@ HIDE_UNDOC_CLASSES = NO EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES -STRIP_FROM_PATH = ../.. ../../Community/ ../../UMD/ Community/ UMD/ +STRIP_FROM_PATH = ../../.. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 08:54:59
|
Revision: 170 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=170&view=rev Author: wolfspindler Date: 2009-06-26 08:54:42 +0000 (Fri, 26 Jun 2009) Log Message: ----------- ENH: -Path names in file list shortened to achieve better readability Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:49:53 UTC (rev 169) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:54:42 UTC (rev 170) @@ -15,3 +15,4 @@ HIDE_UNDOC_CLASSES = NO EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES +STRIP_FROM_PATH = ../.. ../../Community/ ../../UMD/ Community/ UMD/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 08:49:55
|
Revision: 169 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=169&view=rev Author: wolfspindler Date: 2009-06-26 08:49:53 +0000 (Fri, 26 Jun 2009) Log Message: ----------- CHANGE: -Private and statics are also shown now. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:48:34 UTC (rev 168) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:49:53 UTC (rev 169) @@ -13,3 +13,5 @@ EXTRACT_LOCAL_METHODS = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 08:48:36
|
Revision: 168 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=168&view=rev Author: wolfspindler Date: 2009-06-26 08:48:34 +0000 (Fri, 26 Jun 2009) Log Message: ----------- CHANGE: -Hiding of undocumented stuff disabled, showing of local classes enabled. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:44:40 UTC (rev 167) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:48:34 UTC (rev 168) @@ -9,3 +9,7 @@ SEARCHENGINE = YES ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 4 +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 08:44:41
|
Revision: 167 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=167&view=rev Author: wolfspindler Date: 2009-06-26 08:44:40 +0000 (Fri, 26 Jun 2009) Log Message: ----------- ENH: -Generation of search engine and alphabetical index enabled. Usage of search engine will require a web server on the machine where the doxygen generated pages are located. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:23:37 UTC (rev 166) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-26 08:44:40 UTC (rev 167) @@ -6,3 +6,6 @@ HAVE_DOT = NO GENERATE_QHP = YES RECURSIVE = YES +SEARCHENGINE = YES +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 4 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 08:23:39
|
Revision: 166 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=166&view=rev Author: wolfspindler Date: 2009-06-26 08:23:37 +0000 (Fri, 26 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class indexes. -Some stuff translated to english, minor typos and bugs fixed, some node and inheritance infos added for more compact overview information. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/AnimationExecuter.h trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.h trunk/UMD/METK/Sources/ML/Animation/UMDCampath/LinearCampath.h trunk/UMD/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h trunk/UMD/METK/Sources/ML/Animation/UMDCampath/UMDCampath.h trunk/UMD/METK/Sources/common/kBasics.h Modified: trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/AnimationExecuter.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/AnimationExecuter.h 2009-06-26 08:08:24 UTC (rev 165) +++ trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/AnimationExecuter.h 2009-06-26 08:23:37 UTC (rev 166) @@ -204,7 +204,7 @@ //@} - //Structure for a single point in transfer function + //! Structure for a single point in transfer function. struct TFPoint { float voxel; Modified: trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.h 2009-06-26 08:08:24 UTC (rev 165) +++ trunk/UMD/METK/Sources/ML/Animation/UMDCampath/GoogleCampath.h 2009-06-26 08:23:37 UTC (rev 166) @@ -1,3 +1,7 @@ + +//! Class GoogleCampath derived from AbstractCampath. +//! \file GoogleCampath.h + #ifndef _GOOGLECAMPATH_ #define _GOOGLECAMPATH_ @@ -5,6 +9,7 @@ ML_START_NAMESPACE +//! Class GoogleCampath derived from AbstractCampath. class GoogleCampath:public AbstractCampath{ public: GoogleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, Modified: trunk/UMD/METK/Sources/ML/Animation/UMDCampath/LinearCampath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDCampath/LinearCampath.h 2009-06-26 08:08:24 UTC (rev 165) +++ trunk/UMD/METK/Sources/ML/Animation/UMDCampath/LinearCampath.h 2009-06-26 08:23:37 UTC (rev 166) @@ -1,3 +1,7 @@ + +//! Class LinearCampath derived from AbstractCampath. +//! \file LinearCampath.h + #ifndef _LINEARCAMPATH_ #define _LINEARCAMPATH_ @@ -5,6 +9,7 @@ ML_START_NAMESPACE +//! Class LinearCampath derived from AbstractCampath. class LinearCampath:public AbstractCampath{ public: LinearCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, Modified: trunk/UMD/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h 2009-06-26 08:08:24 UTC (rev 165) +++ trunk/UMD/METK/Sources/ML/Animation/UMDCampath/RectangleCampath.h 2009-06-26 08:23:37 UTC (rev 166) @@ -1,3 +1,7 @@ + +//! Class RectangleCampath derived from AbstractCampath. +//! \file RectangleCampath.h + #ifndef _RECTANGLECAMPATH_ #define _RECTANGLECAMPATH_ @@ -5,6 +9,7 @@ ML_START_NAMESPACE +//! Class RectangleCampath derived from AbstractCampath. class RectangleCampath:public AbstractCampath{ public: RectangleCampath(ObjMgrCommunicator*,StringField*,kScriptFrameList*,kCamera*,AnimationCache*, Modified: trunk/UMD/METK/Sources/ML/Animation/UMDCampath/UMDCampath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/UMDCampath/UMDCampath.h 2009-06-26 08:08:24 UTC (rev 165) +++ trunk/UMD/METK/Sources/ML/Animation/UMDCampath/UMDCampath.h 2009-06-26 08:23:37 UTC (rev 166) @@ -1,3 +1,7 @@ + +//! Base class for classes such as RectangleCamPath, LinearCamPath, HeightCamPath, GoogleCamPath, GoogleRectangleCampath. +//! \file UMDCampath.h + #ifndef _UMDCAMPATH_ #define _UMDCAMPATH_ @@ -12,6 +16,8 @@ #include "UMDAnimation2/AnimationCache.h" ML_START_NAMESPACE + +//! Helper class ScenePosition for the base class AbstractCamPath. struct ScenePosition { vec3 position; @@ -23,6 +29,7 @@ ScenePosition(){} }; +//! Base class for classes such as RectangleCamPath, LinearCamPath, HeightCamPath, GoogleCamPath, GoogleRectangleCampath. class AbstractCampath { public: Modified: trunk/UMD/METK/Sources/common/kBasics.h =================================================================== --- trunk/UMD/METK/Sources/common/kBasics.h 2009-06-26 08:08:24 UTC (rev 165) +++ trunk/UMD/METK/Sources/common/kBasics.h 2009-06-26 08:23:37 UTC (rev 166) @@ -1,10 +1,11 @@ //---------------------------------------------------------------------------------- +//! kBasics namespace contains all often used functions, for examples for conversions. /*! // \file kBasics.h // \author Konrad M\xFChler // \date 2005-07-05 // -// +// */ //---------------------------------------------------------------------------------- @@ -18,7 +19,7 @@ #ifndef common_EXPORTS #define __COMMON_IMPORTEXPORT __declspec(dllimport) #else -#define __COMMON_IMPORTEXPORT __declspec(dllexport) +#define __COMMON_IMPORTEXPORT __declspec(dllexport) #endif #else #define __COMMON_IMPORTEXPORT @@ -27,9 +28,9 @@ #include <iostream> #include <fstream> -#include <iomanip> +#include <iomanip> #include <string> -#include <sstream> +#include <sstream> #pragma warning(disable:4786) #include <list> #include <vector> @@ -44,102 +45,107 @@ using namespace std; -//! kBasics contains all often used functions, i.e. for convertions. +//! kBasics contains all often used functions, for examples for conversions. namespace kBasics { - struct optionstruct{ - string name; - int count; - char shortname; - optionstruct(string n,int c,char s):name(n),count(c),shortname(s){} - optionstruct():name(""),count(0),shortname(' '){} - }; - const double PI = 3.1415926535897932384626433832795028841972; + struct optionstruct{ + string name; + int count; + char shortname; + optionstruct(string n,int c,char s):name(n),count(c),shortname(s){} + optionstruct():name(""),count(0),shortname(' '){} + }; + const double PI = 3.1415926535897932384626433832795028841972; - const char QUOTATION_SINGLE = '\''; - const char QUOTATION_DOUBLE = '\"'; + const char QUOTATION_SINGLE = '\''; + const char QUOTATION_DOUBLE = '\"'; - struct POINT { - int x,y; - POINT() : x(-1), y(-1) {} // default constructor - POINT(int x_, int y_) : x(x_), y(y_) {} // constructor - }; + //! Often used point data structure located in namespace kBasics. + struct POINT { + int x,y; + POINT() : x(-1), y(-1) {} // default constructor + POINT(int x_, int y_) : x(x_), y(y_) {} // constructor + }; - struct POINTF { - float x,y; - POINTF() : x(-1), y(-1) {} // default constructor - POINTF(float x_, float y_) : x(x_), y(y_) {} // constructor - }; + //! Often used point data structure with floating point corner located in namespace kBasics. + struct POINTF { + float x,y; + POINTF() : x(-1), y(-1) {} // default constructor + POINTF(float x_, float y_) : x(x_), y(y_) {} // constructor + }; - struct LINE { - POINT p1,p2; - }; + //! Often used line data structure located in namespace kBasics. + struct LINE { + POINT p1,p2; + }; - struct LINEF { - POINTF p1,p2; - }; + //! Often used line data structure with floating point corners located in namespace kBasics. + struct LINEF { + POINTF p1,p2; + }; - struct BOX { - POINT corner1,corner2,corner3,corner4; - }; + //! Often used box data structure located in namespace kBasics. + struct BOX { + POINT corner1,corner2,corner3,corner4; + }; - //-------------------------------------------------------- - //Functions - //-------------------------------------------------------- - __COMMON_IMPORTEXPORT void split(const string toSplit,const char delimiter, const int max_size, vector<string>* strVector); - __COMMON_IMPORTEXPORT void splitQuotated(const string toSplit, const char delimiter, const char quotationmark, vector<string>* strVector); - __COMMON_IMPORTEXPORT const string CharToString(const char* value); - __COMMON_IMPORTEXPORT const int StringToInt(const string value); - __COMMON_IMPORTEXPORT const string IntToString(const int value); - __COMMON_IMPORTEXPORT float StringToFloat(const string value); - __COMMON_IMPORTEXPORT const string FloatToString(const float value); - __COMMON_IMPORTEXPORT double StringToDouble(const string value); - __COMMON_IMPORTEXPORT const string DoubleToString(const double value); - __COMMON_IMPORTEXPORT const string BoolToString(const bool value); - __COMMON_IMPORTEXPORT const bool StringToBool(const string value); - __COMMON_IMPORTEXPORT const string eraseStrPart(const string toDelete, string orgString); - __COMMON_IMPORTEXPORT const string replaceString(string s, const string value, const string replacement); - __COMMON_IMPORTEXPORT const string replaceString(string s, const char value, const string replacement); - __COMMON_IMPORTEXPORT const string trimString(string s, char c=' '); - //__COMMON_IMPORTEXPORT const string trimStringLFCR(string s); - __COMMON_IMPORTEXPORT const string trimQuotatedStr(string value, const char quotationmark); - __COMMON_IMPORTEXPORT const string getPath(const string value, const char slash); - __COMMON_IMPORTEXPORT const string getFilename(const string value, const char slash); - __COMMON_IMPORTEXPORT const string Vec3fToString(const SbVec3f value,const char delimiter); - __COMMON_IMPORTEXPORT const string Vec3fToString(const SbVec3f value); - __COMMON_IMPORTEXPORT const SbVec3f StringToVec3f(const string value, const char delimiter); - __COMMON_IMPORTEXPORT const string SbRotationToString(const SbRotation value); - __COMMON_IMPORTEXPORT const string toUp(string value); //toUppercase - __COMMON_IMPORTEXPORT const double maxDiff(const SbVec3f value1, const SbVec3f value2); - __COMMON_IMPORTEXPORT const double maxDiff(const SbVec4f value1, const SbVec4f value2); - __COMMON_IMPORTEXPORT const bool fileExists(const char* fileName); - __COMMON_IMPORTEXPORT const string leadingZero(int number, int totalLength); - __COMMON_IMPORTEXPORT const SbVec3f RGB_to_HSV( SbVec3f RGB ); - __COMMON_IMPORTEXPORT SbVec3f HSV_to_RGB( SbVec3f HSV ); - __COMMON_IMPORTEXPORT char getOptions(vector<string>& in,const list<optionstruct>& options,string& value); + //-------------------------------------------------------- + //Functions + //-------------------------------------------------------- + __COMMON_IMPORTEXPORT void split(const string toSplit,const char delimiter, const int max_size, vector<string>* strVector); + __COMMON_IMPORTEXPORT void splitQuotated(const string toSplit, const char delimiter, const char quotationmark, vector<string>* strVector); + __COMMON_IMPORTEXPORT const string CharToString(const char* value); + __COMMON_IMPORTEXPORT const int StringToInt(const string value); + __COMMON_IMPORTEXPORT const string IntToString(const int value); + __COMMON_IMPORTEXPORT float StringToFloat(const string value); + __COMMON_IMPORTEXPORT const string FloatToString(const float value); + __COMMON_IMPORTEXPORT double StringToDouble(const string value); + __COMMON_IMPORTEXPORT const string DoubleToString(const double value); + __COMMON_IMPORTEXPORT const string BoolToString(const bool value); + __COMMON_IMPORTEXPORT const bool StringToBool(const string value); + __COMMON_IMPORTEXPORT const string eraseStrPart(const string toDelete, string orgString); + __COMMON_IMPORTEXPORT const string replaceString(string s, const string value, const string replacement); + __COMMON_IMPORTEXPORT const string replaceString(string s, const char value, const string replacement); + __COMMON_IMPORTEXPORT const string trimString(string s, char c=' '); + //__COMMON_IMPORTEXPORT const string trimStringLFCR(string s); + __COMMON_IMPORTEXPORT const string trimQuotatedStr(string value, const char quotationmark); + __COMMON_IMPORTEXPORT const string getPath(const string value, const char slash); + __COMMON_IMPORTEXPORT const string getFilename(const string value, const char slash); + __COMMON_IMPORTEXPORT const string Vec3fToString(const SbVec3f value,const char delimiter); + __COMMON_IMPORTEXPORT const string Vec3fToString(const SbVec3f value); + __COMMON_IMPORTEXPORT const SbVec3f StringToVec3f(const string value, const char delimiter); + __COMMON_IMPORTEXPORT const string SbRotationToString(const SbRotation value); + __COMMON_IMPORTEXPORT const string toUp(string value); //toUppercase + __COMMON_IMPORTEXPORT const double maxDiff(const SbVec3f value1, const SbVec3f value2); + __COMMON_IMPORTEXPORT const double maxDiff(const SbVec4f value1, const SbVec4f value2); + __COMMON_IMPORTEXPORT const bool fileExists(const char* fileName); + __COMMON_IMPORTEXPORT const string leadingZero(int number, int totalLength); + __COMMON_IMPORTEXPORT const SbVec3f RGB_to_HSV( SbVec3f RGB ); + __COMMON_IMPORTEXPORT SbVec3f HSV_to_RGB( SbVec3f HSV ); + __COMMON_IMPORTEXPORT char getOptions(vector<string>& in,const list<optionstruct>& options,string& value); - template <typename T> - __COMMON_IMPORTEXPORT const short Signum(T value); - __COMMON_IMPORTEXPORT const int round(float value); + template <typename T> + __COMMON_IMPORTEXPORT const short Signum(T value); + __COMMON_IMPORTEXPORT const int round(float value); - __COMMON_IMPORTEXPORT void DebugTest(string debugStr, short level); + __COMMON_IMPORTEXPORT void DebugTest(string debugStr, short level); - __COMMON_IMPORTEXPORT void initRand(); - __COMMON_IMPORTEXPORT int random( int a, int e); + __COMMON_IMPORTEXPORT void initRand(); + __COMMON_IMPORTEXPORT int random( int a, int e); - __COMMON_IMPORTEXPORT void quickSort(double* values, int start, int end); + __COMMON_IMPORTEXPORT void quickSort(double* values, int start, int end); - __COMMON_IMPORTEXPORT double getCurrentTime(); + __COMMON_IMPORTEXPORT double getCurrentTime(); - __COMMON_IMPORTEXPORT bool lineIntersection(POINT p1, POINT p2, POINT p3, POINT p4, POINT &intersectionPoint); - __COMMON_IMPORTEXPORT bool boxIntersection(POINT r1_corner1, POINT r1_corner2, POINT r2_corner1, POINT r2_corner2, BOX &intersectionBox); - __COMMON_IMPORTEXPORT bool pointInBox(POINTF p1, POINT corner1, POINT corner2); - __COMMON_IMPORTEXPORT long hex2int(const string& hexStr); + __COMMON_IMPORTEXPORT bool lineIntersection(POINT p1, POINT p2, POINT p3, POINT p4, POINT &intersectionPoint); + __COMMON_IMPORTEXPORT bool boxIntersection(POINT r1_corner1, POINT r1_corner2, POINT r2_corner1, POINT r2_corner2, BOX &intersectionBox); + __COMMON_IMPORTEXPORT bool pointInBox(POINTF p1, POINT corner1, POINT corner2); + __COMMON_IMPORTEXPORT long hex2int(const string& hexStr); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 08:08:29
|
Revision: 165 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=165&view=rev Author: wolfspindler Date: 2009-06-26 08:08:24 +0000 (Fri, 26 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class indexes. -Some stuff translated to english, minor typos and bugs fixed, some node and inheritance infos added for more compact overview information. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/METK2DLabeling/SoDraw2DLabels/SoDraw2DLabels.h trunk/UMD/METK/Sources/ML/METKLiftChart/LiftChartData.h trunk/UMD/METK/Sources/ML/METKLiftChart/SoView2DLiftChart.h trunk/UMD/METK/Sources/ML/METKSurfaceDistance/mlMETKSurfaceDistance3D.h Modified: trunk/UMD/METK/Sources/ML/METK2DLabeling/SoDraw2DLabels/SoDraw2DLabels.h =================================================================== --- trunk/UMD/METK/Sources/ML/METK2DLabeling/SoDraw2DLabels/SoDraw2DLabels.h 2009-06-26 07:58:03 UTC (rev 164) +++ trunk/UMD/METK/Sources/ML/METK2DLabeling/SoDraw2DLabels/SoDraw2DLabels.h 2009-06-26 08:08:24 UTC (rev 165) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoDraw2DLabels derived from SoView2DExtension +//! Inventor node SoDraw2DLabels derived from SoView2DExtension. /*! // \file SoDraw2DLabels.h // \author Konrad M\xFChler // \date 2008-05-08 // -// +// */ //---------------------------------------------------------------------------------- @@ -33,91 +33,91 @@ #include "kBasics.h" -//! +//! Inventor node SoDraw2DLabels derived from SoView2DExtension. class UMDDRAW2DLABELS_EXPORT SoDraw2DLabels : public SoView2DExtension { - //! Implements the runtime type system interface of this new node. - SO_NODE_HEADER(SoDraw2DLabels); + //! Implements the runtime type system interface of this new node. + SO_NODE_HEADER(SoDraw2DLabels); public: - //! Constructor - SoDraw2DLabels(); + //! Constructor + SoDraw2DLabels(); - //! Initializes this class (called on dll initialization). - static void initClass(); + //! Initializes this class (called on dll initialization). + static void initClass(); - //@{! Fields - SoSFString _CSOFld; - //@} + //@{! Fields + SoSFString _CSOFld; + //@} - //! Handling of events occurring in the viewer. - virtual bool evalEvent(SoView2D *view2d, View2DSliceList *list, - View2DEvent* event, View2DEventPhase phase); + //! Handling of events occurring in the viewer. + virtual bool evalEvent(SoView2D *view2d, View2DSliceList *list, + View2DEvent* event, View2DEventPhase phase); - //! Virtual method called by the \c SoView2D node when an image is rendered. - virtual void draw(View2DSliceList *list, View2DSlice *slice, int z); + //! Virtual method called by the \c SoView2D node when an image is rendered. + virtual void draw(View2DSliceList *list, View2DSlice *slice, int z); - int addLabel(kBasics::POINT &anchorPoint, kBasics::POINT &labelPoint, kBasics::POINT &lineEndPoint, int groupType, string &labelText, int borderDistance, int optFactor, bool encircle, float encircleSize, SbVec3f textColor, SbVec3f boxColor, float boxTransparency, SbVec3f borderColor, SbVec3f lineColor, string &objID); - void clearLabels(); + int addLabel(kBasics::POINT &anchorPoint, kBasics::POINT &labelPoint, kBasics::POINT &lineEndPoint, int groupType, string &labelText, int borderDistance, int optFactor, bool encircle, float encircleSize, SbVec3f textColor, SbVec3f boxColor, float boxTransparency, SbVec3f borderColor, SbVec3f lineColor, string &objID); + void clearLabels(); - void setFontSize(const int iSize); - void setInnerBorder(const int iValue); - void getTextDimension(const string sText, int &width, int &height, int optFactor); - void setSendCSO(const bool bValue); + void setFontSize(const int iSize); + void setInnerBorder(const int iValue); + void getTextDimension(const string sText, int &width, int &height, int optFactor); + void setSendCSO(const bool bValue); - static const int GROUPTYPE_NONE; - static const int GROUPTYPE_PARENT; - static const int GROUPTYPE_CHILD; + static const int GROUPTYPE_NONE; + static const int GROUPTYPE_PARENT; + static const int GROUPTYPE_CHILD; protected: - //! Protected destructor - virtual ~SoDraw2DLabels(); + //! Protected destructor + virtual ~SoDraw2DLabels(); private: - // your own member variables... + // your own member variables... - //! Helper variable to store last selected point where a cross shall be drawn - //! during mouse interaction. Default is the invalid position (-1,-1,-1). - SbVec3f _lastSelectedPos; + //! Helper variable to store last selected point where a cross shall be drawn + //! during mouse interaction. Default is the invalid position (-1,-1,-1). + SbVec3f _lastSelectedPos; - struct LABEL { - kBasics::POINT anchorPoint; - kBasics::POINTF anchorPointDev; - kBasics::POINT labelPoint; - kBasics::POINTF labelPointDev; - kBasics::POINT lineEndPoint; - kBasics::POINTF lineEndPointDev; - kBasics::POINT labelSize; - int groupType; - string labelText; - bool encircle; - float encircleSize; - SbVec3f textColor; - SbVec3f boxColor; - SbVec3f borderColor; - SbVec3f lineColor; - float boxTransparency; - string objID; - }; + struct LABEL { + kBasics::POINT anchorPoint; + kBasics::POINTF anchorPointDev; + kBasics::POINT labelPoint; + kBasics::POINTF labelPointDev; + kBasics::POINT lineEndPoint; + kBasics::POINTF lineEndPointDev; + kBasics::POINT labelSize; + int groupType; + string labelText; + bool encircle; + float encircleSize; + SbVec3f textColor; + SbVec3f boxColor; + SbVec3f borderColor; + SbVec3f lineColor; + float boxTransparency; + string objID; + }; - std::vector<LABEL> _labels; + std::vector<LABEL> _labels; - int _fontSize; - int _innerBorder; - View2DFont* _font; - bool _fontValid; - View2DSliceList *_dsl; - View2DSlice *_dslice; - bool _setCSO; - string CSO; + int _fontSize; + int _innerBorder; + View2DFont* _font; + bool _fontValid; + View2DSliceList *_dsl; + View2DSlice *_dslice; + bool _setCSO; + string CSO; - void _circle(float x, float y, const float r); - void _circleSolid(float x, float y, const float r); + void _circle(float x, float y, const float r); + void _circleSolid(float x, float y, const float r); }; Modified: trunk/UMD/METK/Sources/ML/METKLiftChart/LiftChartData.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKLiftChart/LiftChartData.h 2009-06-26 07:58:03 UTC (rev 164) +++ trunk/UMD/METK/Sources/ML/METKLiftChart/LiftChartData.h 2009-06-26 08:08:24 UTC (rev 165) @@ -1,6 +1,7 @@ //---------------------------------------------------------------------------------- +//! Classes related to Lift Chart modules. /*! -// \file LiftChart.h +// \file LiftChartData.h // \author Christian Tietjen // \date 2007-01-17 */ @@ -22,16 +23,16 @@ /////////////////////////////////////////////////////////////////////// // -// class LiftChartData +//! Class LiftChartData // /////////////////////////////////////////////////////////////////////// class LiftChartData { public: - + LiftChartData(); ~LiftChartData(); - + void sortStructures(); Structure* addStructure(); @@ -43,26 +44,26 @@ const bool getStructureVisible(T_ConstStructureIterator structure); enum Aggregation {AGGREGATE_ALL, AGGREGATE_STRUCTURE, AGGREGATE_STRUCTUREGROUP, AGGREGATE_NONE}; - + void setAggregation(Aggregation aggregation); Aggregation getAggregation(); - + //! Set/Get minimum allowed importance of a single structure in percent. void setMinImportance(const float importance); const float getMinImportance() const; - + //! Set/Get maximum allowed extent of a single structure in percent. void setMaxExtent(const float extent); const float getMaxExtent() const; - + //! Set/Get division by side (Left/Ambilateral/Right). If no tag is set (Unknown), use the function below. void setDivideBySide(const bool divideBySide); const bool getDivideBySide() const; - + //! Set/Get display of structures with Side tag (Unknown). void setHideSideUnkown(const bool hideSideUnkown); const bool getHideSideUnkown() const; - + //! Get/Set the extent of the overall dataset. This is needed for the computation of the reletive size of the single structures. const float* getMin() const; const float* getMax() const; @@ -72,7 +73,7 @@ int numStructures(); int numBookmarks(); - + //! Returns a const_iterator pointing to the beginning of the Column container inline T_ConstStructureIterator structureBegin() { return _structureVec.begin(); @@ -81,7 +82,7 @@ inline T_ConstStructureIterator structureEnd() { return _structureVec.end(); } - + //! Returns a const_iterator pointing to the beginning of the sorted container inline T_ConstStructureIterator structureSortedBegin() { return _orderedStructureVec.begin(); @@ -90,7 +91,7 @@ inline T_ConstStructureIterator structureSortedEnd() { return _orderedStructureVec.end(); } - + //! Returns a const_iterator pointing to the beginning of the Bookmark container inline T_ConstBookmarkIterator bookmarkBegin() { return _bookmarkVec.begin(); @@ -99,48 +100,48 @@ inline T_ConstBookmarkIterator bookmarkEnd() { return _bookmarkVec.end(); } - + private: - + //! vector containing all structures std::vector<Structure*> _structureVec; - + //! vector containing all structures in sorted order std::vector<Structure*> _orderedStructureVec; - + //! vector containing all bookmarks std::vector<Bookmark*> _bookmarkVec; Aggregation _aggregation; float _start[3], _end[3]; - + float _minImportance; float _maxExtent; - + bool _divideBySide; bool _hideSideUnkown; }; /////////////////////////////////////////////////////////////////////// // -// class LiftChartDataItem +//! Class LiftChartDataItem used as base class, for example for Structure and Bookmark. // /////////////////////////////////////////////////////////////////////// class LiftChartDataItem { public: - + LiftChartDataItem(); ~LiftChartDataItem(); - + void setImportance(const float imp); float getImportance(); const bool getVisible() const; - + enum Side {LEFT, RIGHT, AMBILATERAL, UNKNOWN}; void setSide(Side side); Side getSide(); - + void setName(const std::string name); std::string getName(); @@ -153,16 +154,16 @@ /////////////////////////////////////////////////////////////////////// // -// class Structure +//! Class Structure derived from LiftChartDataItem. // /////////////////////////////////////////////////////////////////////// class Structure : public LiftChartDataItem { public: - + Structure(); ~Structure(); - + const float* getMin() const; const float* getMax() const; void setExtension(const float* start, const float* end); @@ -177,7 +178,7 @@ void setStructureGroup(const std::string _structure); const std::string getStructureGroup() const; void setPickStyle(const bool _pickStyle = false); - + private: float _start[3], _end[3]; float _rgba[4]; @@ -192,19 +193,19 @@ /////////////////////////////////////////////////////////////////////// // -// class Bookmark +//! Class Bookmark derived from LiftChartDataItem. // /////////////////////////////////////////////////////////////////////// class Bookmark : public LiftChartDataItem { public: - + Bookmark(); ~Bookmark(); - + void setPosition(float* pos); const float* getPosition(); - + private: float _position[3]; }; Modified: trunk/UMD/METK/Sources/ML/METKLiftChart/SoView2DLiftChart.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKLiftChart/SoView2DLiftChart.h 2009-06-26 07:58:03 UTC (rev 164) +++ trunk/UMD/METK/Sources/ML/METKLiftChart/SoView2DLiftChart.h 2009-06-26 08:08:24 UTC (rev 165) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoView2DLiftChart derived from SoView2DExtension +//! Inventor node SoView2DLiftChart derived from SoView2DExtension. /*! // \file SoView2DLiftChart.h // \author Christian Tietjen // \date 2006-03-30 // -// +// */ //---------------------------------------------------------------------------------- @@ -31,7 +31,7 @@ #include "LiftChartData.h" -//! +//! Inventor node SoView2DLiftChart derived from SoView2DExtension. class METKLIFTCHART_EXPORT SoView2DLiftChart : public SoView2DExtension { //! Implements the runtime type system interface of this new node. @@ -92,7 +92,7 @@ float mapWorldToChart(const float* world); void mapWorldToVoxel(const float* world, float &voxelX, float &voxelY, float &voxelZ); float getRatio(); - + const bool structureIsVisible(T_ConstStructureIterator iter); struct ltstr Modified: trunk/UMD/METK/Sources/ML/METKSurfaceDistance/mlMETKSurfaceDistance3D.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKSurfaceDistance/mlMETKSurfaceDistance3D.h 2009-06-26 07:58:03 UTC (rev 164) +++ trunk/UMD/METK/Sources/ML/METKSurfaceDistance/mlMETKSurfaceDistance3D.h 2009-06-26 08:08:24 UTC (rev 165) @@ -1,3 +1,7 @@ + +//! ML ObjMgrClient module METKSurfaceDistance3D. +//! \file mlMETKSurfaceDistance3D.h + #ifndef __MLMETKSurfaceDistance3D_H #define __MLMETKSurfaceDistance3D_H @@ -21,34 +25,35 @@ typedef std::vector<SoColorShape*>::const_iterator T_ConstColorShapeIterator; class BoundingBox; -//! + +//! ML ObjMgrClient module METKSurfaceDistance3D. class METKSURFACEDISTANCE_EXPORT METKSurfaceDistance3D : public ObjMgrClient { public: - + //! Constructor. METKSurfaceDistance3D(); ~METKSurfaceDistance3D (void); - + //! Handle field changes of the field \c field. virtual void handleNotification (Field *field); - + virtual void handleObjMgrNotification(); - + virtual void activateAttachments(); - + //! Read out image data at the nodes' positions. void setBoundingBox(SbBox3f* bbox); float getImageValue(const SbVec3f* vertex); private: - + typedef ObjMgrClient inherited; - + // ---------------------------------------------------------- //@{ \name Module field declarations // ---------------------------------------------------------- - + SoNodeField* _outInventor; FloatField* _nearDistance; @@ -57,18 +62,18 @@ FloatField* _farDistance; ColorField* _farDistanceColor; //@} - + SoSeparator* _outGroup; void addStructure(SoNode* node); void removeStructure(SoNode* node); T_ColorShapeVec _colorShapeVec; - + //! Do we have a valid input image? bool _inputImageIsValid; - + //! A pointer to the input image. PagedImg* _image; - + //! Memory containing the sub image void* _memSlice; float* _subImageMemory; @@ -81,7 +86,7 @@ //! Image properties: Image extend //BoundingBox* _boundingBox; SubImgBox* _inImageBox; - + //! Implements interface for the runtime type system of the ML. ML_CLASS_HEADER(METKSurfaceDistance3D) }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-26 07:58:07
|
Revision: 164 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=164&view=rev Author: wolfspindler Date: 2009-06-26 07:58:03 +0000 (Fri, 26 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class indexes. -Some stuff translated to english, minor typos and bugs fixed, some node and inheritance infos added for more compact overview information. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/METKLiftChart/mlMETKLiftChart.h trunk/UMD/METK/Sources/ML/METKMessaging/METKMsgManager.h trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKGlobalMessages.h trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.h trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.h trunk/UMD/METK/Sources/ML/METKPicking/SoPickObject.h trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h trunk/UMD/METK/Sources/ML/METKSurfaceDistance/SoColorShape.h trunk/UMD/METK/Sources/ML/METKUndo/mlMETKUndo.h trunk/UMD/METK/Sources/ML/UMDBoundingBox2/mlUMDBoundingBox2.h trunk/UMD/METK/Sources/ML/UMDBoundingBoxCalculator2/mlUMDBoundingBoxCalculator2.h trunk/UMD/METK/Sources/ML/UMDCodedSegmentation/mlCalcCodedSegmentation.h trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.h trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h trunk/UMD/METK/Sources/ML/UMDObjDemo/mlUMDObjDemo.h trunk/UMD/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.h trunk/UMD/METK/Sources/ML/UMDSoSceneWriterMD/mlSoSceneWriterMD.h trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPath/METKCalcCamPath.h trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h trunk/UMD/METK/Sources/ML/Viewpoint/METKIntraOPViewpoint/mlMETKIntraOPViewpoint.h trunk/UMD/METK/Sources/ML/Viewpoint/METKKeystates/Constants.h trunk/UMD/METK/Sources/ML/Viewpoint/METKKeystates/METKKeystates.h trunk/UMD/METK/Sources/ML/Viewpoint/METKShowClusteredObjects/METKShowClusteredObjects.h trunk/UMD/METK/Sources/ML/Viewpoint/METKToSolverConnection/METKToSolverConnection.h trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer/SoVisDataViewer.h trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.h trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisibilitySolver/SoVisibilitySolver.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpField.h Modified: trunk/UMD/METK/Sources/ML/METKLiftChart/mlMETKLiftChart.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKLiftChart/mlMETKLiftChart.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKLiftChart/mlMETKLiftChart.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,4 +1,5 @@ //---------------------------------------------------------------------------------- +//! ML ObjMgrClient METKLiftChart module METKLiftChart. /*! // \file mlMETKLiftChart.h // \author Christian Tietjen @@ -25,33 +26,33 @@ ML_START_NAMESPACE -//! +//! ML ObjMgrClient METKLiftChart module METKLiftChart. class METKLIFTCHART_EXPORT METKLiftChart : public ObjMgrClient { public: - //! Constructor/Destructor. - METKLiftChart(); + //! Constructor/Destructor. + METKLiftChart(); ~METKLiftChart(); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); + virtual void handleObjMgrNotification(); - virtual void activateAttachments(); + virtual void activateAttachments(); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- - //! - + //! + BoolField* _active; EnumField* _aggregation; FloatField* _minImportance; @@ -63,7 +64,7 @@ SoNodeField* _outInventor; - //@} + //@} SoView2DLiftChart* _view2DLiftChart; @@ -73,8 +74,8 @@ // next available structure which provides all necessary data const omObject* getNextStructure(const omObject* current = 0); - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(METKLiftChart) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(METKLiftChart) }; Modified: trunk/UMD/METK/Sources/ML/METKMessaging/METKMsgManager.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/METKMsgManager.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKMessaging/METKMsgManager.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,3 +1,7 @@ + +//! The class METKMsgManager. +//! \file METKMsgManager.h + #ifndef _METKMSGMANAGER_H #define _METKMSGMANAGER_H @@ -6,17 +10,18 @@ #include <vector> +//! The class METKMsgManager. class METKMsgManager { - + public: typedef std::vector<const ml::METKMsgReceiver*> T_ReceiverVec; typedef std::vector<const ml::METKMsgReceiver*>::iterator T_ReceiverIterator; typedef std::vector<const ml::METKMsgReceiver*>::const_iterator T_ConstReceiverIterator; - + typedef std::vector<const ml::METKMsgSender*> T_SenderVec; typedef std::vector<const ml::METKMsgSender*>::iterator T_SenderIterator; typedef std::vector<const ml::METKMsgSender*>::const_iterator T_ConstSenderIterator; - + //! this function must be called in the constructor of the calling inventor node static const void add(const ml::METKMsgReceiver* receiver); static const void add(const ml::METKMsgSender* sender); @@ -26,12 +31,12 @@ static const void remove(const ml::METKMsgSender* sender); static const int numListener(const ml::METKMsgSender* sender); - + protected: //! no one can call the con-/ destructor directly. Use the methods add/remove instead METKMsgManager(); virtual ~METKMsgManager(); - + private: //! pointer to the one and only instance of METKMsgManager static METKMsgManager* metkMsgManager; Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKGlobalMessages.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKGlobalMessages.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKGlobalMessages.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,3 +1,7 @@ + +//! ML ObjMgrClient module METKGlobalMessages. +//! \file mlMETKGlobalMessages.h + #ifndef __MLMETKGLOBALMESSAGES_H #define __MLMETKGLOBALMESSAGES_H @@ -18,37 +22,37 @@ ML_START_NAMESPACE -//! +//! ML ObjMgrClient module METKGlobalMessages. class METKMESSAGING_EXPORT METKGlobalMessages : public ObjMgrClient { public: - //! Constructor. - METKGlobalMessages(); + //! Constructor. + METKGlobalMessages(); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); + virtual void handleObjMgrNotification(); - virtual void activateAttachments(); + virtual void activateAttachments(); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- - - NotifyField* loadedFld; + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- + + NotifyField* loadedFld; NotifyField* cleanupFld; - StringField* lastMessageFld; + StringField* lastMessageFld; //@} - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(METKGlobalMessages) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(METKGlobalMessages) }; Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,3 +1,7 @@ + +//! ML ObjMgrClient module METKMsgReceiver. +//! \file mlMETKMsgReceiver.h + #ifndef __MLMETKMSGRECEIVER_H #define __MLMETKMSGRECEIVER_H @@ -17,48 +21,48 @@ ML_START_NAMESPACE -//! +//! ML ObjMgrClient module METKMsgReceiver. class METKMESSAGING_EXPORT METKMsgReceiver : public ObjMgrClient { - + public: - + //! Constructor. METKMsgReceiver(); ~METKMsgReceiver(); - + StringField* messageFld; - NotifyField* doneFld; - + NotifyField* doneFld; + //! Handle field changes of the field \c field. virtual void handleNotification (Field *field); - + virtual void handleObjMgrNotification(); - + virtual void activateAttachments(); - + const bool isProcessing() const { return _processing; } - + const ObjMgr* getObjMgr() const; - + private: - + typedef ObjMgrClient inherited; - + // ---------------------------------------------------------- //@{ \name Module field declarations // ---------------------------------------------------------- - + StringField* dataFld; StringField* statusFld; //@} - - + + //! Implements interface for the runtime type system of the ML. ML_CLASS_HEADER(METKMsgReceiver); - + bool _processing; - + }; Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,3 +1,7 @@ + +//! ML ObjMgrClient module METKMsgSender. +//! \file mlMETKMsgSender.h + #ifndef __MLMETKMSGSENDER_H #define __MLMETKMSGSENDER_H @@ -18,27 +22,27 @@ ML_START_NAMESPACE -//! +//! ML ObjMgrClient module METKMsgSender. class METKMESSAGING_EXPORT METKMsgSender : public ObjMgrClient { public: - //! Constructor. - METKMsgSender(); - ~METKMsgSender(); + //! Constructor. + METKMsgSender(); + ~METKMsgSender(); - StringField* messageFld; - StringField* dataFld; - StringField* statusFld; - NotifyField* sendFld; + StringField* messageFld; + StringField* dataFld; + StringField* statusFld; + NotifyField* sendFld; - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); + virtual void handleObjMgrNotification(); - virtual void activateAttachments(); + virtual void activateAttachments(); const bool isSending() const { return _sending; } @@ -46,21 +50,21 @@ private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- - + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- + BoolField* doneFld; BoolField* successFld; //@} - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(METKMsgSender) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(METKMsgSender) - bool _sending; + bool _sending; }; Modified: trunk/UMD/METK/Sources/ML/METKPicking/SoPickObject.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKPicking/SoPickObject.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKPicking/SoPickObject.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoPickObject2 derived from SoGroup +//! The Inventor module class SoPickObject derived from SoGroup. /*! -// \file SoPickObject2.h +// \file SoPickObject.h // \author Konrad // \date 2005-09-28 // -// +// */ //---------------------------------------------------------------------------------- @@ -41,19 +41,19 @@ class SoEventCallback; class SoComputeBoundingBox; -//! +//! The Inventor module class SoPickObject derived from SoGroup. class SoPickObject : public SoSeparator { //! Implements the runtime type system interface of this new node. SO_NODE_HEADER(SoPickObject); - + public: //! Constructor SoPickObject(); - + //! Initializes this class (called on dll initialization). static void initClass(); - + void setMLClass(ml::METKPicking* mlPick); void setScrapLight(const float scrapLight); void setBBWeight(const float bbWeight); @@ -61,23 +61,23 @@ void setPickPixelTolerance(const int pipi); void setshowBB(const bool showBB); void setEnableMouseOver(const bool bValue); - + protected: //! Protected destructor virtual ~SoPickObject(); - + //! Callback for Mousebutton-Events static void mousePressedCB(void* userData, SoEventCallback* eventCB); void mousePressed(SoEventCallback* eventCB); //! Callback for Mouse Move Events static void mouseMovedCB(void* userData, SoEventCallback* eventCB); - void mouseMoved(SoEventCallback* eventCB); - + void mouseMoved(SoEventCallback* eventCB); + //! Callback for MouseWheel-Events //static void mouseWheelCB(void* userData, SoEventCallback* eventCB); //void mouseWheel(SoEventCallback* eventCB); - + private: SbVec2s _pressPosition; SbVec3f _worldPosition; @@ -88,13 +88,13 @@ int _pickPixelTolerance; bool _showBB; bool _enableMouseOver; - + SoComputeBoundingBox* _computeBBox; SoNode* getShape(SoEventCallback* eventCB, std::vector<SoNode*>* allObjectsInRay); SoSeparator* _debugOutput; SoSeparator* addBB(const SbVec3f& corner1, const SbVec3f& corner2); - + ml::METKPicking* _mlPick; }; Modified: trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKPicking/mlMETKPicking.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,3 +1,7 @@ + +//! ML ObjMgrClient module METKPicking. +//! \file METKPicking.h + #ifndef __MLMETKPICKING_H #define __MLMETKPICKING_H @@ -21,18 +25,18 @@ ML_START_NAMESPACE -//! +//! ML ObjMgrClient module METKPicking. class METKPICKING_EXPORT METKPicking : public ObjMgrClient { public: - + //! Constructor. METKPicking(); ~METKPicking (void); - + //! Handle field changes of the field \c field. virtual void handleNotification (Field *field); - + virtual void activateAttachments(); const float getTransparency(const SoNode* node); @@ -43,13 +47,13 @@ const bool containsNode(const SoNode* node); private: - + typedef ObjMgrClient inherited; - + // ---------------------------------------------------------- //@{ \name Module field declarations // ---------------------------------------------------------- - + FloatField* _scrapLight; FloatField* _importanceWeighting; FloatField* _boundingBoxSizeWeighting; @@ -67,12 +71,12 @@ StringField* _mouseOverList; Vec3fField* _selection; //@} - + SoPickObject* _pickObject; bool _pickedObjectFound; omObjectContainer::const_iterator _pickedObjectIter; - + //! Implements interface for the runtime type system of the ML. ML_CLASS_HEADER(METKPicking) }; Modified: trunk/UMD/METK/Sources/ML/METKSurfaceDistance/SoColorShape.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKSurfaceDistance/SoColorShape.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKSurfaceDistance/SoColorShape.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,3 +1,7 @@ + +//! Inventor node SoColorShape derived from SoGroup. +//! \file SoColorShape.h + #ifndef _SoColorShape #define _SoColorShape @@ -52,18 +56,20 @@ #include "mlMETKSurfaceDistance3D.h" + +//! Inventor node SoColorShape derived from SoGroup. class SoColorShape : public SoGroup { //! macro that defines extended methods SO_NODE_HEADER(SoColorShape); - - + + public: - + //! Constructor SoColorShape(); - + SoSFNode input; - + //! must be called first to initialize the class in OpenInventor static void initClass(); void compute(); @@ -71,42 +77,42 @@ float _nearDistance, _farDistance; SbColor _nearDistanceColor, _farDistanceColor; - - + + protected: - + //! Destructor virtual ~SoColorShape(); - + private: - + //! internal representation of the point set SoVertexProperty** _vertexPropArray; int* _sizeCoordinate3; //! the transformation matrix SbMatrix _worldMatrix; - - + + ml::METKSurfaceDistance3D* _surDis; - + //! splits the triangle if it has different color indices and stores the unique colored triangles void splitTriangle( - const SbVec3f& vertex1, const SbVec3f& vertex2, const SbVec3f& vertex3, + const SbVec3f& vertex1, const SbVec3f& vertex2, const SbVec3f& vertex3, const SbVec3f& normal1, const SbVec3f& normal2, const SbVec3f& normal3, const double& distance1, const double& distance2, const double& distance3); - + //! splits the triangle if it 2 different color indices and an extension over 2 color levels. Stores the unique colored triangles afterwards void splitTriangle2Diff2Level( - const SbVec3f& vertex1c1, const SbVec3f& vertex2c2, const SbVec3f& vertex3c2, + const SbVec3f& vertex1c1, const SbVec3f& vertex2c2, const SbVec3f& vertex3c2, const SbVec3f& normal1c1, const SbVec3f& normal2c2, const SbVec3f& normal3c2, const double& distance1c1, const double& distance2c2, const double& distance3c2); - + //! stores the given triangle void storeTriangle( - const SbVec3f& vertex1, const SbVec3f& vertex2, const SbVec3f& vertex3, + const SbVec3f& vertex1, const SbVec3f& vertex2, const SbVec3f& vertex3, const SbVec3f& normal1, const SbVec3f& normal2, const SbVec3f& normal3, const int& colorIndex1); - + //! stores a triangle with three different colored vertices void storeTriangleAllDifferent( const SbVec3f& point1, const SbVec3f& point2, const SbVec3f& point3, @@ -119,14 +125,14 @@ //! returns a vertex with wanted distance value const SbVec3f interpolateVector(const SbVec3f& vertex1, const SbVec3f& vertex2, const double& distance1, const double& distance2, const double& distanceWanted); - + //! inserts the points into the hashtable const Vertex* insertVertex(const SbVec3f vector, const SbVec3f normal, const int colorIndex, const int arrayPosition); Edge* generateEdge(const Vertex* p1, const Vertex* p2, const int arrayPosition); - + //! generate TriangleStripSets out of the collected triangles void generateITSS(); - + //! callback action to collect the points SoCallbackAction* _myAction; //! called, if a new child in the scenegraph will be traversed @@ -135,21 +141,21 @@ const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2, const SoPrimitiveVertex* v3); - + //! map hashtable containing all vertices std::set<Vertex*, ltVertex>* _vertexSet; - + //! set containing all edges std::set<Edge*, ltEdge>* _edgeSet; - + //! vector containing all triangles std::set<Triangle*>* _triangleSet; - + int _extentX, _extentY, _extentZ; SbVec3f _offSet; }; - +//! Helper/tool class for the Inventor node SoColorShape. class Vertex { public: Vertex(SbVec3f vertex, short colorIndex); @@ -159,6 +165,7 @@ }; +//! Helper/tool class for the Inventor node SoColorShape. class Edge { public: Edge(); @@ -166,12 +173,13 @@ virtual ~Edge(); Triangle* getOppositeTriangle(const Triangle* tri) const; void unrefTriangle(const Triangle* tri); - + const Vertex *vertex1, *vertex2; Triangle *triangle1, *triangle2; }; +//! Helper/tool class for the Inventor node SoColorShape. class Triangle { public: Triangle(); @@ -180,21 +188,21 @@ const Vertex* getOppositeVertex(const Edge* edge) const; const Edge* getCWEdge(const Vertex* vertex) const; const Edge* getCCWEdge(const Vertex* vertex) const; - + const Vertex *vertex1, *vertex2, *vertex3; Edge *edge1, *edge2, *edge3; }; -//! sort criterion for the hashtable set +//! Sort criterion for the hashtable set, used by the the Inventor node SoColorShape. struct ltVertex { - + //! sorts points lexicographical //! test for vertex coordinates, if they are the same, test for color index bool operator()(const Vertex* v1, const Vertex* v2) const { const float* p1 = v1->vertex.getValue(); const float* p2 = v2->vertex.getValue(); - + if (*p1 < *p2) return true; else { if (*p1 > *p2) return false; @@ -219,13 +227,13 @@ }; -//! sort criterion for the edge set +//! Sort criterion for the edge set, used by the the Inventor node SoColorShape. struct ltEdge { - + bool operator()(const Edge edge1, const Edge edge2) const { const Vertex* e1v1 = edge1.vertex1; const Vertex* e2v1 = edge2.vertex1; - + if (e1v1 < e2v1) return true; else { if (e1v1 > e2v1) return false; Modified: trunk/UMD/METK/Sources/ML/METKUndo/mlMETKUndo.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKUndo/mlMETKUndo.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/METKUndo/mlMETKUndo.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The ML module class METKUndo. +//! The ML ObjMgrClient module METKUndo. /*! // \file mlMETKUndo.h // \author kmuehler @@ -31,65 +31,65 @@ ML_START_NAMESPACE -//! +//! The ML ObjMgrClient module METKUndo. class METKUNDO_EXPORT METKUndo : public ObjMgrClient { public: - //! Constructor. - METKUndo (); - ~METKUndo(); + //! Constructor. + METKUndo (); + ~METKUndo(); - //! Handle field changes of the field field. - virtual void handleNotification (Field *field); + //! Handle field changes of the field field. + virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); + virtual void handleObjMgrNotification(); - virtual void activateAttachments (); + virtual void activateAttachments (); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- - //! - NotifyField *_UndoFld; + //! + NotifyField *_UndoFld; - //! - IntField *_undoCountFld; + //! + IntField *_undoCountFld; - //@} + //@} - struct SINGLE_EVENT { - string objID; - string layer; - string info; - string value; - //SINGLE_EVENT() : objID(""), layer(""), info(""), value("") {} // default constructor - //SINGLE_EVENT(string objID_, string layer_, string info_, string value_) : objID(objID_), layer(layer_), info(info_), value(value_) {} // constructor - }; + struct SINGLE_EVENT { + string objID; + string layer; + string info; + string value; + //SINGLE_EVENT() : objID(""), layer(""), info(""), value("") {} // default constructor + //SINGLE_EVENT(string objID_, string layer_, string info_, string value_) : objID(objID_), layer(layer_), info(info_), value(value_) {} // constructor + }; - struct UNDO_STATE { - std::vector<SINGLE_EVENT> events; - }; + struct UNDO_STATE { + std::vector<SINGLE_EVENT> events; + }; - std::vector<UNDO_STATE> _undoStates; + std::vector<UNDO_STATE> _undoStates; - SoTimerSensor* timerSensor; - static void timerEvent(void* data, SoDataSensor* a); + SoTimerSensor* timerSensor; + static void timerEvent(void* data, SoDataSensor* a); - ObjMgrCommunicator* myObjMgr; + ObjMgrCommunicator* myObjMgr; - bool _enableUndo; - bool _collectingEvents; - bool _denyOwnEvents; - bool _currentlyCreated; + bool _enableUndo; + bool _collectingEvents; + bool _denyOwnEvents; + bool _currentlyCreated; - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(METKUndo) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(METKUndo) }; Modified: trunk/UMD/METK/Sources/ML/UMDBoundingBox2/mlUMDBoundingBox2.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDBoundingBox2/mlUMDBoundingBox2.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDBoundingBox2/mlUMDBoundingBox2.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The ML module class UMDBoundingBox2. +//! The ML ObjMgrClient module UMDBoundingBox2. /*! // \file mlUMDBoundingBox2.h // \author Konrad M\xFChler // \date 2005-05-10 // -// +// */ //---------------------------------------------------------------------------------- @@ -38,38 +38,38 @@ ML_START_NAMESPACE -//! +//! The ML ObjMgrClient module UMDBoundingBox2. class UMDBOUNDINGBOX2_EXPORT UMDBoundingBox2 : public ObjMgrClient { public: - - UMDBoundingBox2 (void); - StringField* bb_BoundingBoxField; - DoubleField* bb_ObjectMinField; - DoubleField* bb_ObjectMaxField; - BoolField* bb_UpToDateField; - NotifyField* bb_UpdateField; + UMDBoundingBox2 (void); + StringField* bb_BoundingBoxField; + DoubleField* bb_ObjectMinField; + DoubleField* bb_ObjectMaxField; + BoolField* bb_UpToDateField; + NotifyField* bb_UpdateField; - virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); + virtual void handleNotification (Field *field); + virtual void handleObjMgrNotification(); + private: - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(UMDBoundingBox2) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(UMDBoundingBox2) - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - bool waitFlag; - std::string waitObjectID; + bool waitFlag; + std::string waitObjectID; - SoTimerSensor* timerUpdate; //!< Timer um das Update-Event ein klein wenig sp\xE4ter zu senden - static void timerEventUpdate(void* data, SoDataSensor* a); //!< Sends the Update-Event by calling sendNotifyUpdate - void sendNotifyUpdate(SoDataSensor* sensor); //!< Sends the Update-Event (called by timerEventUpdate) + SoTimerSensor* timerUpdate; //!< Timer um das Update-Event ein klein wenig sp\xE4ter zu senden + static void timerEventUpdate(void* data, SoDataSensor* a); //!< Sends the Update-Event by calling sendNotifyUpdate + void sendNotifyUpdate(SoDataSensor* sensor); //!< Sends the Update-Event (called by timerEventUpdate) }; Modified: trunk/UMD/METK/Sources/ML/UMDBoundingBoxCalculator2/mlUMDBoundingBoxCalculator2.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDBoundingBoxCalculator2/mlUMDBoundingBoxCalculator2.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDBoundingBoxCalculator2/mlUMDBoundingBoxCalculator2.h 2009-06-26 07:58:03 UTC (rev 164) @@ -5,7 +5,7 @@ // \author Konrad // \date 2006-05-16 // -// +// */ //---------------------------------------------------------------------------------- @@ -38,7 +38,7 @@ ML_START_NAMESPACE -//! +//! The ML module class UMDBoundingBoxCalculator2. class UMDBOUNDINGBOXCALCULATOR2_EXPORT UMDBoundingBoxCalculator2 : public BaseOp { public: @@ -51,22 +51,22 @@ virtual void handleNotification (Field *field); - //! + // StringField* boundingBoxString; - //! - Vec3fField* boundingBoxMin; + // + Vec3fField* boundingBoxMin; - //! + // Vec3fField* boundingBoxMax; - //! + // Vec3fField* objectCenter; - //! + // Vec3fField* boxCenter; - //! + // SoNodeField* inputObject; @@ -81,7 +81,7 @@ //! SoComputeBoundingBox *_moduleComputeBoundingBox; - + //! SoCalculator *_moduleCalculator; Modified: trunk/UMD/METK/Sources/ML/UMDCodedSegmentation/mlCalcCodedSegmentation.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDCodedSegmentation/mlCalcCodedSegmentation.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDCodedSegmentation/mlCalcCodedSegmentation.h 2009-06-26 07:58:03 UTC (rev 164) @@ -5,7 +5,7 @@ // \author Konrad M\xFChler // \date 2007-01-16 // -// +// */ //---------------------------------------------------------------------------------- @@ -36,7 +36,7 @@ ML_START_NAMESPACE -//! +//! The ML module class CalcCodedSegmentation. class UMDCODEDSEGMENTATION_EXPORT CalcCodedSegmentation : public BaseOp { public: @@ -73,92 +73,92 @@ //! Method template for type-specific page calculation. Called by \c calcOutSubImage(). //! \param outSubImg The typed subimage of output image \c outIndex calculated from \c inSubImg?. //! \param outIndex The index of the output the subimage is calculated for. - //! \param inSubImg1 Temporary subimage of input 1. + //! \param inSubImg1 Temporary subimage of input 1. void calcOutSubImage (SubImg *outSubImg, int outIndex,SubImg *inSubImgs); //@} private: - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- - //! - NotifyField *_fld_Add; + //! + NotifyField *_fld_Add; - //! - StringField *_fld_NameToAdd; + //! + StringField *_fld_NameToAdd; - //! - BoolField *_fld_addAllExceptNull; - IntField *_fld_addMinValue; - IntField *_fld_addMaxValue; + //! + BoolField *_fld_addAllExceptNull; + IntField *_fld_addMinValue; + IntField *_fld_addMaxValue; - //! - NotifyField *_fld_Reset; + //! + NotifyField *_fld_Reset; - //! - NotifyField *_fld_Purge; + //! + NotifyField *_fld_Purge; - //! - NotifyField *_fld_Finish; + //! + NotifyField *_fld_Finish; - //! - StringField *_fld_ImageValues; - StringField *_fld_ObjectValues; - + //! + StringField *_fld_ImageValues; + StringField *_fld_ObjectValues; - //@} + //@} - int nextFreeValue; - vector<unsigned long>::size_type MAX_SIZE; - MLint64 replaceValues_MaxIndex; - MLint64 nextStart; - vector<MLint64>* replaceValues; - vector<string>* objectValues; - HashTable<string>* valuesForObjects; - vector<string>* objectNames; + int nextFreeValue; + vector<unsigned long>::size_type MAX_SIZE; + MLint64 replaceValues_MaxIndex; + MLint64 nextStart; - VirtualVolume* _virtualVolume; + vector<MLint64>* replaceValues; + vector<string>* objectValues; + HashTable<string>* valuesForObjects; + vector<string>* objectNames; - void reset(); + VirtualVolume* _virtualVolume; - void addImage(); - //template <typename T> - //void addImageTemplated(T xxx); + void reset(); - void clearOutputImage(); - //template <typename T> - //void clearOutputImageTemplated(T x); + void addImage(); + //template <typename T> + //void addImageTemplated(T xxx); - void renewObjectValues(); + void clearOutputImage(); + //template <typename T> + //void clearOutputImageTemplated(T x); - void buildString(); + void renewObjectValues(); - void purgeValues(); - template <typename T> - void purgeValuesTemplated(T x); + void buildString(); + void purgeValues(); + template <typename T> + void purgeValuesTemplated(T x); - //! Compute the statistics of the data set. - bool _computeBoundingBox(); - //! Template helper function used by _computeBoundingBox to calculate type specific, it - //! computes the bounding box of an object within the input image object. - template <typename DT> - bool _computeBoundingBoxT(MLDataType ML_DT); + //! Compute the statistics of the data set. + bool _computeBoundingBox(); + //! Template helper function used by _computeBoundingBox to calculate type specific, it + //! computes the bounding box of an object within the input image object. + template <typename DT> + bool _computeBoundingBoxT(MLDataType ML_DT); + MLint b1x, b1y, b1z, b1c, b1t, b1u; MLint b2x, b2y, b2z, b2c, b2t, b2u; - - + + //! Implements interface for the runtime type system of the ML. ML_BASEOP_CLASS_HEADER(CalcCodedSegmentation) Modified: trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDInventorToPointer.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The ML module class UMDInventorToPointer. +//! The ML module UMDInventorToPointer derived from ObjMgrClient. /*! // \file mlUMDInventorToPointer.h // \author Konrad // \date 2006-02-01 // -// +// */ //---------------------------------------------------------------------------------- @@ -43,43 +43,43 @@ ML_START_NAMESPACE -//! +//! The ML module UMDInventorToPointer derived from ObjMgrClient. class UMDINVENTORPOINTER_EXPORT UMDInventorToPointer : public ObjMgrClient { public: - //! Constructor. - UMDInventorToPointer (void); + //! Constructor. + UMDInventorToPointer (void); ~UMDInventorToPointer (void); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); - virtual void activateAttachments(); - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); + virtual void activateAttachments(); + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- - //! - IntField* _pointer; - - SoNodeField* inInventor; - StringField* fieldObjectID; - StringField* fieldLayerID; - StringField* fieldInfoID; + //! + IntField* _pointer; - NotifyField* fieldRefresh; + SoNodeField* inInventor; + StringField* fieldObjectID; + StringField* fieldLayerID; + StringField* fieldInfoID; - //@} + NotifyField* fieldRefresh; + //@} + private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(UMDInventorToPointer) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(UMDInventorToPointer) - void writePointer(); + void writePointer(); }; Modified: trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDInventorPointer/mlUMDPointerToInventor.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The ML module class UMDPointerToInventor. +//! The ML module UMDPointerToInventor derived from ObjMgrClient. /*! // \file mlUMDPointerToInventor.h // \author Konrad // \date 2006-02-02 // -// +// */ //---------------------------------------------------------------------------------- @@ -33,46 +33,46 @@ ML_START_NAMESPACE -//! +//! The ML module UMDPointerToInventor derived from ObjMgrClient. class UMDINVENTORPOINTER_EXPORT UMDPointerToInventor : public ObjMgrClient { public: - //! Constructor. - UMDPointerToInventor (void); + //! Constructor. + UMDPointerToInventor (void); ~UMDPointerToInventor (void); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); + virtual void handleObjMgrNotification(); - virtual void activateAttachments(); + virtual void activateAttachments(); - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- - //! - IntField *fieldPointer; - - SoNodeField* outInventor; - StringField* fieldObjectID; - StringField* fieldLayerID; - StringField* fieldInfoID; + //! + IntField *fieldPointer; - //@} + SoNodeField* outInventor; + StringField* fieldObjectID; + StringField* fieldLayerID; + StringField* fieldInfoID; + //@} + private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - MLint64 _myPointer; + MLint64 _myPointer; - //! Implements interface for the runtime type system of the ML. - ML_CLASS_HEADER(UMDPointerToInventor) + //! Implements interface for the runtime type system of the ML. + ML_CLASS_HEADER(UMDPointerToInventor) - void getPointer(); + void getPointer(); }; Modified: trunk/UMD/METK/Sources/ML/UMDObjDemo/mlUMDObjDemo.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDObjDemo/mlUMDObjDemo.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDObjDemo/mlUMDObjDemo.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The ML module class UMDObjDemo. +//! ML ObjMgrClient module UMDObjDemo is an example for a single ObjMgrModule. /*! // \file mlUMDObjDemo.h // \author Konrad M\xFChler @@ -39,25 +39,25 @@ ML_START_NAMESPACE -//! Example for a single ObjModule +//! ML ObjMgrClient module UMDObjDemo is an example for a single ObjMgrModule. class UMDOBJDEMO_EXPORT UMDObjDemo : public ObjMgrClient { private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; //Macro for declaring methods for the runtime system ML_CLASS_HEADER(UMDObjDemo) public: - //Constructor. - UMDObjDemo (void); + //Constructor. + UMDObjDemo (void); - //Called when input changes. - virtual void handleNotification(Field *field); + //Called when input changes. + virtual void handleNotification(Field *field); - // Called on notification from ObjMgr. - virtual void handleObjMgrNotification(); + // Called on notification from ObjMgr. + virtual void handleObjMgrNotification(); }; Modified: trunk/UMD/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDRegionDistanceTransformation/mlRegionDistanceTransformation.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The ML module class RegionDistanceTransformation. +//! The ML module class RegionDistanceTransformation derived from SmallImageInterface. /*! // \file mlRegionDistanceTransformation.h // \author Konrad Muehler // \date 2009-03-17 // -// +// */ //---------------------------------------------------------------------------------- @@ -25,23 +25,23 @@ // Local includes #include "UMDRegionDistanceTransformationSystem.h" -//! +//! The ML module class RegionDistanceTransformation derived from SmallImageInterface. class UMDREGIONDISTANCETRANSFORMATION_EXPORT RegionDistanceTransformation : public SmallImageInterface { public: - //! the image processing is done in this method - virtual void _processImages(); + //! the image processing is done in this method + virtual void _processImages(); - //! write initialization code herein - virtual void _initializeAll(); + //! write initialization code herein + virtual void _initializeAll(); private: - - labField *_globalDistanceField; - labField *_componentIDs; - void calcGlobalDistanceField(); - int calcConnectedComp(); + labField *_globalDistanceField; + labField *_componentIDs; + void calcGlobalDistanceField(); + int calcConnectedComp(); + }; #endif // __mlRegionDistanceTransformation_H Modified: trunk/UMD/METK/Sources/ML/UMDSoSceneWriterMD/mlSoSceneWriterMD.h =================================================================== --- trunk/UMD/METK/Sources/ML/UMDSoSceneWriterMD/mlSoSceneWriterMD.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/UMDSoSceneWriterMD/mlSoSceneWriterMD.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The ML module class SoSceneWriterMD. +//! Inventor node SoSceneWriterMD with ping when IV-file saved. /*! // \file mlSoSceneWriterMD.h // \author Konrad M\xFChler @@ -37,7 +37,7 @@ ML_START_NAMESPACE -//! New SceneWriter with ping when IV-file saved +//! Inventor node SoSceneWriterMD with ping when IV-file saved. class UMDSOSCENEWRITERMD_EXPORT SoSceneWriterMD : public BaseOp { public: @@ -55,19 +55,19 @@ //@{ \name Module field declarations // ---------------------------------------------------------- - //! + // NotifyField *_writeScene; - //! + // NotifyField *_fileSaved; - //! + // StringField *_fileName; - //! + // SoNodeField *_inputObject; - //! + // EnumField* _fileType; //@} Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The ML module class METKAutoFading. +//! The ML ObjMgrClient module METKAutoFading. /*! // \file mlMETKAutoFading.h // \author Konrad M\xFChler @@ -40,86 +40,86 @@ ML_START_NAMESPACE -//! +//! The ML ObjMgrClient module METKAutoFading. class VIEWPOINT_EXPORT METKAutoFading : public ObjMgrClient { public: - //! Constructor. - METKAutoFading (void); + //! Constructor. + METKAutoFading (void); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); - virtual void activateAttachments(); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); + virtual void handleObjMgrNotification(); + virtual void activateAttachments(); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- - SoNodeField* _outScene; - //! - BoolField* _EnableFading; - BoolField* _UseMETKValues; + SoNodeField* _outScene; + //! + BoolField* _EnableFading; + BoolField* _UseMETKValues; - //! - StringField* _CurrentObject; + //! + StringField* _CurrentObject; - StringField* _ViewerName; + StringField* _ViewerName; - NotifyField* _init; - NotifyField* _calc; + NotifyField* _init; + NotifyField* _calc; - StringField* _dataPath; + StringField* _dataPath; - Vec3fField* _similarPosition; - Vec3fField* _camPosition; - Vec4fField* _camOrientation; + Vec3fField* _similarPosition; + Vec3fField* _camPosition; + Vec4fField* _camOrientation; - StringField* _messageData; - StringField* _message; + StringField* _messageData; + StringField* _message; - //@} + //@} - struct Appearance - { - float Transparency; - SbVec3f Color; - float SilhouetteWidth; - SbVec3f SilhouetteColor; - bool SilhouetteVisible; - }; + struct Appearance + { + float Transparency; + SbVec3f Color; + float SilhouetteWidth; + SbVec3f SilhouetteColor; + bool SilhouetteVisible; + }; - ObjMgrCommunicator* myObjMgr; + ObjMgrCommunicator* myObjMgr; - kCamera* myCamera; - - METKMsgReceiver* oReceiver; - SoTimerSensor* timerSensor; //for doneFld touching with a little delay - static void timerEvent(void* data, SoDataSensor* a); + kCamera* myCamera; + METKMsgReceiver* oReceiver; + SoTimerSensor* timerSensor; //for doneFld touching with a little delay + static void timerEvent(void* data, SoDataSensor* a); - CvpCalcVis m_calcVis; - SoVisDataViewer* m_soViewer; + CvpCalcVis m_calcVis; - HashTable<Appearance> htOldValues; //ObjNamen und OldValues - set<string> currentFading; //Kurze Liste zum schnelleren Durchiterieren - + SoVisDataViewer* m_soViewer; - void calcNewPosition(); - void setAcceptedEvents(); - void resetAllCurrentOccluders(); - bool findInSet(set<string> mySet, string toFind); + HashTable<Appearance> htOldValues; //ObjNamen und OldValues + set<string> currentFading; //Kurze Liste zum schnelleren Durchiterieren - //! Implements interface for the runtime type system of the ML. - ML_BASEOP_CLASS_HEADER(METKAutoFading) + void calcNewPosition(); + void setAcceptedEvents(); + void resetAllCurrentOccluders(); + bool findInSet(set<string> mySet, string toFind); + + //! Implements interface for the runtime type system of the ML. + ML_BASEOP_CLASS_HEADER(METKAutoFading) + }; Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPath/METKCalcCamPath.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPath/METKCalcCamPath.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPath/METKCalcCamPath.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,6 +1,7 @@ -//METKCalcCamPath -//MEKTCALCCAMPATH +//! The ML ObjMgrClient module METKCalcCamPath. +//! \file METKCalcCamPath.h + #ifndef __METKCalcCamPath_H #define __METKCalcCamPath_H @@ -34,91 +35,91 @@ class SoSwitch; ML_START_NAMESPACE -//! +//! The ML ObjMgrClient module METKCalcCamPath. class VIEWPOINT_EXPORT METKCalcCamPath : public ObjMgrClient { public: - //! Constructor. - METKCalcCamPath(); - ~METKCalcCamPath (void); + //! Constructor. + METKCalcCamPath(); + ~METKCalcCamPath (void); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); - virtual void activateAttachments(); - void setCamPosition(const int stackOrFieldNr, const bool isStackNr); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); + virtual void handleObjMgrNotification(); + virtual void activateAttachments(); + void setCamPosition(const int stackOrFieldNr, const bool isStackNr); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- - //@} + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- + //@} - SoNodeField* _outScene; - NotifyField* _calc; - NotifyField* _calcMultiple; - NotifyField* _init; - IntField* _showField; - enum sphereModeType { SM_GRID = 1, SM_FULL = 2 }; - static const char *sphereModeStrings[2]; - EnumField* _sphereMode; - FloatField* fldCampathApexAngle; - static const char *apexAngleStrings[4]; - EnumField* _apexAngle; - StringField* _dataPath; - StringField* _currentStructure; - StringField* _multipleStructures; - StringField* _debug; - StringField* _viewerName; - /*DoubleField* _camX; - DoubleField* _camY; - DoubleField* _camZ;*/ - Vec3fField* _currentCam; - DoubleField* _camRange; - DoubleField* _visSta; - DoubleField* _impSta; - IntField* _inspect; - DoubleField* _wVis; - DoubleField* _wImp; - DoubleField* _wNum; - DoubleField* _wEnt; - DoubleField* _wDis; - DoubleField* _wCam; - DoubleField* _wReg; - DoubleField* _wVisSta; - DoubleField* _wImpSta; - DoubleField* _wSilhouette; - DoubleField* _wImageSpaceCenter; - Vec3fField* _prefRegionVector; - DoubleField* _prefRegionRange; - EnumField* _prefRegionType; - enum prefRegionType { PR_VECTOR = 0, PR_POINT = 1 }; - static const char *prefRegionTypeStrings[2]; - BoolField* _restrictToRegion; - /*DoubleField* _minX; - DoubleField* _minY; - DoubleField* _minZ;*/ - Vec3fField* _minDistVec; - DoubleField* _minRange; - NotifyField* _calcMin; - /*DoubleField* _resX; - DoubleField* _resY; - DoubleField* _resZ;*/ - Vec3fField* _result; - Vec4fField* _orient; - StringField* _messageData; - StringField* _message; - BoolField* _setViewerCamAtTheEnd; - NotifyField* _writeCamToObjMgr; - EnumField* _debugState; + SoNodeField* _outScene; + NotifyField* _calc; + NotifyField* _calcMultiple; + NotifyField* _init; + IntField* _showField; + enum sphereModeType { SM_GRID = 1, SM_FULL = 2 }; + static const char *sphereModeStrings[2]; + EnumField* _sphereMode; + FloatField* fldCampathApexAngle; + static const char *apexAngleStrings[4]; + EnumField* _apexAngle; + StringField* _dataPath; + StringField* _currentStructure; + StringField* _multipleStructures; + StringField* _debug; + StringField* _viewerName; + /*DoubleField* _camX; + DoubleField* _camY; + DoubleField* _camZ;*/ + Vec3fField* _currentCam; + DoubleField* _camRange; + DoubleField* _visSta; + DoubleField* _impSta; + IntField* _inspect; + DoubleField* _wVis; + DoubleField* _wImp; + DoubleField* _wNum; + DoubleField* _wEnt; + DoubleField* _wDis; + DoubleField* _wCam; + DoubleField* _wReg; + DoubleField* _wVisSta; + DoubleField* _wImpSta; + DoubleField* _wSilhouette; + DoubleField* _wImageSpaceCenter; + Vec3fField* _prefRegionVector; + DoubleField* _prefRegionRange; + EnumField* _prefRegionType; + enum prefRegionType { PR_VECTOR = 0, PR_POINT = 1 }; + static const char *prefRegionTypeStrings[2]; + BoolField* _restrictToRegion; + /*DoubleField* _minX; + DoubleField* _minY; + DoubleField* _minZ;*/ + Vec3fField* _minDistVec; + DoubleField* _minRange; + NotifyField* _calcMin; + /*DoubleField* _resX; + DoubleField* _resY; + DoubleField* _resZ;*/ + Vec3fField* _result; + Vec4fField* _orient; + StringField* _messageData; + StringField* _message; + BoolField* _setViewerCamAtTheEnd; + NotifyField* _writeCamToObjMgr; + EnumField* _debugState; kCamera *Cam; ObjMgrCommunicator* myObjMgr; - + SoSwitch* _Switch; string path; string* pathIds; @@ -130,7 +131,7 @@ METKMsgReceiver* oReceiver; SoTimerSensor* timerSensor; //for doneFld touching with a little delay static void timerEvent(void* data, SoDataSensor* a); - void updateObjectMgr(); + void updateObjectMgr(); void writeCamToObjMgr(); void enableVisibleObjects(); const float getImportance(const std::string* name); Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,6 +1,7 @@ -//METKCalcCamPos -//MEKTCALCCAMPOS +//! The ML ObjMgrClient module METKCalcCamPos. +//! \file METKCalcCamPos.h + #ifndef __METKCalcCamPos_H #define __METKCalcCamPos_H @@ -35,90 +36,90 @@ class SoSwitch; ML_START_NAMESPACE -//! +//! The ML ObjMgrClient module METKCalcCamPos. class VIEWPOINT_EXPORT METKCalcCamPos : public ObjMgrClient { public: - //! Constructor. - METKCalcCamPos(); - ~METKCalcCamPos (void); + //! Constructor. + METKCalcCamPos(); + ~METKCalcCamPos (void); - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); - virtual void handleObjMgrNotification(); - virtual void activateAttachments(); - void setCamPosition(const int stackOrFieldNr, const bool isStackNr); + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); + virtual void handleObjMgrNotification(); + virtual void activateAttachments(); + void setCamPosition(const int stackOrFieldNr, const bool isStackNr); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- - //@} + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- + //@} - SoNodeField* _outScene; - SoNodeField* _outScene2; - NotifyField* _calc; - NotifyField* _calcMultiple; - NotifyField* _init; - IntField* _showField; - enum sphereModeType { SM_GRID = 1, SM_FULL = 2 }; - static const char *sphereModeStrings[2]; - EnumField* _sphereMode; - StringField* _dataPath; - StringField* _currentStructure; - StringField* _multipleStructures; - StringField* _debug; - StringField* _viewerName; - /*DoubleField* _camX; - DoubleField* _camY; - DoubleField* _camZ;*/ - Vec3fField* _currentCam; - DoubleField* _camRange; - DoubleField* _visSta; - DoubleField* _impSta; - IntField* _inspect; - DoubleField* _wVis; - DoubleField* _wImp; - DoubleField* _wNum; - DoubleField* _wEnt; - DoubleField* _wDis; - DoubleField* _wCam; - DoubleField* _wReg; - DoubleField* _wVisSta; - DoubleField* _wImpSta; - DoubleField* _wSilhouette; - DoubleField* _wImageSpaceCenter; - Vec3fField* _prefRegionVector; - DoubleField* _prefRegionRange; - EnumField* _prefRegionType; - enum prefRegionType { PR_VECTOR = 0, PR_POINT = 1 }; - static const char *prefRegionTypeStrings[2]; - BoolField* _restrictToRegion; - /*DoubleField* _minX; - DoubleField* _minY; - DoubleField* _minZ;*/ - Vec3fField* _minDistVec; - DoubleField* _minRange; - NotifyField* _calcMin; - /*DoubleField* _resX; - DoubleField* _resY; - DoubleField* _resZ;*/ - Vec3fField* _result; - Vec4fField* _orient; - StringField* _messageData; - StringField* _message; - BoolField* _setViewerCamAtTheEnd; - NotifyField* _writeCamToObjMgr; - EnumField* _debugState; - StringField* _datInfo; + SoNodeField* _outScene; + SoNodeField* _outScene2; + NotifyField* _calc; + NotifyField* _calcMultiple; + NotifyField* _init; + IntField* _showField; + enum sphereModeType { SM_GRID = 1, SM_FULL = 2 }; + static const char *sphereModeStrings[2]; + EnumField* _sphereMode; + StringField* _dataPath; + StringField* _currentStructure; + StringField* _multipleStructures; + StringField* _debug; + StringField* _viewerName; + /*DoubleField* _camX; + DoubleField* _camY; + DoubleField* _camZ;*/ + Vec3fField* _currentCam; + DoubleField* _camRange; + DoubleField* _visSta; + DoubleField* _impSta; + IntField* _inspect; + DoubleField* _wVis; + DoubleField* _wImp; + DoubleField* _wNum; + DoubleField* _wEnt; + DoubleField* _wDis; + DoubleField* _wCam; + DoubleField* _wReg; + DoubleField* _wVisSta; + DoubleField* _wImpSta; + DoubleField* _wSilhouette; + DoubleField* _wImageSpaceCenter; + Vec3fField* _prefRegionVector; + DoubleField* _prefRegionRange; + EnumField* _prefRegionType; + enum prefRegionType { PR_VECTOR = 0, PR_POINT = 1 }; + static const char *prefRegionTypeStrings[2]; + BoolField* _restrictToRegion; + /*DoubleField* _minX; + DoubleField* _minY; + DoubleField* _minZ;*/ + Vec3fField* _minDistVec; + DoubleField* _minRange; + NotifyField* _calcMin; + /*DoubleField* _resX; + DoubleField* _resY; + DoubleField* _resZ;*/ + Vec3fField* _result; + Vec4fField* _orient; + StringField* _messageData; + StringField* _message; + BoolField* _setViewerCamAtTheEnd; + NotifyField* _writeCamToObjMgr; + EnumField* _debugState; + StringField* _datInfo; kCamera *Cam; ObjMgrCommunicator* myObjMgr; - + SoSwitch* _Switch; string path; string* pathIds; @@ -131,7 +132,7 @@ METKMsgReceiver* oReceiver; SoTimerSensor* timerSensor; //for doneFld touching with a little delay static void timerEvent(void* data, SoDataSensor* a); - void updateObjectMgr(); + void updateObjectMgr(); void writeCamToObjMgr(); void enableVisibleObjects(); const float getImportance(const std::string* name); Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h 2009-06-26 07:14:21 UTC (rev 163) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h 2009-06-26 07:58:03 UTC (rev 164) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The ML module class METKCreateIntraOPDummy. +//! This ML ObjMgrClient module creates dummy tumors for a new intra OP viewpoint pre-calculation. /*! // \file mlMETKCreateIntraOPDummy.h // \author Konrad M\xFChler @@ -29,7 +29,7 @@ ML_START_NAMESPACE -//! This module creates dummy tumors for a new intra OP viewpoint pre-calculation +//! This ML ObjMgrClient module creates dummy tumors for a new intra OP viewpoint pre-calculation. class VIEWPOINT_EXPORT METKCreateIntraOPDummy : public ObjMgrClient { public: @@ -74,13 +74,13 @@ virtual void handleObjMgrNotification(); - + virtual void activateAttachments(); private: - typedef ObjMgrClient inherited; + typedef ObjMgrClient inherited; // ---------------------------------------------------------- //@{ \name Module field declarations @@ -96,29 +96,29 @@ //@} - std::string usedValues; - bool isCalculating; + std::string usedValues; + bool isCalculating; - ObjMgrCommunicator* myObjMgr; + ObjMgrCommunicator* myObjMgr; - void createMETKObjects(); - void calcBoundingBox(); + void createMETKObjects(); + void calcBoundingBox(); - bool validBoundingBox; + bool validBoundingBox; - struct BoundingBox - { - vec3 min; - vec3 max; - double xWidth; - double yWidth; - double zWidth; - }; - - BoundingBox myBoundingBox; + struct Bou... [truncated message content] |
From: <wol...@us...> - 2009-06-26 07:14:24
|
Revision: 163 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=163&view=rev Author: wolfspindler Date: 2009-06-26 07:14:21 +0000 (Fri, 26 Jun 2009) Log Message: ----------- BUG: -Special character removed. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 16:42:58 UTC (rev 162) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-26 07:14:21 UTC (rev 163) @@ -9,7 +9,7 @@ It contains source code documentation automatically generated on the Build Server for the MeVisLab Community Sources. -To keep the file and class references up to date\xB4, please assure that the +To keep the file and class references up to date, please assure that the file and class comments are added to your source code and that they are activated with an "!" at the beginning of comments. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 16:43:09
|
Revision: 162 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=162&view=rev Author: wolfspindler Date: 2009-06-25 16:42:58 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class indexes. -Some stuff translated to english, minor typos and bugs fixed, some node and inheritance infos added for more compact overview information. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureText.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureTool.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMinimalDistance.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoRuler.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoShapeToPointSet.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoThresholdToPointSet.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoVolEstimation.h trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensionExample/SoView2DExtensionExample.h trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoDraw2DSilhouette.h trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoView2DHalo.h trunk/UMD/METK/Sources/Inventor/UMDStraightLine/SoStraightLine.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoFileToSceneGraph.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoFramesPerSecond.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.cpp trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapeInfo.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapePartition.h trunk/UMD/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptCommandObject.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameEntry.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptIniObject.h trunk/UMD/METK/Sources/ML/Animation/METKObjXMLWriter/mlMETKObjXMLWriter.h trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/AnimationExecuter.h trunk/UMD/METK/Sources/ML/Animation/UMDAnimation2/mlUMDAnimation2.h trunk/UMD/METK/Sources/ML/METK.h trunk/UMD/METK/Sources/ML/METK2DLabeling/labField.h trunk/UMD/METK/Sources/ML/METK2DLabeling/mlMETK2DLabeling.h trunk/UMD/METK/Sources/ML/kAviWriter/mlkAviWriter.h Modified: trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h 2009-06-25 16:42:58 UTC (rev 162) @@ -67,7 +67,7 @@ static IndexVector convexHullFaceIndexList; -//! Convex hull of invetor scene using qhull. +//! Inventor node class SoQHull3D qhull and derived from SoSeparator. class UMDQHULL3D_EXPORT SoQHull3D : public SoSeparator { //! implements the runtime type system interface of this new node. Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h 2009-06-25 16:42:58 UTC (rev 162) @@ -12,7 +12,7 @@ // $Id: UMDSoAutoMeasureTool.h,v 1.7 2003/09/23 17:24:33 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoAutoMeasureTool.h,v $ -/*! The inventor node class UMDSoAutoMeasureTool which is the base class for all automatic measurement tools. +/*! The Inventor node class UMDSoAutoMeasureTool which is the base class for all automatic measurement tools. // \file UMDSoAutoMeasureTool.h // \author Christian Tietjen // \date 09/2002 @@ -26,7 +26,7 @@ class SoFieldSensor; -//! This is the base class for all automatic measurement tools. +//! The Inventor node class UMDSoAutoMeasureTool which is the base class for all automatic measurement tools. class SO_MEASUREMENT_CLASS_SPEC UMDSoAutoMeasureTool : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoAutoMeasureTool); Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoMainAxis.h,v 1.15 2003/09/05 16:14:44 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoMainAxis.h,v $ -/*! This is the inventor interface for the MainAxis class. +/*! The Inventor node class wrapping/interfacing the MainAxis class, derived from SoAutoMeasureTool. // \file UMDSoMainAxis.h // \author Christian Tietjen // \date 09/2002 @@ -37,8 +37,7 @@ class SoFieldSensor; class SoIndexedLineSet; -//! This is the inventor interface for the MainAxis class. -//! The baseclass of this class is \c SoAutoMeasureTool +//! The Inventor node class wrapping/interfacing the MainAxis class, derived from SoAutoMeasureTool. class SO_MEASUREMENT_CLASS_SPEC UMDSoMainAxis : public UMDSoAutoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoMainAxis); Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureText.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureText.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureText.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoMeasureText.h,v 1.2 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoMeasureText.h,v $ -/*! +/*! Inventor node class UMDSoMeasureText derived from SoSeparator. // \file UMDSoMeasureText.h // \author Christian Tietjen // \date 09/2002 @@ -37,17 +37,17 @@ class SoSwitch; class SoTransform; - +//! Inventor node class UMDSoMeasureText derived from SoSeparator. class SO_MEASUREMENT_CLASS_SPEC UMDSoMeasureText : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoMeasureText); - + public: - + //! Constructor UMDSoMeasureText(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); @@ -67,7 +67,7 @@ private: - + SoSwitch *_switch2D3D; unsigned long _lastClick; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureTool.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureTool.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureTool.h 2009-06-25 16:42:58 UTC (rev 162) @@ -12,7 +12,7 @@ // $Id: UMDSoMeasureTool.h,v 1.11 2003/09/09 16:20:03 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoMeasureTool.h,v $ -/*! +/*! The Inventor node UMDSoMeasureTool is a base class for measurement tools, derived from SoSeparator and already containing many nodes. // \file UMDSoMeasureTool.h // \author Henry Sonnet / Christian Tietjen // \date 09/2002 @@ -49,8 +49,8 @@ #endif -//! Die Basisklasse fuer die MessTools, abgeleitet von -//! SoSeparator; enthaelt bereits diverse Knoten: +//! The Inventor node UMDSoMeasureTool is a base class for measurement tools, derived from SoSeparator and +//! already containing many nodes. These nodes are //! - die Root //! - einen SoEventCallback-Knoten fuer Mousebutton- und Keyboardevents, //! die Interaktionsm\xF6glichkeiten, die m\xF6glich sind, werden weiter unten @@ -64,7 +64,7 @@ //! //! Grunds\xE4tzlich sind alle "beweglichen Teile" mit SoLocateHighlight-Knoten versehen, //! die beim \xDCberfahren mit der Maus aufleuchten. -//! +//! //! Um ein Werkzeugteil bewegen zu k\xF6nnen, mu\xDF man es erst mit einem einfachen Klick //! anw\xE4hlen. Es kann immer nur ein Werkzeug zur Zeit aktiviert werden, //! ein evtl. vorher selektiertes Werkzeug wird automatisch deselektiert @@ -83,23 +83,23 @@ class SO_MEASUREMENT_CLASS_SPEC UMDSoMeasureTool : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoMeasureTool); - + public: - + //! Konstruktor UMDSoMeasureTool(); //! Destruktor virtual ~UMDSoMeasureTool(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + // ######## Fields ############## - + //! the first vertice of the measure tool - default value is (-10, 0, 0) SoSFVec3f startPos; - + //! the color of the measure tool SoSFColor color; @@ -107,10 +107,10 @@ SoSFBool toolNameFlag; //! the tool name SoSFString toolName; - + //! the step size for moving the tool vertices by the keyboard - default value is (0.01) SoSFFloat keyboardIncrement; - + //! shows the unit - default value is (FALSE) SoSFBool unitFlag; //! the unit - default value is mm (cmm) @@ -122,35 +122,35 @@ SoSFFloat scale; -private: - +private: + // ##### Die Funktionen ##### - + //! inits the measure tool fields void initMeasureTool(); - + //! Feld-Sensoren initialisieren void initMeasureToolFieldSensors(); - + //! haengt Knoten in Graphen void getObject(); - + //! gibt einen LevelOfDetail-Knoten zurueck, der fuer die Font-Groesse verantwortlich ist SoLevelOfDetail* getLOD(); - + //! Callback fuer Mousebutton-Events static void mousePressedCB(void* userData, SoEventCallback* eventCB); - + //! Callback fuer Tastatur-Events static void cursorPressCB(void* userData, SoEventCallback* eventCB); - + //! called if \c startPos has been changed static void startChangedCB(void* userData, SoSensor*); static void scaleChangedCB(void* userData, SoSensor*); protected: - + //! \xC4nderung der Unit-Beschriftung static void unitChangedCB(void* userData, SoSensor*); @@ -164,11 +164,11 @@ bool areEqual(const SbVec3f& vec1, const SbVec3f& vec2); // ####### virtuelle Funktionen ########### - + //! Welches Objekt wurde getroffen; //! muss von abgeleiteter Klasse implementiert werden virtual SbBool getPickedObjectMouseLeft(const SoPickedPoint* /*pickedPoint*/){ return FALSE; } - + //! jede abgeleitete Klasse muss die folgenden Funktionen implementieren; //! werden aufgerufen, wenn eine Position sich aendert virtual void pointChanged(){}; @@ -207,18 +207,18 @@ //! deactivates a tool void resetHighLightNode(UMDSoMeasureTool* tool); - + //! Handler f\xFCr linke Maustaste static UMDSoMeasureTool *_currentTool; //! weiterschalten der Farben static int _colorCounter; - + //! hier gehts los SoSeparator *_root; - + //! Switch-Knoten fuer Dragger SoSwitch *_switchDragger; - + //! der Inhaber aller LocateHighlight-Knoten SoSeparator *_highlightSep; @@ -233,7 +233,7 @@ SoSphere* _sphere; - + //! Die Feld-Sensoren: SoFieldSensor *_startPosSens, *_toolNameFlagSens, *_toolNameSens, *_unitFlagSens, *_unitSens, *_interactionModeSens, *_scaleSens; }; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMinimalDistance.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMinimalDistance.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMinimalDistance.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoMinimalDistance.h,v 1.9 2003/09/05 16:14:44 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoMinimalDistance.h,v $ -/*! +/*! Inventor node UMDSoMinimalDistance computing the shortest euclidean distance between two pointsets. // \file UMDSoMinimalDistance.h // \author Christian Tietjen // \date 09/2002 @@ -37,30 +37,30 @@ class SoFieldSensor; class SoSwitch; -//! Computes the shortest euclidean distance between two pointsets +//! Inventor node UMDSoMinimalDistance computing the shortest euclidean distance between two pointsets. //! Based on: "Efficient Distance Computation between Non-Convex Objects" by Sean Quinlan //! see: graphics.stanford.edu/courses/cs468-01-winter/papers/q-edcbnco-94.ps //! This class integrates the Non-Inventor class \c MinimalDistance into ILab class SO_MEASUREMENT_CLASS_SPEC UMDSoMinimalDistance : public UMDSoAutoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoMinimalDistance); - - + + public: - + //! Constructor UMDSoMinimalDistance(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + // ######## Fields ############## - + //! starts the distance computation SoSFTrigger computeMinimalDistance; //! if this is true, the computation starts automatically if a valid input is given SoSFBool autoCompute; - + //! contain the second object #ifdef ILAB5 SoSFNode inObject2Node; @@ -79,7 +79,7 @@ SoSFEnum unit; SoSFFloat scaleLine; - + //! Wert, bei dessen Unterschreiten die Linie //! geschlossen dargestellt wird SoSFFloat minDistance; @@ -117,7 +117,7 @@ //! \c _spheres is just for debugging aims SoSeparator *_spheres; - + //! the distance line UMDSoDistanceLine *_distanceLine; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoRuler.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoRuler.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoRuler.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoRuler.h,v 1.9 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoRuler.h,v $ -/*! +/*! Inventor node UMDSoRuler is a ruler which can be moved by selections/interactions. // \file UMDSoRuler.h // \author Henry Sonnet / Christian Tietjen // \date 10/2001 @@ -39,8 +39,8 @@ class SoTranslation; -//! UMDSoRuler ist ein Lineal, das durch Selektion bewegt werden -//! kann; am Anfangs- bzw. Endpunkt des Lineals befindet sich +//! Inventor node UMDSoRuler is a ruler which can be moved by selections/interactions. +//! Am Anfangs- bzw. Endpunkt des Lineals befindet sich //! jeweils eine Kugel, bei deren Betaetigung ein Dragger erscheint, //! mit dessen Hilfe das Lineal in der Laenge veraendert werden kann. //! Beim Ausw\xE4hlen der Verbindungslinie erscheint ein Dragger zum @@ -49,100 +49,100 @@ //! R\xFCckgabe: L\xE4nge des Lineals //! Basisklasse: \c SoMeasureTool //! -//! Die Interaktionsmoeglichkeiten sind im Header von +//! Die Interaktionsmoeglichkeiten sind im Header von //! \c SoMeasureTool beschrieben class SO_MEASUREMENT_CLASS_SPEC UMDSoRuler : public UMDSoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoRuler); - + public: - + //! Constructor UMDSoRuler(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! the second vertex SoSFVec3f endPos; - + //! Wert, bei dessen Unterschreiten Linie geschlossen dargestellt //! wird SoSFFloat minDistance; //! L\xE4nge des Lineals SoSFFloat lineLength; - + protected: //! Destructor virtual ~UMDSoRuler(); -private: - +private: + //! Initialisierung der Variablen und Szenen-Graphen mit Knoten //! bestuecken void initRuler(); //! Initialisierung der Variablen und Szenen-Graphen mit Knoten //! bestuecken void createRuler(); - + //! Feld-Sensoren initialisieren void initRulerFieldSensors(); - + //! erstellt einen LevelOfDetail-Knoten, der f\xFCr die //! Detailierung der Strokes zust\xE4ndig ist void createLevelOfStrokes(); - //! gibt einen Gruppen-Knoten zurueck, + //! gibt einen Gruppen-Knoten zurueck, //! der den Text fuer die Masseinheit enthaelt void createUnitGroup(); - + //! creates the interaction-part at \c startPos //SoSeparator* createDragStartSep(); //! creates the interaction-part at \c endPos //SoSeparator* createDragEndSep(); //! creates the interaction-part to move the strokes SoSeparator* createDragMoveScaleSep(); - + //! Skalenstriche werden bestimmt und positioniert void getStrokes(); - + //! gibt eine Separator zurueck, der die Ziffern //! des Lineals enthaelt SoAnnotation* getDigit(float digit); - + //! Bestimmen der neuen Positionen void getUnitPos(); - + //! Setzt den darzustellenden Text void getTextString(); - + //! Welches Objekt wurde getroffen SbBool getPickedObjectMouseLeft(const SoPickedPoint* pickedPoint); - + //! die Funktionen zum Bewegen der Pfeilspitzen bei Tastatur-Events SbBool setArrowByKeyboard(float x, float y, float z, Taste taste); //! Aktualisierungen veranlassen void pointChanged(); - + //! Callback for the Dragger at \c startPos //static void draggerStartCB(void* userData, SoDragger* dragger); //! Callback for the Dragger at \c endPos //static void draggerEndCB(void* userData, SoDragger* dragger); //! Callback for the Dragger for moving the strokes static void draggerMoveScaleCB(void* userData, SoDragger* dragger); - + //! callback for \c endPos static void endChangedCB(void *userData, SoSensor* s); //! callback for \c minDistance static void minDistanceChangedCB(void *userData, SoSensor* s); - - + + //! null position of the strokes float _strokeCenterPos; //! null position of the strokes @@ -163,14 +163,14 @@ SoSwitch *_unitSwitch; //! true if endPos was dragged bool _endDraggerDragged; - + //! moves the vertices - SoTransform *_sphereTrafoStart, *_sphereTrafoEnd; - + SoTransform *_sphereTrafoStart, *_sphereTrafoEnd; + //! dragger to move the strokes SoTranslate1Dragger *_dragMoveScale; bool _changedByDragger; - + //! Highlight-Knoten zur Hervorhebung der Interaktionsschnittstellen SoLocateHighlight *_sphereStartHighlight, *_sphereEndHighlight, *_lineHighlight; @@ -180,7 +180,7 @@ SoComposeRotationFromTo *_rotLine, *_rotDragger; //! needed to define an own dragger (avtivePart, inactivePart) SoSeparator *_reglerAktiv, *_reglerInaktiv; - + //! \c endPos was changed SoFieldSensor* _endPosSens; //! \c minDistance was changed Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoShapeToPointSet.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoShapeToPointSet.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoShapeToPointSet.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoShapeToPointSet.h,v 1.12 2003/09/23 17:24:33 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoShapeToPointSet.h,v $ -/*! +/*! Inventor node UMDSoShapeToPointSet which converts any scenegraph into a pointset. // \file UMDSoShapeToPointSet.h // \author Christian Tietjen // \date 09/2002 @@ -50,21 +50,21 @@ class SoVertexProperty; struct ltstr; -//! Converts any scenegraph into a pointset. +//! Inventor node UMDSoShapeToPointSet which converts any scenegraph into a pointset. //! Every point occurs just one time in this set. class SO_MEASUREMENT_CLASS_SPEC UMDSoShapeToPointSet : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoShapeToPointSet); - - + + public: - + //! Constructor UMDSoShapeToPointSet(); //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! the input node SoSFNode rootInput; //! direct access on the extracted point set @@ -72,16 +72,16 @@ SoVertexProperty* vertexProperty; //! forces the computation void calculate(); - + protected: - + //! Destructor virtual ~UMDSoShapeToPointSet(); - - + + private: - + //! internal representation of the point set SoPointSet* _pointSet; //! number of points @@ -94,21 +94,21 @@ SoFieldSensor *_inputSens; //! callback action to collect the points SoCallbackAction* _myAction; - + //! inserts the points into the hashtable void insertPoint(SbVec3f vector); //! reads out the hashtable. every point occurs only one time void collectPoints(); - + //! method called on input changed static void inputCB(void *userData, SoSensor*); //! called, if a new child in the scenegraph will be traversed static SoCallbackAction::Response preCB(void *userData, SoCallbackAction *action, const SoNode *node); //! called if the child is a point set - static void pointCB (void* userData, SoCallbackAction* action, + static void pointCB (void* userData, SoCallbackAction* action, const SoPrimitiveVertex* v); //! called if the child is a line set - static void lineCB (void* userData, SoCallbackAction* action, + static void lineCB (void* userData, SoCallbackAction* action, const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2); //! called if the child is a shape @@ -116,7 +116,7 @@ const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2, const SoPrimitiveVertex* v3); - + //! the hashtable std::set<SbVec3f, ltstr>* _hashTable; }; @@ -131,7 +131,7 @@ bool operator()(SbVec3f s1, SbVec3f s2) const { const float* p1 = s1.getValue(); const float* p2 = s2.getValue(); - + if (*p1 < *p2) return true; else { if (*p1 > *p2) return false; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoThresholdToPointSet.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoThresholdToPointSet.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoThresholdToPointSet.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoThresholdToPointSet.h,v 1.7 2004/08/02 11:32:20 florian Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoThresholdToPointSet.h,v $ -/*! +/*! Inventor node UMDSoThresholdToPointSet generating a pointset from a given image. // \file UMDSoThresholdToPointSet.h // \author Christian Tietjen // \date 09/2002 @@ -42,9 +42,9 @@ class SoVertexProperty; -//! Generates a pointset from a given image. For each voxel -//! between a given threshold a point will be created. -//! The set can be bordered by a threshold. +//! Inventor node UMDSoThresholdToPointSet generating a pointset from a given image. +//! For each voxel between a given threshold a point will be created. +//! The set can be bordered by a threshold. class SO_MEASUREMENT_CLASS_SPEC UMDSoThresholdToPointSet : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoThresholdToPointSet); @@ -68,7 +68,7 @@ //! input image #ifdef ILAB5 - SoSFMLImage inImage; + SoSFMLImage inImage; #else SoSFMLImage image; #endif Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoVolEstimation.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoVolEstimation.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoVolEstimation.h 2009-06-25 16:42:58 UTC (rev 162) @@ -20,7 +20,7 @@ // $Id: UMDSoVolEstimation.h,v 1.8 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoVolEstimation.h,v $ -/*! +/*! Inventor node UMDSoVolEstimation derived from UMDSoMeasureTool is a tool for approximated measuring of a volumen. // \file UMDSoVolEstimation.h // \author Christian Tietjen // \date 11/2001 @@ -42,8 +42,7 @@ class SoTransformerDragger; -//! UMDSoVolEstimation ist ein Tool zur approximativen Messung -//! eines Volumens. +//! Inventor node UMDSoVolEstimation derived from UMDSoMeasureTool is a tool for approximated measuring of a volumen. //! Anders als bei den anderen Vermessungstools wird das //! berechnete Volumen hier nur angezeigt, wenn das unitFlag //! gesetzt ist. @@ -57,29 +56,29 @@ //! ausf\xFChren //! R\xFCckgabe: das Volumen des Volumens //! Basisklasse: \c SoMeasureTool -//! Die Interaktionsmoeglichkeiten sind im Header von +//! Die Interaktionsmoeglichkeiten sind im Header von //! \c SoMeasureTool beschrieben class SO_MEASUREMENT_CLASS_SPEC UMDSoVolEstimation : public UMDSoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoVolEstimation); - + public: - + //! Constructor UMDSoVolEstimation(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! Volumen ausgeben SoSFFloat absVolume; //! Volumen des Ellipsoiden von Applikation berechnet //! Angabe immer in cmm SoSFFloat externVolume; - + // ######## Fields ############## - + //! Volumen wird extern berechnet SoSFBool volExternFlag; @@ -98,42 +97,42 @@ virtual ~UMDSoVolEstimation(); -private: - +private: + //! additional initializations void initVolEstimation(); - + //! Feld-Sensoren initialisieren void initVolEstimationFieldSensors(); - + //! haengt Knoten in Graphen void createVolEstimation(); - + //! creates the SoTransformerDragger void createDragger(); - //! gibt einen Gruppenknoten zurueck, der den + //! gibt einen Gruppenknoten zurueck, der den //! H\xFCllk\xF6rper enthaelt void createEllipsoid(); //! Rueckgabe eines Separators mit Text void createText(); - + //! Setzt den darzustellenden Text void getTextString(); - + //! \c startPos has been changed void pointChanged(); //! Welches Objekt wurde getroffen SbBool getPickedObjectMouseLeft(const SoPickedPoint* pickedPoint); - + //! die Funktionen zum Bewegen der Pfeilspitzen bei Tastatur-Events SbBool setArrowByKeyboard(float x, float y, float z, Taste taste); //! Der Callback f\xFCr den Dragger static void valueChangedCB(void* userData, SoDragger* dragger); - + //! the scale factor was changed static void scaleExternChangedCB(void* userData, SoSensor* s); //! the rotation was changed Modified: trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensionExample/SoView2DExtensionExample.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensionExample/SoView2DExtensionExample.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensionExample/SoView2DExtensionExample.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoView2DExtensionExample derived from SoView2DExtension +//! The Inventor node SoView2DExtensionExample derived from SoView2DExtension. /*! // \file SoView2DExtensionExample.h // \author Konrad M\xFChler @@ -28,7 +28,7 @@ -//! +//! The Inventor node SoView2DExtensionExample derived from SoView2DExtension. class UMDSOVIEW2DEXTENSIONEXAMPLE_EXPORT SoView2DExtensionExample : public SoView2DExtension { //! Implements the runtime type system interface of this new node. Modified: trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoDraw2DSilhouette.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoDraw2DSilhouette.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoDraw2DSilhouette.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoDraw2DSilhouette derived from SoView2DExtension +//! The Inventor node SoDraw2DSilhouette derived from SoView2DExtension, calculating a surrounding of an object. /*! // \file SoDraw2DSilhouette.h // \author Bj\xF6rn Meyer @@ -39,7 +39,7 @@ -//! +//! The Inventor node SoDraw2DSilhouette derived from SoView2DExtension, calculating a surrounding of an object. class UMDSOVIEW2DEXTENSIONS_EXPORT SoDraw2DSilhouette : public SoView2DExtension { //! Implements the runtime type system interface of this new node. @@ -55,8 +55,8 @@ // Input Connector for vertex-pointer SoSFNode inLineSet; - SoSFVec3f barycentre; - SoSFInt32 stippleFactor; + SoSFVec3f barycentre; + SoSFInt32 stippleFactor; //! Handling of events occurring in the viewer. virtual bool evalEvent(SoView2D *view2d, View2DSliceList *list, Modified: trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoTextureMaskedArea derived from SoView2DExtension. +//! The Inventor node SoTextureMaskedArea derived from SoView2DExtension. /*! // \file SoTextureMaskedArea.h // \author Bj\xF6rn Meyer @@ -49,7 +49,7 @@ -//! The Inventor module class SoTextureMaskedArea derived from SoView2DExtension. +//! The Inventor node SoTextureMaskedArea derived from SoView2DExtension. class UMDSOVIEW2DEXTENSIONS_EXPORT SoTextureMaskedArea : public SoView2DExtension { //! Implements the runtime type system interface of this new node. Modified: trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoView2DHalo.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoView2DHalo.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoView2DHalo.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoDrawMetaObjects derived from SoView2DExtension +//! The SoView2DExtension SoView2DHalo derived from SoView2DExtension. /*! // \file SoView2DHalo.h // \author Christian Tietjen, Bj\xF6rn Meyer // \date 2005-06-27 // -// +// */ //---------------------------------------------------------------------------------- @@ -33,29 +33,29 @@ #pragma warning( pop ) -//! +//! The SoView2DExtension SoView2DHalo derived from SoView2DExtension. class UMDSOVIEW2DEXTENSIONS_EXPORT SoView2DHalo : public SoView2DExtension { //! Implements the runtime type system interface of this new node. SO_NODE_HEADER(SoView2DHalo); - + public: //! Constructor SoView2DHalo(); - + SoSFColor upColor, downColor; SoSFVec3f worldPosition; SoSFBool useLineStyle, useColor; //! Initializes this class (called on dll initialization). static void initClass(); - + //! Handling of events occurring in the viewer. virtual bool evalEvent(SoView2D *view2d, View2DSliceList *list, View2DEvent* event, View2DEventPhase phase); - + //! Virtual method called by the \c SoView2D node when an image is rendered. virtual void draw(View2DSliceList *list, View2DSlice *slice, int z); - + protected: //! Protected destructor virtual ~SoView2DHalo(); Modified: trunk/UMD/METK/Sources/Inventor/UMDStraightLine/SoStraightLine.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDStraightLine/SoStraightLine.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDStraightLine/SoStraightLine.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoStraightLine derived from SoSeparator +//! Inventor node SoStraightLine for a straight line with a start and an endpoint derived from SoSeparator. /*! // \file SoStraightLine.h // \author kmuehler @@ -38,63 +38,63 @@ class SoRotation; class SoCylinder; -//! A single line with a start and an endpoint +//! Inventor node SoStraightLine for a straight line with a start and an endpoint derived from SoSeparator. class UMDSTRAIGHTLINE_EXPORT SoStraightLine : public SoSeparator { - //! Implements the runtime type system interface of this new node. - SO_NODE_HEADER(SoStraightLine); + //! Implements the runtime type system interface of this new node. + SO_NODE_HEADER(SoStraightLine); public: - //! Constructor - SoStraightLine(); + //! Constructor + SoStraightLine(); - virtual ~SoStraightLine(); + virtual ~SoStraightLine(); - //! Initializes this class (called on dll initialization). - static void initClass(); + //! Initializes this class (called on dll initialization). + static void initClass(); - //@{! Fields + //@{! Fields - SoSFVec3f startPoint; + SoSFVec3f startPoint; - SoSFVec3f endPoint; + SoSFVec3f endPoint; - SoSFColor color; + SoSFColor color; - SoSFFloat thickness; + SoSFFloat thickness; - SoSFFloat transparency; + SoSFFloat transparency; - //@} + //@} - SbVec3f getDirectionVector() { return _dirVec; }; + SbVec3f getDirectionVector() { return _dirVec; }; -protected: - static void startPointChangedCB(void *data, SoSensor* sens); - static void endPointChangedCB(void *data, SoSensor* sens); - static void colorChangedCB(void *data, SoSensor* sens); - static void thicknessChangedCB(void *data, SoSensor* sens); - static void transparencyChangedCB(void *data, SoSensor* sens); +protected: + static void startPointChangedCB(void *data, SoSensor* sens); + static void endPointChangedCB(void *data, SoSensor* sens); + static void colorChangedCB(void *data, SoSensor* sens); + static void thicknessChangedCB(void *data, SoSensor* sens); + static void transparencyChangedCB(void *data, SoSensor* sens); private: - SoFieldSensor* _startPointSensor; - SoFieldSensor* _endPointSensor; - SoFieldSensor* _colorSensor; - SoFieldSensor* _thicknessSensor; - SoFieldSensor* _transparencySensor; + SoFieldSensor* _startPointSensor; + SoFieldSensor* _endPointSensor; + SoFieldSensor* _colorSensor; + SoFieldSensor* _thicknessSensor; + SoFieldSensor* _transparencySensor; - SoCylinder* _cylinder; - SoMaterial* _material; - SoTranslation* _translation1; - SoTranslation* _translation2; - SoRotation* _rotation1; + SoCylinder* _cylinder; + SoMaterial* _material; + SoTranslation* _translation1; + SoTranslation* _translation2; + SoRotation* _rotation1; - SbVec3f _dirVec; + SbVec3f _dirVec; - void calculate(); + void calculate(); }; #endif // __SOSTRAIGHTLINE_H Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,3 +1,7 @@ +//! Inventor node class derived from SoNode that clears specific GL buffers. +//! \file UMDStraightLineSystem.h +//! \author Nicolas Halper + ///////////////////////////////////////////////////////////////////// // // SoClearGLBuffers @@ -24,27 +28,28 @@ class SoNodeSensor; class SoSensor; +//! Inventor node class derived from SoNode that clears specific GL buffers. class UMDTOOLS_EXPORT SoClearGLBuffers : public SoNode { SO_NODE_HEADER(SoClearGLBuffers); public: - - SoClearGLBuffers(); - SoSFBool clearColorBuffer; // GL_COLOR_BUFFER_BIT The buffers currently enabled for color writing. - SoSFBool clearDepthBuffer; // GL_DEPTH_BUFFER_BIT The depth buffer. - SoSFBool clearAccumBuffer; // GL_ACCUM_BUFFER_BIT The accumulation buffer. - SoSFBool clearStencilBuffer; // GL_STENCIL_BUFFER_BIT The stencil buffer. - SoSFInt32 whichGLbuffers; + SoClearGLBuffers(); + SoSFBool clearColorBuffer; // GL_COLOR_BUFFER_BIT The buffers currently enabled for color writing. + SoSFBool clearDepthBuffer; // GL_DEPTH_BUFFER_BIT The depth buffer. + SoSFBool clearAccumBuffer; // GL_ACCUM_BUFFER_BIT The accumulation buffer. + SoSFBool clearStencilBuffer; // GL_STENCIL_BUFFER_BIT The stencil buffer. + SoSFInt32 whichGLbuffers; + SoEXTENDER public: - virtual void doAction(SoAction *action); - virtual void GLRender(SoGLRenderAction *action); - virtual void callback(SoCallbackAction *action); + virtual void doAction(SoAction *action); + virtual void GLRender(SoGLRenderAction *action); + virtual void callback(SoCallbackAction *action); SoINTERNAL public: - static void initClass(); + static void initClass(); protected: virtual ~SoClearGLBuffers(); Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoFileToSceneGraph.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoFileToSceneGraph.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoFileToSceneGraph.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,3 +1,6 @@ +//! Inventor node SoFileToSceneGraph derived from SoSeparator creating scene graphs from scenes loaded with SoFile. +//! \file SoFileToSceneGraph.h + #ifndef _SoFileToSceneGraph_H #define _SoFileToSceneGraph_H @@ -8,6 +11,7 @@ class SoFieldSensor; class SoSearchAction; +//! Inventor node SoFileToSceneGraph derived from SoSeparator creating scene graphs from scenes loaded with SoFile. class UMDTOOLS_EXPORT SoFileToSceneGraph : public SoSeparator { typedef SoSeparator inherited; @@ -16,7 +20,6 @@ public: - //! A float field. SoSFNode inputObject; SoSFNode outConvertedScene; @@ -27,13 +30,13 @@ private: - //! the sensor for \c inputObject + //! the sensor for inputObject. SoFieldSensor* _inputObjectSensor; - //! called if inputObject has been changed, calls the non-static method \c inputChanged + //! called if inputObject has been changed, calls the non-static method inputChanged. static void inputChangedCB(void *userData, SoSensor*); - //! called if the ouput should be changed, calls the non-static method \c outputChanged + //! called if the ouput should be changed, calls the non-static method outputChanged. void inputChanged(); - //! called by \c outputChangedCB + //! called by outputChangedCB SoSeparator* _inputSep; SoSearchAction* _searchAction; Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoFramesPerSecond.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoFramesPerSecond.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoFramesPerSecond.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoFramesPerSecond derived from SoSeparator +//! The Inventor node SoFramesPerSecond derived from SoSeparator counting number of drawn frames per second. /*! // \file SoFramesPerSecond.h // \author Christian Tietjen // \date 2004-12-23 // -// +// */ //---------------------------------------------------------------------------------- @@ -26,21 +26,21 @@ #include <Inventor/SbTime.h> #include "XVLeaveScope.h" -//! +//! The Inventor node SoFramesPerSecond derived from SoSeparator counting number of drawn frames per second. class UMDTOOLS_EXPORT SoFramesPerSecond : public SoSeparator { //! Implements the runtime type system interface of this new node. SO_NODE_HEADER(SoFramesPerSecond); - + public: //! Constructor SoFramesPerSecond(); SoSFFloat fps; - + //! Initializes this class (called on dll initialization). static void initClass(); - + protected: //! Protected destructor virtual ~SoFramesPerSecond(); Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoMinimalEnclosingCircle derived from SoSeparator +//! The Inventor node SoMinimalEnclosingCircle derived from SoSeparator to get the midpoint and the radius of these scene in screen space. /*! // \file SoMinimalEnclosingCircle.h // \author Christian Tietjen // \date 2004-12-23 // -// +// */ //---------------------------------------------------------------------------------- @@ -33,65 +33,65 @@ class SoState; class SoNodeSensor; -//! +//! The Inventor node SoMinimalEnclosingCircle derived from SoSeparator to get the midpoint and the radius of these scene in screen space. class UMDTOOLS_EXPORT SoMinimalEnclosingCircle : public SoSeparator { //! Implements the runtime type system interface of this new node. SO_NODE_HEADER(SoMinimalEnclosingCircle); - + public: //! Constructor SoMinimalEnclosingCircle(); - + SoSFVec3f center; SoSFFloat radius; - + //! Initializes this class (called on dll initialization). static void initClass(); - + protected: //! Protected destructor virtual ~SoMinimalEnclosingCircle(); virtual void GLRenderBelowPath(SoGLRenderAction* action); virtual void GLRender(SoGLRenderAction* action); - + void compute(SoGLRenderAction* action); - + private: enum SoMinimalEnclosingCircle_Method {MEC, MidPointRadius}; //! Sensor to detect changes in node's fields. SoNodeSensor *_nodeSensor; - + //! Called by \c _nodeSensor when any field in node changes. //! Only redirects the call of this static function to the //! class method \c nodeChanged. static void nodeChangedCB(void *data, SoSensor* sens); - + //! Called by the static function \c _nodeChangedCB to notify node changes. void nodeChanged(SoNodeSensor* sensor); - + //! generates a float array out of an scene graph void getPointSet(SbVec3f* &pointSet, long &size); - + const SbVec3f getScreenPos(const SbVec3f &vertex); - + SbMatrix _objToScreen; SbVec2f _winSize; SbBool* _pixelMatrix; - + SbVec3f* _pointSet3D; long _size3D; float _zValue; SbVec2f* _pointSet2D; - + SbVec2f* _pointSetRaster; long _sizeRaster; void rasterizeAndSort(); - + void screenSpaceBoundingBox(); - + inline float distance2D(const register float* point1, const register float* point2) { register float d1 = * point1 - * point2; register float d2 = *(point1 + 1) - *(point2 + 1); Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.cpp 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.cpp 2009-06-25 16:42:58 UTC (rev 162) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoMousePosition +//! The Inventor module class SoMousePosition getting the mouse position into a node field. /*! // \file SoMousePosition.cpp // \author Maik Beye // \date 2007-02-20 // -// +// */ //---------------------------------------------------------------------------------- @@ -34,14 +34,14 @@ // -------------------------------------------------------------------------- SoMousePosition::SoMousePosition() { - + // Execute inventor internal stuff for node construction. SO_NODE_CONSTRUCTOR(SoMousePosition); - + SO_NODE_ADD_FIELD(mousePosition, (0.0,0.0)); SO_NODE_ADD_FIELD(mouseX, (0)); SO_NODE_ADD_FIELD(mouseY, (0)); - + // EventCallback fuer die Mousebutton-Ereignisse SoEventCallback* eventCB = new SoEventCallback; addChild(eventCB); @@ -68,9 +68,9 @@ } void SoMousePosition::getMousePosition(SoEventCallback* eventCB) { - + const SoEvent* event = eventCB->getEvent(); - mousePosition.setValue( SbVec2s( event->getPosition()) ); - - + mousePosition.setValue( SbVec2s( event->getPosition()) ); + + } Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoMousePosition.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoMousePosition derived from SoSeparator +//! The Inventor node SoMousePosition getting the mouse position into a node field. /*! // \file SoMousePosition.h // \author Maik Beyer // \date 2007-02-20 // -// +// */ //---------------------------------------------------------------------------------- @@ -30,12 +30,12 @@ class SoEventCallback; -//! +//! The Inventor node SoMousePosition getting the mouse position into a node field. class UMDTOOLS_EXPORT SoMousePosition : public SoGroup { //! Implements the runtime type system interface of this new node. SO_NODE_HEADER(SoMousePosition); - + public: //! Constructor SoMousePosition(); @@ -43,20 +43,20 @@ SoSFVec2s mousePosition; SoSFInt32 mouseX; SoSFInt32 mouseY; - + //! Initializes this class (called on dll initialization). static void initClass(); - + protected: //! Protected destructor virtual ~SoMousePosition(); //! Callback for Location2-Events static void mouseMovedCB(void* userData, SoEventCallback* eventCB); - void mouseMoved(SoEventCallback* eventCB); - + void mouseMoved(SoEventCallback* eventCB); + void getMousePosition(SoEventCallback* eventCB); -//private: +//private: }; Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapeInfo.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapeInfo.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapeInfo.h 2009-06-25 16:42:58 UTC (rev 162) @@ -2,7 +2,7 @@ // $Id: SoShapeInfo.h,v 1.10 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/InventorModules/SoMeasurement/SoShapeInfo.h,v $ -/*! +/*! Inventor node SoShapeInfo derived from SoSeparator returns the number of points, lines and triangles in the subgraph. // \file SoShapeInfo.h // \author Christian Tietjen // \date 09/2002 @@ -32,50 +32,50 @@ class SoFieldSensor; class SoPrimitiveVertex; - +//! Inventor node SoShapeInfo derived from SoSeparator returns the number of points, lines and triangles in the subgraph. class UMDTOOLS_EXPORT SoShapeInfo : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(SoShapeInfo); - - + + public: - + //! Constructor SoShapeInfo(); //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! the input node SoSFNode rootInput; SoSFInt32 numPoints, numLines, numTriangles, numNodes; //! forces the computation void calculate(); - + protected: - + //! Destructor virtual ~SoShapeInfo(); - - + + private: - + //! listen whether the input has been changed SoFieldSensor *_inputSens; //! callback action to collect the points SoCallbackAction* _myAction; - + //! method called on input changed static void inputCB(void *userData, SoSensor*); //! called, if a new child in the scenegraph will be traversed static SoCallbackAction::Response preCB(void *userData, SoCallbackAction *action, const SoNode *node); //! called if the child is a point set - static void pointCB (void* userData, SoCallbackAction* action, + static void pointCB (void* userData, SoCallbackAction* action, const SoPrimitiveVertex* v); //! called if the child is a line set - static void lineCB (void* userData, SoCallbackAction* action, + static void lineCB (void* userData, SoCallbackAction* action, const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2); //! called if the child is a shape Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapePartition.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapePartition.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoShapePartition.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,3 +1,6 @@ +//! Inventor node SoShapePartition derived from SoSeparator splitting a scene in several cubes (bounding boxes) and converts all shapes in SoIndexedTriangleStripSets. +//! \file SoShapePartition.h + #ifndef _SOSHAPEPARTITION #define _SOSHAPEPARTITION @@ -33,17 +36,17 @@ struct ltVertex; struct ltEdge; - +//! Inventor node SoShapePartition derived from SoSeparator splitting a scene in several cubes (bounding boxes) and converts all shapes in SoIndexedTriangleStripSets. class UMDTOOLS_EXPORT SoShapePartition : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(SoShapePartition); - - + + public: - + //! Constructor SoShapePartition(); - + SoSFNode outConvertedShape; SoSFNode input; @@ -54,19 +57,19 @@ SoSFBool valid; SoSFBool autoUpdate; - + //! must be called first to initialize the class in OpenInventor static void initClass(); - - + + protected: - + //! Destructor virtual ~SoShapePartition(); - - + + private: - + //! internal representation of the point set SoVertexProperty** _vertexPropArray; SoGroup* _itssHolder; @@ -80,14 +83,14 @@ void _nodeChanged (SoField *field); void compute(); - + //! inserts the points into the hashtable const Vertex* insertVertex(const SbVec3f vector, const SbVec3f normal, const SbVec2f texCoord, const int arrayPosition); Edge* generateEdge(const Vertex* p1, const Vertex* p2, const int arrayPosition); //! generate TriangleStripSets out of the collected triangles void generateITSS(); - + //! callback action to collect the points SoCallbackAction* _myAction; //! called, if a new child in the scenegraph will be traversed @@ -96,13 +99,13 @@ const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2, const SoPrimitiveVertex* v3); - + //! map hashtable containing all vertices std::set<Vertex*, ltVertex>* _hashTable; - + //! set containing all edges std::set<Edge*, ltEdge>* _edgeSet; - + //! vector containing all triangles std::set<Triangle*>* _triangleSet; @@ -144,7 +147,7 @@ void setVertex2(const Vertex* v); void setTriangle1(Triangle* tri); void setTriangle2(Triangle* tri); - + private: const Vertex *_vertex1, *_vertex2; Triangle *_triangle1, *_triangle2; @@ -166,7 +169,7 @@ const Edge* getEdge1() const; const Edge* getEdge2() const; const Edge* getEdge3() const; - + private: const Vertex *_vertex1, *_vertex2, *_vertex3; Edge *_edge1, *_edge2, *_edge3; @@ -175,13 +178,13 @@ //! sort criterion for the hashtable set struct ltVertex { - + //! sorts points lexicographical //! test for vertex coordinates, if they are the same, test for color index bool operator()(const Vertex* v1, const Vertex* v2) const { const float* p1 = v1->vertex.getValue(); const float* p2 = v2->vertex.getValue(); - + if (*p1 < *p2) return true; if (*p1 > *p2) return false; if (*(++p1) < *(++p2)) return true; @@ -192,7 +195,7 @@ p1 = v1->normal.getValue(); p2 = v2->normal.getValue(); - + if (*p1 < *p2) return true; if (*p1 > *p2) return false; if (*(++p1) < *(++p2)) return true; @@ -203,7 +206,7 @@ p1 = v1->texCoord.getValue(); p2 = v2->texCoord.getValue(); - + if (*p1 < *p2) return true; if (*p1 > *p2) return false; if (*(++p1) < *(++p2)) return true; @@ -215,11 +218,11 @@ //! sort criterion for the edge set struct ltEdge { - + bool operator()(const Edge edge1, const Edge edge2) const { const Vertex* e1v1 = edge1.getVertex1(); const Vertex* e2v1 = edge2.getVertex1(); - + if (e1v1 < e2v1) return true; else { if (e1v1 > e2v1) return false; Modified: trunk/UMD/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDViewerTrigger/SoUMDViewerTrigger.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,6 +1,5 @@ // -------------------------------------------------------------------------- -//! The Inventor module class SoUMDViewerTrigger derived from SoSeparator -/*! +/*! Inventor node SoUMDViewerTrigger derived from SoSeparator to control the rendering status of an ExaminerViewer. // \file SoUMDViewerTrigger.h // \author Konrad M\xFChler // \date 2005-04-23 @@ -28,7 +27,7 @@ #include "XVLeaveScope.h" -//! Module to control the rendering status of an ExaminerViewer +//! Inventor node SoUMDViewerTrigger derived from SoSeparator to control the rendering status of an ExaminerViewer. class UMDVIEWERTRIGGER_EXPORT SoUMDViewerTrigger : public SoSeparator { SO_NODE_HEADER(SoUMDViewerTrigger); //!< Implements the runtime type system interface of this new node. Modified: trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.h 2009-06-25 12:06:40 UTC (rev 161) +++ trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.h 2009-06-25 16:42:58 UTC (rev 162) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoVisLogo derived from SoShape +//! The Inventor node SoVisLogo derived from SoShape showing the logo of VIS group for 3D viewer. /*! // \file SoVisLogo.h // \author Konrad M\xFChler // \date 2007-06-12 // -// +// */ //---------------------------------------------------------------------------------- @@ -31,69 +31,69 @@ #include <Inventor/sensors/SoFieldSensor.h> #include "XVLeaveScope.h" -//! +//! The Inventor node SoVisLogo derived from SoShape showing the logo of VIS group for 3D viewer. class UMDVISLOGO_EXPORT SoVisLogo : public SoShape { - //! Implements the runtime type system interface of this new node. - SO_NODE_HEADER(SoVisLogo); + //! Implements the runtime type system interface of this new node. + SO_NODE_HEADER(SoVisLogo); public: - //! Constructor - SoVisLogo(); + //! Constructor + SoVisLogo(); - //! Initializes this class (called on dll initialization). - static void initClass(); + //! Initializes this class (called on dll initialization). + static void initClass(); - //@{! Fields - - SoSFString fldLocalPath; - SoSFEnum fldFilename; - SoSFEnum fldCorner; + //@{! Fields - //@} + SoSFString fldLocalPath; + SoSFEnum fldFilename; + SoSFEnum fldCorner; - //! called whenever the scene is rendered - virtual void GLRender(SoGLRenderAction *action); - //! called when an SoEvent is passed through the scene - virtual void handleEvent(SoHandleEventAction *action); - //! called when a scene bounding box is computed - virtual void computeBBox(SoAction * action, SbBox3f &box, SbVec3f ¢er); - //! called by the generate primitives action - virtual void generatePrimitives(SoAction *action); - //! called by the ray pick action - virtual void rayPick(SoRayPickAction *action); + //@} + //! called whenever the scene is rendered + virtual void GLRender(SoGLRenderAction *action); + //! called when an SoEvent is passed through the scene + virtual void handleEvent(SoHandleEventAction *action); + //! called when a scene bounding box is computed + virtual void computeBBox(SoAction * action, SbBox3f &box, SbVec3f ¢er); + //! called by the generate primitives action + virtual void generatePrimitives(SoAction *action); + //! called by the ray pick action + virtual void rayPick(SoRayPickAction *action); + protected: - //! Protected destructor - virtual ~SoVisLogo(); + //! Protected destructor + virtual ~SoVisLogo(); - //! Sensor to detect changes in node's fields. - SoNodeSensor* _nodeSensor; + //! Sensor to detect changes in node's fields. + SoNodeSensor* _nodeSensor; - //! Called by \c _nodeSensor when any field in node changes. - //! Only redirects the call of this static function to the - //! class method \c nodeChanged. - static void nodeChangedCB(void *data, SoSensor* sens); + //! Called by \c _nodeSensor when any field in node changes. + //! Only redirects the call of this static function to the + //! class method \c nodeChanged. + static void nodeChangedCB(void *data, SoSensor* sens); - //! Called by the static function \c _nodeChangedCB to notify node changes. - void nodeChanged(SoNodeSensor* sensor); + //! Called by the static function \c _nodeChangedCB to notify node changes. + void nodeChanged(SoNodeSensor* sensor); - SoFieldSensor* filenameSensor; - SoFieldSensor* localPathSensor; - static void filenameChangedCB(void *, SoSensor *); + SoFieldSensor* filenameSensor; + SoFieldSensor* localPathSensor; + static void filenameChangedCB(void *, SoSensor *); - enum logoNames {vislogo, otto, otto2, lst, neck}; //Defintion der Filenames in filenameChangedCB - enum corners {topleft, topright, bottomleft, bottomright}; - + enum logoNames {vislogo, otto, otto2, lst, neck}; //Defintion der Filenames in filenameChangedCB + enum corners {topleft, topright, bottomleft, bottomright}; + private: - unsigned long load_result, img_width, img_height; - char* png_image; - char *filename; + unsigned long load_result, img_width, img_height; + char* png_image; + char *filename; - int pngLoad(const char *file, unsigned long &pwidth, unsigned long &pheight, char* &image_data_ptr); + int pngLoad(const char *file, unsigned long &pwidth, unsigned long &pheight, char* &image_data_ptr); - void activateAttachments(); + void activateAttachments(); }; #endif // __SOVISLOGO_H Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptCommandObject.h ========================================... [truncated message content] |
From: <of...@us...> - 2009-06-25 12:06:46
|
Revision: 161 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=161&view=rev Author: ofriman Date: 2009-06-25 12:06:40 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Small language changes. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:42:37 UTC (rev 160) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 12:06:40 UTC (rev 161) @@ -1,4 +1,3 @@ -// **InsertLicense** code //----------------------------------------------------------------------------------- //! //! Doxygen reference for the MeVisLab Community Sources. @@ -8,15 +7,15 @@ This is the Doxygen reference page for the MeVisLab Community Sources. It contains source code documentation automatically generated on the -Build Server for the Community Sources. +Build Server for the MeVisLab Community Sources. -To keep the file and class references up to date please assure that the -file and class comments are added to your source codes and that they are +To keep the file and class references up to date\xB4, please assure that the +file and class comments are added to your source code and that they are activated with an "!" at the beginning of comments. Activating comments for classes, structs, functions, typdefs, enumerators -etc. of course is also highly recommended, because this will also be added -to the generated documentation then. +etc. is also highly recommended, because these comments will then be added +to the generated documentation. The file types *.h, *.js, and *.py are scanned for comments and documentation. @@ -40,7 +39,7 @@ //! Cooks the complete dinner. //! \param numForks is the number of forks to lay on the table. //! \param numPlates is the number of plates to lay on the table. - //! \return is the complete number of objects layed on the table. + //! \return is the complete number of objects laid on the table. int createDinner(int numForks, int numPlates); protected: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 10:42:38
|
Revision: 160 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=160&view=rev Author: wolfspindler Date: 2009-06-25 10:42:37 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Docu enhanced. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:39:33 UTC (rev 159) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:42:37 UTC (rev 160) @@ -30,33 +30,35 @@ //! ML module class to prepare a dinner each evening. class Dinner : public BaseOp { - //! Enumerator identifiers for dinner objects. - enum DinnerObjects { - FORK = 0, //!< Id for fork objects. - PLATE //!< Id for plate objects. - }; + public: + //! Enumerator identifiers for dinner objects. + enum DinnerObjects { + FORK = 0, //!< Id for fork objects. + PLATE //!< Id for plate objects. + }; - //! Cooks the complete dinner. - //! \param numForks is the number of forks to lay on the table. - //! \param numPlates is the number of plates to lay on the table. - //! \return is the complete number of objects layed on the table. - int createDinner(int numForks, int numPlates); + //! Cooks the complete dinner. + //! \param numForks is the number of forks to lay on the table. + //! \param numPlates is the number of plates to lay on the table. + //! \return is the complete number of objects layed on the table. + int createDinner(int numForks, int numPlates); - //! Any C++ member documentation. - float _anyMember; + protected: + //! \name Function group creating dinner objects. + //@{ + //! Creates and lays a fork on the table. + void _createFork(); - //! \name Function group creating dinner objects. - //@{ - //! Creates and lays a fork on the table. - void _createFork(); + //! Creates and lays a plate on the table. + void _createPlate(); + //@} - //! Creates and lays a plate on the table. - void createPlate(); - //@} + //! Any C++ member documentation. + float _anyMember; }; \endverbatim -<h1><b><c> Thanks for keeping the documentation up to date! </c></b></h1><br><br><br><br> +<h1><b><c> Thanks for keeping the documentation up to date! </c></b></h1><br><br> */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 10:39:35
|
Revision: 159 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=159&view=rev Author: wolfspindler Date: 2009-06-25 10:39:33 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Typo fixed. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:38:01 UTC (rev 158) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:39:33 UTC (rev 159) @@ -25,7 +25,7 @@ \verbatim //! File containing the ML module class Dinner to prepare a dinner. //! \file mlDinner.h -//! \author Ms. Cookman +//! \author Mrs Cookman //! ML module class to prepare a dinner each evening. class Dinner : public BaseOp { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 10:38:08
|
Revision: 158 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=158&view=rev Author: wolfspindler Date: 2009-06-25 10:38:01 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Overview improved. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:25:45 UTC (rev 157) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:38:01 UTC (rev 158) @@ -18,12 +18,14 @@ etc. of course is also highly recommended, because this will also be added to the generated documentation then. +The file types *.h, *.js, and *.py are scanned for comments and documentation. + This is an example demonstrating many commonly used formatting commands and -a full class documentation (Java Script or C++): +a full class documentation: \verbatim -//! File containing the ML module class Dinner prepare a dinner each evening. +//! File containing the ML module class Dinner to prepare a dinner. //! \file mlDinner.h -//! \author Mister Misterman +//! \author Ms. Cookman //! ML module class to prepare a dinner each evening. class Dinner : public BaseOp { @@ -55,4 +57,6 @@ }; \endverbatim +<h1><b><c> Thanks for keeping the documentation up to date! </c></b></h1><br><br><br><br> + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 10:25:47
|
Revision: 157 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=157&view=rev Author: wolfspindler Date: 2009-06-25 10:25:45 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Example for doxygen'ed class improved. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:06:17 UTC (rev 156) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:25:45 UTC (rev 157) @@ -3,7 +3,7 @@ //! //! Doxygen reference for the MeVisLab Community Sources. //!\file mlCommunitySourcesDoc.h -//! \section MeVisLab Community Sources + /*! \mainpage MeVisLab Community Sources This is the Doxygen reference page for the MeVisLab Community Sources. @@ -18,30 +18,31 @@ etc. of course is also highly recommended, because this will also be added to the generated documentation then. -This could look as follows: -\code +This is an example demonstrating many commonly used formatting commands and +a full class documentation (Java Script or C++): +\verbatim //! File containing the ML module class Dinner prepare a dinner each evening. //! \file mlDinner.h //! \author Mister Misterman -... + //! ML module class to prepare a dinner each evening. class Dinner : public BaseOp { - ... - //! Identifiers for dinner objects. + + //! Enumerator identifiers for dinner objects. enum DinnerObjects { FORK = 0, //!< Id for fork objects. PLATE //!< Id for plate objects. }; - ... + //! Cooks the complete dinner. //! \param numForks is the number of forks to lay on the table. //! \param numPlates is the number of plates to lay on the table. //! \return is the complete number of objects layed on the table. int createDinner(int numForks, int numPlates); - ... + //! Any C++ member documentation. float _anyMember; - ... + //! \name Function group creating dinner objects. //@{ //! Creates and lays a fork on the table. @@ -50,9 +51,8 @@ //! Creates and lays a plate on the table. void createPlate(); //@} - ... + }; +\endverbatim -\endcode - - */ +*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 10:06:27
|
Revision: 156 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=156&view=rev Author: wolfspindler Date: 2009-06-25 10:06:17 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Example for doxygen'ed class added. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 09:41:16 UTC (rev 155) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 10:06:17 UTC (rev 156) @@ -5,13 +5,54 @@ //!\file mlCommunitySourcesDoc.h //! \section MeVisLab Community Sources /*! \mainpage MeVisLab Community Sources - -This is the Doxygen reference page for the MeVisLab Community Sources. -It contains source code documentation automatically generated on the + +This is the Doxygen reference page for the MeVisLab Community Sources. +It contains source code documentation automatically generated on the Build Server for the Community Sources. -To keep the file and class references up to date please assure that the -file and class comments are added to your source codes and that they are -activated with an "!" at the beginning of comments. - +To keep the file and class references up to date please assure that the +file and class comments are added to your source codes and that they are +activated with an "!" at the beginning of comments. + +Activating comments for classes, structs, functions, typdefs, enumerators +etc. of course is also highly recommended, because this will also be added +to the generated documentation then. + +This could look as follows: +\code +//! File containing the ML module class Dinner prepare a dinner each evening. +//! \file mlDinner.h +//! \author Mister Misterman +... +//! ML module class to prepare a dinner each evening. +class Dinner : public BaseOp { + ... + //! Identifiers for dinner objects. + enum DinnerObjects { + FORK = 0, //!< Id for fork objects. + PLATE //!< Id for plate objects. + }; + ... + //! Cooks the complete dinner. + //! \param numForks is the number of forks to lay on the table. + //! \param numPlates is the number of plates to lay on the table. + //! \return is the complete number of objects layed on the table. + int createDinner(int numForks, int numPlates); + ... + //! Any C++ member documentation. + float _anyMember; + ... + //! \name Function group creating dinner objects. + //@{ + //! Creates and lays a fork on the table. + void _createFork(); + + //! Creates and lays a plate on the table. + void createPlate(); + //@} + ... +}; + +\endcode + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 09:41:17
|
Revision: 155 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=155&view=rev Author: wolfspindler Date: 2009-06-25 09:41:16 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ADD: -Main page added to doxygen reference. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Added Paths: ----------- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-25 09:11:08 UTC (rev 154) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-25 09:41:16 UTC (rev 155) @@ -1,5 +1,5 @@ PROJECT_NAME = "C++ Reference of MeVisLab Community Sources" -INPUT = $${MLAB_Community_General}/Sources $${MLAB_Community_General}/Modules $${MLAB_UMD_METK}/Sources $${MLAB_UMD_METK}/Modules +INPUT = $${MLAB_Community_General}/Sources $${MLAB_Community_General}/Modules $${MLAB_UMD_METK}/Sources $${MLAB_UMD_METK}/Modules $${MLAB_Community_General}/Documentation/Sources FILE_PATTERNS = *.h *.hxx *.py *.js ENABLED_SECTIONS = USE_MCS_GLOBAL_DOXYGEN_DOC IGNORE_PREFIX = MLAB Added: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h =================================================================== --- trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h (rev 0) +++ trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h 2009-06-25 09:41:16 UTC (rev 155) @@ -0,0 +1,17 @@ +// **InsertLicense** code +//----------------------------------------------------------------------------------- +//! +//! Doxygen reference for the MeVisLab Community Sources. +//!\file mlCommunitySourcesDoc.h +//! \section MeVisLab Community Sources +/*! \mainpage MeVisLab Community Sources + +This is the Doxygen reference page for the MeVisLab Community Sources. +It contains source code documentation automatically generated on the +Build Server for the Community Sources. + +To keep the file and class references up to date please assure that the +file and class comments are added to your source codes and that they are +activated with an "!" at the beginning of comments. + + */ Property changes on: trunk/Community/General/Documentation/Sources/mlCommunitySourcesDoc.h ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |