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...> - 2011-09-09 08:04:13
|
Revision: 379 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=379&view=rev Author: broersen Date: 2011-09-09 08:04:06 +0000 (Fri, 09 Sep 2011) Log Message: ----------- - Updated the documentation for MeVisLab 2.2.1 Added Paths: ----------- trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/ trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images/ trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images/Screenshots/ trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images/Screenshots/MatlabScriptWrapper._default.png trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/MatlabScriptWrapper.mhelp Property changes on: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp ___________________________________________________________________ Added: bugtraq:number + true Property changes on: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images ___________________________________________________________________ Added: bugtraq:number + true Property changes on: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images/Screenshots ___________________________________________________________________ Added: bugtraq:number + true Added: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images/Screenshots/MatlabScriptWrapper._default.png =================================================================== (Binary files differ) Property changes on: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/Images/Screenshots/MatlabScriptWrapper._default.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/MatlabScriptWrapper.mhelp =================================================================== --- trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/MatlabScriptWrapper.mhelp (rev 0) +++ trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/mhelp/MatlabScriptWrapper.mhelp 2011-09-09 08:04:06 UTC (rev 379) @@ -0,0 +1,724 @@ +ModuleHelp { + MetaInformation { + definition = Modules/MLMatlabScriptWrapper.def + moduleName = MatlabScriptWrapper + moduleType = MLModule + author = "Alexander Gryanik, Ola Friman, Markus Harz, Alexander Broersen" + DLL = MLMatlabScriptWrapper + genre = Other + keywords = "Matlab scripting wrapper" + status = work-in-progress + seeAlso = "" + package = mlMatlab + packageGroup = MeVisLabLKEB + } + Purpose { + text = "The **MatlabScriptWrapper** module offers the possibility to execute `Matlab <http://www.mathworks.com/products/matlab/>`_ scripts within `MeVisLab <http://www.mevislab.de>`_ and establish a link to a Matlab console, for example to transfer data between MeVisLab and Matlab. Note that Matlab must be installed for this module to function." + } + Usage { + text = "Currently, three types of data structures can be transferred between MeVisLab and Matlab: + +- **Images:** + Up to three images can be used. Images are stored as up to six dimensional matrices in Matlab. + Note that MeVisLab and Matlab use different coordinate systems, see below for further information. + +- **CurveData (input only) and CurveLists:** + A `CurveData <http://www.mevislab.de/docs/2.0/MeVisLab/Resources/Documentation/Publish/SDK/ToolBoxReference/MLBasePage.html>`_ + is an object consisting of zero or one X- and any number of Y-data series. A CurveList is an array + of CurveData objects. In Matlab, a CurveList is represented as a cell array with in each cell a matrix + with the points of each series of a curve. The first column in the matrix contains the X-values, the + second column contains the first serie of Y-values, the third column the second serie of Y-values etc.. + +- **XMarkerLists:** + An `XMarker <http://www.mevislab.de/docs/2.0/MeVisLab/Resources/Documentation/Publish/SDK/ToolBoxReference/MLBasePage.html>`_ + is an object that contains a point (up to 6-D), a vector (3-D), a type variable (integer) and a name + (string). An XMarkerList is an array of XMarker objects. In Matlab, an XMarkerList is represented as + a struct with the following members (where *N* is the number of XMarkers): + + *<variablename>*.pos, where pos is an *N* x2, *N* x3, *N* x4, *N* x5 or *N* x6 matrix with the + position coordinates. + + *<variablename>*.vec, where vec is an *N* x2 or *N* x3 matrix of vectors. + + *<variablename>*.type, where type is an *N* x1 vector of integers. + + *<variablename>*.name, where name is an *N* x1 cell array of strings. + + .. note:: + + **Important:** the pos matrix determines the number of XMarkers *N*. The vec, type and name arrays must + have the same number of *N* rows, otherwise will these values not be copied to MeVisLab. See the example + network for an example. + +- **WEMs:** + A Winged Edge Mesh (`WEM <http://www.mevislab.de/docs/2.0/MeVisLab/Resources/Documentation/Publish/SDK/ToolBoxReference/WEMPage.html>`_) + is an object that contains a representation of a surface. In Matlab, a WEM is represented as a cell array + of structures with nodes (markers of vertices with a color, size, and style), faces (with a diffuse color + and alpha), edges (with a color, size, and style), a description (`Tag <http://www.mathworks.com/help/techdoc/ref/patch_props.html#Tag>`_) + and a label (`DisplayName <http://www.mathworks.com/help/techdoc/ref/patch_props.html#DisplayName>`_). + Optionally, if a WEM contains a Look Up Table (`LUT <http://www.mevislab.de/docs/2.0/MeVisLab/Resources/Documentation/Publish/SDK/ToolBoxReference/MLLUTPage.html>`_), + this data will be put into the `CData <http://www.mathworks.com/help/techdoc/ref/patch_props.html#CData>`_ + field. These structures can be exchanged directly with the `Matlab Patch Properties <http://www.mathworks.com/help/techdoc/ref/patch_props.html>`_. + See the example network for an example. + +- **Mat4Lists (input only):** + A `Mat4List <http://www.mevislab.de/docs/2.0/MeVisLab/Resources/Documentation/Publish/SDK/ToolBoxReference/mlLinearAlgebraPage.html>`_ + is an object that contains a list of 4x4 matrices. In Matlab, a Mat4List is represented as a cell array + with in each cell a 4x4 integer matrix. + +- **CSOLists (input only):** + A Contour Segmentation Object (`CSO <http://www.mevislab.de/docs/2.0/MeVisLab/Resources/Documentation/Publish/SDK/ToolBoxReference/CSOPage.html>`_)List + is an object that contains a list of CSOs. In Matlab, a CSOList is represented as a cell array with in + each cell an *N* x3 integer matrix with the position coordinates of one CSO. + +- **Scalars:** + Double precision. These can be used both as input and ouput variables. Field notifications will be sent + in MeVisLab only if a scalar has changed its value after the Matlab script execution. + +- **Vectors:** + Double precision 4-D integer point. These can be used both as input and ouput variables. Field notifications + will be sent in MeVisLab only if a vector has changed its value after the Matlab script execution. + +- **Matrices:** + Double precision 4x4 integer matrix. These can be used both as input and ouput variables. Field notifications + will be sent in MeVisLab only if a matrix has changed its value after the Matlab script execution. + +- **Strings:** + These can be used both as input and ouput variables. Field notifications will be sent in MeVisLab only if a + string has changed its value after the Matlab script execution. + +The variable names for the above data structures in the Matlab workspace can be set. + +The Matlab script can be written directly in the module GUI, or an external script file (`.m`) can be called. +If you choose to use an existing script, the script in :field:`matlabScript` will disappear and there is no +posibility to edit a Matlab script file from MeVisLab. + +Push the :field:`update` button to execute the Matlab script, set :field:`autoUpdate` to update on input +value change, or set :field:`autoApply` to update on parameter value change. + +Use the :field:`showSessionWindow` checkbox to show or hide the session window. + +The :field:`restartMatlab` button can be used to restart a Matlab session once it is terminated externally." + } + Details { + text = "***Coordinate systems in MeVisLab and Matlab** + +In the context of this module, the only coordinate system that is considered is the discrete voxel index coordinate system, i.e., images are considered as multidimensional matrices. Both MeVisLab and Matlab have the origin in the upper left corner and a y-axis that points "downwards". However, note that MeVisLab starts counting a 0, whereas Matlab starts counting a 1, i.e., the upper left voxel has the coordinate ``(0,0)`` in MeVisLab and ``(1,1)`` in Matlab. The major difference between MeVisLab and Matlab is the indexing order: MeVisLab uses ``[x,y]`` while Matlab uses ``[y,x]`` (i.e., row-column into a matrix). Thus, an image will appear flipped when exported from MeVisLab and visualized in Matlab or vice-versa. To correct for this, one can use the *permute* command in Matlab, for example:: + + >> permute(Input0,[2 1]) + +which swaps the x and y axes. See the example network for an example.*" + } + Interaction { + text = "" + } + Tips { + text = "" + } + Windows { + text = "" + Window _default { + title = "" + text = ".. screenshot:: _default" + } + } + Inputs { + text = "Up to three input images and one CurveData, CurveList, XMarkerList , or WEM can be attached to the module. Input to the module from MeVisLab is optional, the output can be generated entirely in Matlab without input from MeVisLab (see the example network for examples)." + Field input0 { + type = Image + text = "" + } + Field input1 { + type = Image + text = "" + } + Field input2 { + type = Image + text = "" + } + Field inputXMarkerList { + type = MLBase + text = "" + } + Field inputWEM { + type = MLBase + text = "" + } + Field inputCurve { + type = MLBase + text = "" + } + } + Outputs { + text = "Up to three output images and one CurveList, one XMarkerList, or one WEM." + Field output0 { + type = Image + text = "" + } + Field output1 { + type = Image + text = "" + } + Field output2 { + type = Image + text = "" + } + Field outputXMarkerList { + type = MLBase + text = "" + } + Field outputWEM { + type = MLBase + text = "" + } + Field outputCurveList { + type = MLBase + text = "" + } + } + Parameters { + Field instanceName { + type = String + text = "" + title = "" + needsDocumentation = No + visibleInGUI = No + persistent = Yes + default = MatlabScriptWrapper + } + Field matlabScript { + type = String + text = "A field where the Matlab script can be written." + title = "Matlab Script" + visibleInGUI = Yes + persistent = Yes + default = "Output0=Input0 % Type your matlab script here." + } + Field useExternalScript { + type = Bool + text = "Enables the possibility to use an external Matlab script file (.m)." + title = "Use External Script" + visibleInGUI = Yes + persistent = Yes + default = FALSE + } + Field matlabScriptPath { + type = String + text = "" + title = "Matlab Script" + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field inDataName0 { + type = String + text = "" + title = "Input0 name" + visibleInGUI = Yes + persistent = Yes + default = Input0 + } + Field inDataName1 { + type = String + text = "" + title = "Input1 name" + visibleInGUI = Yes + persistent = Yes + default = Input1 + } + Field inDataName2 { + type = String + text = "" + title = "Input2 name" + visibleInGUI = Yes + persistent = Yes + default = Input2 + } + Field outDataName0 { + type = String + text = "" + title = "Output0 name" + visibleInGUI = Yes + persistent = Yes + default = Output0 + } + Field outDataName1 { + type = String + text = "" + title = "Output1 name" + visibleInGUI = Yes + persistent = Yes + default = Output1 + } + Field outDataName2 { + type = String + text = "" + title = "Output2 name" + visibleInGUI = Yes + persistent = Yes + default = Output2 + } + Field inXMarkerName { + type = String + text = "" + title = "Input name" + visibleInGUI = Yes + persistent = Yes + default = inXMarker + } + Field outXMarkerName { + type = String + text = "" + title = "Output name" + visibleInGUI = Yes + persistent = Yes + default = outXMarker + } + Field inWEMName { + type = String + text = "" + title = "Input name" + visibleInGUI = Yes + persistent = Yes + default = inWEM + } + Field outWEMName { + type = String + text = "" + title = "Output name" + visibleInGUI = Yes + persistent = Yes + default = outWEM + } + Field inCurveName { + type = String + text = "" + title = "Input name" + visibleInGUI = Yes + persistent = Yes + default = inCurve + } + Field outCurveName { + type = String + text = "" + title = "Output name" + visibleInGUI = Yes + persistent = Yes + default = outCurve + } + Field update { + type = Trigger + text = "Execute the Matlab script." + title = Update + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field autoUpdate { + type = Bool + text = "Execute the script automatically on input change (only for input images, CurveData, CurveList, XMarkerList, and WEM, not for changes in the names)." + title = "Auto update" + visibleInGUI = Yes + persistent = Yes + default = FALSE + } + Field autoApply { + type = Bool + text = "Execute the script automatically on parameter change (only for fields, not for changes in the names)." + title = "Auto apply" + visibleInGUI = Yes + persistent = Yes + default = FALSE + } + Field restartMatlab { + type = Trigger + text = "Restarts the Matlab engine." + title = "Restart Matlab" + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field status { + type = String + text = "This field gives information whether the Matlab script was executed correctly or not." + title = Status + visibleInGUI = Yes + persistent = Yes + default = Ready. + } + Field scalarName0 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = scalar0 + } + Field scalar0 { + type = Double + text = "" + title = Value + visibleInGUI = Yes + min = "" + max = "" + persistent = Yes + default = 0 + } + Field scalarName1 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = scalar1 + } + Field scalar1 { + type = Double + text = "" + title = Value + visibleInGUI = Yes + min = "" + max = "" + persistent = Yes + default = 0 + } + Field scalarName2 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = scalar2 + } + Field scalar2 { + type = Double + text = "" + title = Value + visibleInGUI = Yes + min = "" + max = "" + persistent = Yes + default = 0 + } + Field scalarName3 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = scalar3 + } + Field scalar3 { + type = Double + text = "" + title = Value + visibleInGUI = Yes + min = "" + max = "" + persistent = Yes + default = 0 + } + Field scalarName4 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = scalar4 + } + Field scalar4 { + type = Double + text = "" + title = Value + visibleInGUI = Yes + min = "" + max = "" + persistent = Yes + default = 0 + } + Field scalarName5 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = scalar5 + } + Field scalar5 { + type = Double + text = "" + title = Value + visibleInGUI = Yes + min = "" + max = "" + persistent = Yes + default = 0 + } + Field stringName0 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = string0 + } + Field string0 { + type = String + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field stringName1 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = string1 + } + Field string1 { + type = String + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field stringName2 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = string2 + } + Field string2 { + type = String + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field stringName3 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = string3 + } + Field string3 { + type = String + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field stringName4 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = string4 + } + Field string4 { + type = String + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field stringName5 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = string5 + } + Field string5 { + type = String + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field vectorName0 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = vector0 + } + Field vector0 { + type = Vector4 + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "0 0 0 0" + } + Field vectorName1 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = vector1 + } + Field vector1 { + type = Vector4 + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "0 0 0 0" + } + Field vectorName2 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = vector2 + } + Field vector2 { + type = Vector4 + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "0 0 0 0" + } + Field vectorName3 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = vector3 + } + Field vector3 { + type = Vector4 + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "0 0 0 0" + } + Field vectorName4 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = vector4 + } + Field vector4 { + type = Vector4 + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "0 0 0 0" + } + Field vectorName5 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = vector5 + } + Field vector5 { + type = Vector4 + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "0 0 0 0" + } + Field matrixName0 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = matrix0 + } + Field matrix0 { + type = Matrix + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "1 0 0 0 +0 1 0 0 +0 0 1 0 +0 0 0 1" + } + Field matrixName1 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = matrix1 + } + Field matrix1 { + type = Matrix + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "1 0 0 0 +0 1 0 0 +0 0 1 0 +0 0 0 1" + } + Field matrixName2 { + type = String + text = "" + title = Name + visibleInGUI = Yes + persistent = Yes + default = matrix2 + } + Field matrix2 { + type = Matrix + text = "" + title = Value + visibleInGUI = Yes + persistent = Yes + default = "1 0 0 0 +0 1 0 0 +0 0 1 0 +0 0 0 1" + } + Field matlabOutput { + type = String + text = "Displays the output of executed Matlab script." + title = "Matlab Output" + visibleInGUI = Yes + persistent = Yes + default = "" + } + Field showSessionWindow { + type = Bool + text = "Show or hide the Matlab session window." + title = "Show Matlab session window" + visibleInGUI = Yes + persistent = Yes + default = TRUE + } + text = "" + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mva...@us...> - 2011-09-08 18:26:42
|
Revision: 378 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=378&view=rev Author: mvanstralen Date: 2011-09-08 18:26:32 +0000 (Thu, 08 Sep 2011) Log Message: ----------- Small bugfixes Modified Paths: -------------- trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.py trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.script trunk/Community/General/Modules/Macros/Elastix/Transformix.py trunk/Community/General/Modules/Macros/Elastix/Transformix.script Modified: trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.py =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.py 2011-09-08 18:24:20 UTC (rev 377) +++ trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.py 2011-09-08 18:26:32 UTC (rev 378) @@ -651,9 +651,9 @@ readArrayParameter(lines, ctx.field("SP_a")); readArrayParameter(lines, ctx.field("SP_capa"), "SP_A"); readArrayParameter(lines, ctx.field("SP_alpha")); - readFloatParameter(lines, ctx.field("SigmoidMin")); - readFloatParameter(ctx.field("SigmoidMax")); - readFloatParameter(ctx.field("SigmoidScale")); + readArrayParameter(lines, ctx.field("SigmoidMin")); + readArrayParameter(ctx.field("SigmoidMax")); + readArrayParameter(ctx.field("SigmoidScale")); readArrayParameter(lines, ctx.field("SigmoidInitialTime")); readBoolParameter(lines, ctx.field("UseAdaptiveStepSizes")); ctx.field("DefineMinimumStepLength").value = readArrayParameter(lines, ctx.field("MaximumStepLength")); @@ -758,9 +758,9 @@ text += arrayParameterToString(ctx.field("SP_a"), numRes); text += arrayParameterToString(ctx.field("SP_capa"), numRes, "SP_A"); text += arrayParameterToString(ctx.field("SP_alpha"), numRes); - text += parameterToString(ctx.field("SigmoidMin")); - text += parameterToString(ctx.field("SigmoidMax")); - text += parameterToString(ctx.field("SigmoidScale")); + text += arrayParameterToString(ctx.field("SigmoidMin"), numRes); + text += arrayParameterToString(ctx.field("SigmoidMax"), numRes); + text += arrayParameterToString(ctx.field("SigmoidScale"), numRes); text += arrayParameterToString(ctx.field("SigmoidInitialTime"), numRes); text += boolParameterToString(ctx.field("UseAdaptiveStepSizes")); if ctx.field("DefineMinimumStepLength").value: Modified: trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.script =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.script 2011-09-08 18:24:20 UTC (rev 377) +++ trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.script 2011-09-08 18:26:32 UTC (rev 378) @@ -152,9 +152,9 @@ Field UseAdaptiveStepSizes { type = Bool value = True} Field DefineMaximumStepLength {type = Bool value = False} Field MaximumStepLength {type = Double value = 1.0} - Field SigmoidMin {type = Double value = -0.8} - Field SigmoidMax {type = Double value = 1.0} - Field SigmoidScale {type = Double value = 0.00000001} + Field SigmoidMin {type = String value = "-0.8"} + Field SigmoidMax {type = String value = "1.0"} + Field SigmoidScale {type = String value = "0.00000001"} Field SigmoidInitialTime {type = String value = "0"} Field DefineNumberOfGradientMeasurements { type = Bool value = False} Field NumberOfGradientMeasurements { type = Int value = 10} Modified: trunk/Community/General/Modules/Macros/Elastix/Transformix.py =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/Transformix.py 2011-09-08 18:24:20 UTC (rev 377) +++ trunk/Community/General/Modules/Macros/Elastix/Transformix.py 2011-09-08 18:26:32 UTC (rev 378) @@ -91,4 +91,24 @@ MLABFileManager.remove( mhd ); MLABFileManager.remove( raw ); MLABFileManager.remove( zraw ); - \ No newline at end of file + +def inputChanged(): + if ctx.field("updateImageDimension").value: + if ctx.field("input0").isValid(): + if ctx.field("input0").sizeU() > 1: + ctx.field("imageDimension").value = 6; + elif ctx.field("input0").sizeT() > 1: + ctx.field("imageDimension").value = 6; + elif ctx.field("input0").sizeC() > 1: + ctx.field("imageDimension").value = 4; + elif ctx.field("input0").sizeZ() > 1: + ctx.field("imageDimension").value = 3; + else : + ctx.field("imageDimension").value = 2; + +def imageDimensionChanged(): + ctx.field("itkImageFileReader.fileDimension").value = ctx.field("imageDimension").value; + ctx.field("itkImageFileReader1.fileDimension").value = ctx.field("imageDimension").value; + ctx.field("itkImageFileReader2.fileDimension").value = ctx.field("imageDimension").value; + ctx.field("itkImageFileReader3.fileDimension").value = ctx.field("imageDimension").value; + \ No newline at end of file Modified: trunk/Community/General/Modules/Macros/Elastix/Transformix.script =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/Transformix.script 2011-09-08 18:24:20 UTC (rev 377) +++ trunk/Community/General/Modules/Macros/Elastix/Transformix.script 2011-09-08 18:26:32 UTC (rev 378) @@ -72,6 +72,8 @@ Field createJacobianMatrixField { type = Bool value = False } Field update { type = Trigger } Field deleteFiles { type = Trigger } + Field imageDimension { type = Enum values = "2, 3, 4, 6" } + Field updateImageDimension { type = Bool value = True } } } @@ -86,20 +88,27 @@ FieldListener deleteFiles { command = deleteFiles } + FieldListener input0 { + command = inputChanged + } } Window { Vertical { Box Transformix { Field tranformixExecutable { browseMode = open browseButton = On} - Separator {} - Field workingDirectory { browseMode = directory browseButton = On} - Field autoUpdateTransformationFile {} + Field workingDirectory { browseMode = directory browseButton = On} } Box Input { - Field transformationFile { browseButton = On browseMode = open browseFilter = "\*.txt"} + Field autoUpdateTransformationFile { title = "Auto update from working directory:"} + Field transformationFile { browseButton = On browseMode = open browseFilter = "\*.txt"} } Box Output { + Horizontal { + alignX = Left + Field imageDimension { } + Field updateImageDimension { title = "Auto update from input image:" } + } Field createImage { edit = False} Field createDeformationField {} Field createJacobianField {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mva...@us...> - 2011-09-08 18:24:26
|
Revision: 377 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=377&view=rev Author: mvanstralen Date: 2011-09-08 18:24:20 +0000 (Thu, 08 Sep 2011) Log Message: ----------- Added option to save resulting transformation file at different location Modified Paths: -------------- trunk/Community/General/Modules/Macros/Elastix/CallElastix.py trunk/Community/General/Modules/Macros/Elastix/CallElastix.script trunk/Community/General/Modules/Macros/Elastix/Elastix.script Modified: trunk/Community/General/Modules/Macros/Elastix/CallElastix.py =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/CallElastix.py 2011-09-08 18:21:30 UTC (rev 376) +++ trunk/Community/General/Modules/Macros/Elastix/CallElastix.py 2011-09-08 18:24:20 UTC (rev 377) @@ -232,7 +232,74 @@ print "Error: path contains spaces!"; if (len(ctx.field("outputDirectory").value) > 0 and ctx.field("outputDirectory").value[-1] != '/'): ctx.field("outputDirectory").value += '/'; + +def saveResultingTransformationFileAs(): + origFn = ctx.field("resultingTransformationFile").value; + if len(origFn)>0: + if MLABFileManager.exists(origFn): + newFn = MLABFileDialog.getSaveFileName("", "*.txt", "Save transformation file as..."); + saveTransformationFileAs(origFn, newFn); + else : + print "Error: file does not exist (anymore)."; + else : + print "Nothing to save!"; + +def saveTransformationFileAs(origFn, newFn): + # collect initial transform parameter files recursively + initFiles = []; + initFn = getInitialTransformParameters(origFn); + while len(initFn) >0: + initFiles += [initFn]; + initFn = getInitialTransformParameters(initFn); + parentFile = newFn; + # save transformation file + MLABFileManager.copy(origFn, newFn); + # save initial transformation files with numbering [0,...> in order of application + parentFn = newFn; + for i in range(len(initFiles)): + newExt = "." + str(len(initFiles)-i-1) + ".txt"; + newInitFn = newFn.replace(".txt", newExt); + MLABFileManager.copy(initFiles[i], newInitFn); + fileStringReplace(parentFn, initFiles[i], newInitFn); + parentFn = newInitFn; + # save transformation file, also with consistent numbering + newExt = "." + str(len(initFiles)) + ".txt"; + MLABFileManager.copy(newFn, newFn.replace(".txt", newExt)); + + +# look for initial transform parameters, like (InitialTransformParametersFileName "C:/Temp/reg3/TransformParameters.0.txt") +def getInitialTransformParameters(fn): + if MLABFileManager.exists(fn): + with open(fn) as f: + for l in f: + if l.find("InitialTransformParametersFileName") >=0: + #print l; + t = l.replace("(", ""); + t = t.replace(")", ""); + parts = t.split(); + #print "File = " + parts[1]; + tf = parts[1].replace("\"", ""); #remove quotes + if tf != "NoInitialTransform": + return tf; + else : + return ""; + return ""; + else : + print "Error: could not open transformation file " + fn; + return ""; +def fileStringReplace(fn, src, dst): + if MLABFileManager.exists(fn): + lines = []; + with open(fn, 'r') as f: + for l in f: + lines += [l.replace(src, dst)]; + with open(fn, 'w') as f: + for l in lines: + f.write(l); + else : + print "Error: could not open file for replacement, " + fn; + #//# MeVis signature v1 #//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBANEfsmYse2e1dRhkQ9AQbreCq9uxwzWLoGom13MNYmyfwoJqQOEXljLFAgw2eEjaT12G4CdqKWhRxh9ANP6n7GMCARE=:VI/mB8bT4u+mRtf/ru8yUQi8BzpaS3UeL2x62YxsUYnVqCWuLrVNLiukIIjnJMKQXlc8ezmgOIcVAV7pgvgKpQ== #//# owner: MeVis Modified: trunk/Community/General/Modules/Macros/Elastix/CallElastix.script =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/CallElastix.script 2011-09-08 18:21:30 UTC (rev 376) +++ trunk/Community/General/Modules/Macros/Elastix/CallElastix.script 2011-09-08 18:24:20 UTC (rev 377) @@ -72,6 +72,7 @@ Field succeeded { type = Bool value = False persistent = No} Field transformParameterFile { type = string } + Field saveResultingTransformationFile { type = Trigger } } } @@ -91,6 +92,7 @@ command = clearLog } FieldListener outputDirectory { command = checkTemporaryDirectory } + FieldListener saveResultingTransformationFile { command = saveResultingTransformationFileAs } } Window { @@ -107,7 +109,10 @@ Field parameterFile3 { browseButton = True browseMode = open browseFilter = "\*.txt" } //Horizontal { alignGroupX = parameterFile3 Label { title = "Number of threads:"} ButtonBar numberOfThreads { } } Field initialTransformationFile { browseButton = True browseFilter = "\*.txt" browseMode = open expandX = True} - Field resultingTransformationFile { edit = False expandX = True} + Horizontal { + Field resultingTransformationFile { edit = False expandX = True} + Button saveResultingTransformationFile { title = "Save as..."} + } Field numberOfThreads { expandX = 1} Field otherArguments { expandY = True } Field createDeformationImage { enabled = True } Modified: trunk/Community/General/Modules/Macros/Elastix/Elastix.script =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/Elastix.script 2011-09-08 18:21:30 UTC (rev 376) +++ trunk/Community/General/Modules/Macros/Elastix/Elastix.script 2011-09-08 18:24:20 UTC (rev 377) @@ -82,6 +82,7 @@ Field resultingTransformationFile {internalName = CallElastix.resultingTransformationFile persistent = No} Field outputImageDataType {internalName = itkImageFileReader1.fileDataType value = "float"} Field succeeded { internalName = CallElastix.succeeded persistent = No} + Field saveResultingTransformationFile { internalName = CallElastix.saveResultingTransformationFile } } } @@ -104,7 +105,10 @@ Field parameterFile2 { browseButton = True browseFilter = "\*.txt" browseMode = open expandX = True} Field parameterFile3 { browseButton = True browseFilter = "\*.txt" browseMode = open expandX = True} Field initialTransformationFile { browseButton = True browseFilter = "\*.txt" browseMode = open expandX = True} - Field resultingTransformationFile { edit = False expandX = True} + Horizontal { + Field resultingTransformationFile { edit = False expandX = True} + Button saveResultingTransformationFile { title = "Save as..." } + } Field numberOfThreads { expandX = 1} Field otherArguments { expandX = True} Field outputImageDataType { expandX = 1} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mva...@us...> - 2011-09-08 18:21:38
|
Revision: 376 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=376&view=rev Author: mvanstralen Date: 2011-09-08 18:21:30 +0000 (Thu, 08 Sep 2011) Log Message: ----------- Support for Visual Studio 2010 and XCode Modified Paths: -------------- trunk/Community/General/Modules/Macros/Build/BuildProjects.def trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab trunk/Community/General/Modules/Macros/Build/BuildProjects.py trunk/Community/General/Modules/Macros/Build/BuildProjects.script Modified: trunk/Community/General/Modules/Macros/Build/BuildProjects.def =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.def 2011-08-27 13:04:31 UTC (rev 375) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.def 2011-09-08 18:21:30 UTC (rev 376) @@ -1,49 +1,21 @@ -// -// Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. -// 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. -// -//---------------------------------------------------------------------------------- -//! BuildProjects module definition -/*! -// \file BuildProjects.def -// \author Marijn van Stralen -// \date 2010-09-20 -*/ -//---------------------------------------------------------------------------------- - -MacroModule BuildProjects { - genre = "Special" - group = ISI - author = "Marijn van Stralen" - status = "work-in-progress" - comment = "Builds all mevislab projects in a directory (windows only)" - keywords = "Visual studio, build, compile, batch" - seeAlso = "" - exampleNetwork = "$(LOCAL)/networks/BuildProjectsExample.mlab" - - externalDefinition = "$(LOCAL)/BuildProjects.script" - -} // MacroModule BuildProjects - +//---------------------------------------------------------------------------------- +//! BuildProjects module definition +/*! +// \file BuildProjects.def +// \author Marijn van Stralen +// \date 2010-09-20 +*/ +//---------------------------------------------------------------------------------- + +MacroModule BuildProjects { + genre = "Special" + author = "Marijn van Stralen" + status = "work-in-progress" + comment = "Builds all mevislab projects in a directory (windows only)" + keywords = "Visual studio, build, compile, batch" + seeAlso = "" + exampleNetwork = "$(LOCAL)/networks/BuildProjectsExample.mlab" + externalDefinition = "$(LOCAL)/BuildProjects.script" + +} // MacroModule BuildProjects + Modified: trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab 2011-08-27 13:04:31 UTC (rev 375) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab 2011-09-08 18:21:30 UTC (rev 376) @@ -2,21 +2,242 @@ network { watchlist = "" } +module StringUtils { + internal { + frame = "974 -171 104 56" + moduleGroupName = XCode + windows { + window _default { + geometry = "930 353 622 250" + sizeHint = "268 214" + wasOpen = yes + } + } + } + fields { + instanceName = StringUtils7 + operationType = Replace + string1 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro + string2 = .pro + string3 = _debug.xcodeproj + string4 = "" + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = FALSE + toggle4 = FALSE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module StringUtils { + internal { + frame = "974 -111 104 56" + moduleGroupName = XCode + windows { + window _default { + geometry = "158 894 927 324" + sizeHint = "409 324" + wasOpen = yes + } + } + } + fields { + instanceName = StringUtils6 + operationType = Concatenate + string1 = "-project " + string2 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse_debug.xcodeproj + string3 = " -alltargets" + string4 = "" + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = TRUE + toggle4 = FALSE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module CallApplication { + internal { + frame = "761 -143 176 64" + moduleGroupName = XCode + windows { + window _default { + geometry = "1038 722 888 431" + sizeHint = "284 431" + wasOpen = yes + } + } + } + fields { + instanceName = buildXCodeProjectDebug + executable = /Developer/usr/bin/xcodebuild + arguments = "-project /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse_debug.xcodeproj -alltargets" + workingDirectory = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ + outputToLogWindow = FALSE + logWindow = "" + callSucceeded = TRUE + macOSXMode = TRUE + } +} +module CallApplication { + internal { + frame = "769 -47 144 64" + moduleGroupName = XCode + windows { + window _default { + geometry = "1038 722 888 431" + sizeHint = "284 431" + wasOpen = yes + } + } + } + fields { + instanceName = buildXCodeProject + executable = /Developer/usr/bin/xcodebuild + arguments = "-project /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.xcodeproj -alltargets" + workingDirectory = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ + outputToLogWindow = FALSE + logWindow = "" + callSucceeded = TRUE + macOSXMode = TRUE + } +} +module StringUtils { + internal { + frame = "965 37 104 56" + moduleGroupName = XCode + windows { + window _default { + geometry = "474 588 622 250" + sizeHint = "268 214" + wasOpen = yes + } + } + } + fields { + instanceName = StringUtils5 + operationType = Replace + string1 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro + string2 = .pro + string3 = .xcodeproj + string4 = "" + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = FALSE + toggle4 = FALSE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module StringUtils { + internal { + frame = "966 -43 104 56" + moduleGroupName = XCode + windows { + window _default { + geometry = "161 703 409 324" + sizeHint = "409 324" + wasOpen = yes + } + } + } + fields { + instanceName = StringUtils4 + operationType = Concatenate + string1 = "-project " + string2 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.xcodeproj + string3 = " -alltargets" + string4 = "" + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = TRUE + toggle4 = FALSE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module CallApplication { + internal { + frame = "769 25 144 64" + moduleGroupName = XCode + windows { + window _default { + geometry = "73 653 315 431" + sizeHint = "284 431" + wasOpen = yes + } + } + } + fields { + instanceName = createXCodeProject + executable = /Applications/MeVisLab.app/Contents/Support/MeVisLabProjectGenerator.app/Contents/MacOS/MeVisLabProjectGenerator + arguments = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro + workingDirectory = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ + outputToLogWindow = FALSE + logWindow = "" + callSucceeded = TRUE + macOSXMode = TRUE + } +} module FileDirectory { internal { - frame = "493 377 104 64" + frame = "489 377 112 64" moduleGroupName = "" windows { window _default { - geometry = "296 463 501 558" - sizeHint = "501 566" + geometry = "1034 483 972 586" + sizeHint = "540 586" wasOpen = no } } } fields { instanceName = proFiles - rootPath = D:/Documents/Mevislab/Packages22/ISI/ThirdParty + rootPath = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML recursive = TRUE maxRecursionDepth = -1 fileType = Files @@ -27,21 +248,43 @@ exclude = "" excludeRegExp = FALSE ignoreCase = TRUE - fileList = "D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/ann_1.1.2/ANN.pro -D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/fann-2.1.0/fann.pro -D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/gpc/gpc.pro -D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/StealthLinkLibrary/StealthLinkLibrary.pro" + fileList = "/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIAAMPoseArrayToMatrix/ISIAAMPoseArrayToMatrix.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIAAMSampleANNLabelArray/ISIAAMSampleANNLabelArray.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIAAMSampleANNPointArray/ISIAAMSampleANNPointArray.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIBuildTextureLookupImage/ISIBuildTextureLookupImage.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIComputeCostsHierarchicalPCAStatisticalShapeModel/ISIComputeCostsHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIComputeCumCostsHierarchicalPCAStatisticalShapeModel/ISIComputeCumCostsHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISICreateAppearance/ISICreateAppearance.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIDecorateHierarchicalPCAStatisticalShapeModel/ISIDecorateHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIGraphCutShapeMatch/ISIGraphCutShapeMatch.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPCAStatisticalShapeModel/ISIHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPCAStatisticalShapeModelToPolyData/ISIHierarchicalPCAStatisticalShapeModelToPolyData.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPolyDataFilter/ISIHierarchicalPolyDataFilter.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageToVTKPolyData/ISIImageToVTKPolyData.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIMatrixMultiplicationOfImages/ISIMatrixMultiplicationOfImages.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIPCAStatisticalShapeModel/ISIPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIProcrustesAlignmentFilter/ISIProcrustesAlignmentFilter.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIProjectPointsOnVTKPolyData/ISIProjectPointsOnVTKPolyData.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIRegularizeHierarchicalPCAStatisticalShapeModel/ISIRegularizeHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISISample1DTextureAtSurfacePoints/ISISample1DTextureAtSurfacePoints.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISISampleTextureWithLookup/ISISampleTextureWithLookup.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISITransformHierarchicalPCAStatisticalShapeModel/ISITransformHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKArrayVTKPolyDataVV/ISIVTKArrayVTKPolyDataVV.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataAddWhiskers/ISIVTKPolyDataAddWhiskers.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataRemoveWhiskers/ISIVTKPolyDataRemoveWhiskers.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataToImage/ISIVTKPolyDataToImage.pro" dirMode = Absolute } } module StringUtils { internal { - frame = "333 165 88 56" - moduleGroupName = "" + frame = "273 21 96 56" + moduleGroupName = VisualStudio windows { window _default { - geometry = "190 690 983 331" - sizeHint = "370 331" + geometry = "190 690 834 324" + sizeHint = "409 324" wasOpen = no } } @@ -52,7 +295,7 @@ string1 = / string2 = Build string3 = " release " - string4 = "" + string4 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.vcproj string5 = "" string6 = "" stringPrefix = [ @@ -74,8 +317,8 @@ } module CallApplication { internal { - frame = "481 161 112 64" - moduleGroupName = "" + frame = "421 17 120 64" + moduleGroupName = VisualStudio windows { window _default { geometry = "255 275 1110 364" @@ -86,22 +329,22 @@ } fields { instanceName = buildRelease - executable = "C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe" - arguments = "/Build release " - workingDirectory = "" + executable = "" + arguments = "/Build release /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.vcproj" + workingDirectory = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ outputToLogWindow = FALSE logWindow = "" - callSucceeded = TRUE + callSucceeded = FALSE } } module StringUtils { internal { - frame = "329 317 96 56" - moduleGroupName = "" + frame = "349 157 104 56" + moduleGroupName = VisualStudio windows { window _default { - geometry = "299 280 1076 331" - sizeHint = "234 204" + geometry = "299 280 320 247" + sizeHint = "268 214" wasOpen = no } } @@ -109,7 +352,7 @@ fields { instanceName = StringUtils1 operationType = Replace - string1 = "" + string1 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro string2 = .pro string3 = .vcproj string4 = "" @@ -134,12 +377,12 @@ } module StringUtils { internal { - frame = "329 229 96 56" - moduleGroupName = "" + frame = "269 85 104 56" + moduleGroupName = VisualStudio windows { window _default { - geometry = "235 600 1076 331" - sizeHint = "234 204" + geometry = "235 600 268 214" + sizeHint = "268 214" wasOpen = no } } @@ -147,7 +390,7 @@ fields { instanceName = StringUtils2 operationType = Replace - string1 = "" + string1 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro string2 = .pro string3 = .bat string4 = "" @@ -172,30 +415,52 @@ } module FieldIterator { internal { - frame = "497 313 96 64" + frame = "495 316 104 64" moduleGroupName = "" windows { window _default { - geometry = "948 286 408 299" - sizeHint = "408 299" - wasOpen = no + geometry = "1301 187 995 311" + sizeHint = "418 311" + wasOpen = yes } } } fields { instanceName = projectIter fieldNames = "" - fieldValues = "D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/ann_1.1.2/ANN.pro -D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/fann-2.1.0/fann.pro -D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/gpc/gpc.pro -D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/StealthLinkLibrary/StealthLinkLibrary.pro" + fieldValues = "/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIAAMPoseArrayToMatrix/ISIAAMPoseArrayToMatrix.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIAAMSampleANNLabelArray/ISIAAMSampleANNLabelArray.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIAAMSampleANNPointArray/ISIAAMSampleANNPointArray.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIBuildTextureLookupImage/ISIBuildTextureLookupImage.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIComputeCostsHierarchicalPCAStatisticalShapeModel/ISIComputeCostsHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIComputeCumCostsHierarchicalPCAStatisticalShapeModel/ISIComputeCumCostsHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISICreateAppearance/ISICreateAppearance.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIDecorateHierarchicalPCAStatisticalShapeModel/ISIDecorateHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIGraphCutShapeMatch/ISIGraphCutShapeMatch.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPCAStatisticalShapeModel/ISIHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPCAStatisticalShapeModelToPolyData/ISIHierarchicalPCAStatisticalShapeModelToPolyData.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPolyDataFilter/ISIHierarchicalPolyDataFilter.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageToVTKPolyData/ISIImageToVTKPolyData.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIMatrixMultiplicationOfImages/ISIMatrixMultiplicationOfImages.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIPCAStatisticalShapeModel/ISIPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIProcrustesAlignmentFilter/ISIProcrustesAlignmentFilter.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIProjectPointsOnVTKPolyData/ISIProjectPointsOnVTKPolyData.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIRegularizeHierarchicalPCAStatisticalShapeModel/ISIRegularizeHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISISample1DTextureAtSurfacePoints/ISISample1DTextureAtSurfacePoints.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISISampleTextureWithLookup/ISISampleTextureWithLookup.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISITransformHierarchicalPCAStatisticalShapeModel/ISITransformHierarchicalPCAStatisticalShapeModel.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKArrayVTKPolyDataVV/ISIVTKArrayVTKPolyDataVV.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataAddWhiskers/ISIVTKPolyDataAddWhiskers.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataRemoveWhiskers/ISIVTKPolyDataRemoveWhiskers.pro +/Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataToImage/ISIVTKPolyDataToImage.pro" fieldSeparator = [,;] valueSeparator = "\\n" valueHeader = FALSE - numValues = 4 + numValues = 26 indexTranslation = 0 - curIndex = -1 - curValue = "" + curIndex = 12 + curValue = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro newValueEnable = FALSE verbose = FALSE delay = 1 @@ -206,36 +471,36 @@ } module FileInformation { internal { - frame = "665 317 112 56" + frame = "662 318 120 56" moduleGroupName = "" windows { window _default { - geometry = "601 237 655 306" - sizeHint = "236 306" + geometry = "422 230 534 402" + sizeHint = "309 402" wasOpen = no } } } fields { instanceName = FileInformation - path = "" - dirname = "" - filename = "" - basename = "" - extension = "" - type = "" - size = 0 - createDate = "" - exists = FALSE + path = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro + dirname = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ + filename = ISIImageMatrixInverse.pro + basename = ISIImageMatrixInverse + extension = .pro + type = File + size = 1417 + createDate = 2011-08-17T11:26:23 + exists = TRUE isDirectory = FALSE - isReadable = FALSE - isWritable = FALSE + isReadable = TRUE + isWritable = TRUE } } module CallApplication { internal { - frame = "481 97 112 64" - moduleGroupName = "" + frame = "421 -47 120 64" + moduleGroupName = VisualStudio windows { window _default { geometry = "200 217 1057 364" @@ -246,18 +511,18 @@ } fields { instanceName = buildDebug - executable = "C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe" - arguments = "/Build debug " - workingDirectory = "" + executable = "" + arguments = "/Rebuild debug /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.vcproj" + workingDirectory = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ outputToLogWindow = FALSE logWindow = "" - callSucceeded = TRUE + callSucceeded = FALSE } } module StringUtils { internal { - frame = "329 101 96 56" - moduleGroupName = "" + frame = "269 -43 104 56" + moduleGroupName = VisualStudio windows { window _default { geometry = "193 246 1075 331" @@ -270,9 +535,9 @@ instanceName = StringUtils3 operationType = Concatenate string1 = / - string2 = Build + string2 = Rebuild string3 = " debug " - string4 = "" + string4 = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.vcproj string5 = "*"*" string6 = "" stringPrefix = [ @@ -294,27 +559,36 @@ } module CallApplication { internal { - frame = "481 225 112 64" - moduleGroupName = "" + frame = "421 81 120 64" + moduleGroupName = VisualStudio windows { window _default { - geometry = "939 406 717 364" - sizeHint = "277 364" + geometry = "495 755 1047 404" + sizeHint = "284 404" wasOpen = no } } } fields { instanceName = callBAT - executable = "" + executable = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.bat arguments = "" - workingDirectory = "" + workingDirectory = /Users/admin/Documents/MeVisLab/Packages22/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ outputToLogWindow = FALSE logWindow = "" callSucceeded = FALSE } } connections { + StringUtils7.string1 = projectIter.curValue + StringUtils6.string2 = StringUtils7.result + buildXCodeProjectDebug.arguments = StringUtils6.result + buildXCodeProject.arguments = StringUtils4.result + buildXCodeProject.workingDirectory = FileInformation.dirname + StringUtils5.string1 = projectIter.curValue + StringUtils4.string2 = StringUtils5.result + createXCodeProject.arguments = projectIter.curValue + createXCodeProject.workingDirectory = FileInformation.dirname StringUtils.string4 = StringUtils1.result buildRelease.arguments = StringUtils.result buildRelease.workingDirectory = FileInformation.dirname @@ -328,4 +602,34 @@ callBAT.executable = StringUtils2.result callBAT.workingDirectory = FileInformation.dirname } -networkModel = "" +networkModel { + parentItems { + 0 { + MLABNetworkModelItem MLABNetworkModelItemGroup { + uniqueId = 34 + objectName = VisualStudio + parentUniqueId = 0 + frame = "244 -122 322 360" + color { + r = 45 + g = 226 + b = 226 + a = 40 + } + } + MLABNetworkModelItem MLABNetworkModelItemGroup { + uniqueId = 58 + objectName = XCode + parentUniqueId = 0 + frame = "736 -246 367 364" + color { + r = 45 + g = 226 + b = 226 + a = 40 + } + } + } + } +} + Modified: trunk/Community/General/Modules/Macros/Build/BuildProjects.py =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.py 2011-08-27 13:04:31 UTC (rev 375) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.py 2011-09-08 18:21:30 UTC (rev 376) @@ -31,6 +31,7 @@ import string; import codecs + def init(): ctx.field("directory").value = MLABPackageManager.packageByIdentifier("ISI/General").path().replace("/General", "") directoryChanged(); @@ -38,12 +39,124 @@ ctx.field("projectFiles").value = "Create"; ctx.field("debug").value = "Build"; ctx.field("release").value = "Build"; + ctx.field("projectFilesXCode").value = "Create"; + ctx.field("debugXCode").value = "Build"; + ctx.field("releaseXCode").value = "Build"; def directoryChanged(): ctx.field("proFiles.update").touch(); return; + +def runBatchXCode(): + buildResults = []; + noBatchFile = []; + noProjectFile = []; + ctx.field("progress").value = 0.0; + for i in range(0, ctx.field("projectIter.numValues").value, 1): + ctx.field("projectIter.curIndex").value = i; + projFile = ctx.field("projectIter.curValue").value; + basename = ctx.field("FileInformation.basename").value; + xcodeFile = ctx.field("StringUtils5.result").value; + if ctx.field("projectFilesXCode").value == "Recreate": + if MLABFileManager.exists(projFile): #project batch file + ctx.field("createXCodeProject.call").touch(); + else: + print "Error on project " + basename + ": Could not find pro file " + projFile; + #noBatchFile += [basename]; + elif ctx.field("projectFilesXCode").value == "Create": + if not MLABFileManager.exists(xcodeFile): + #print "proj file does not exist: call bat file" + if MLABFileManager.exists(projFile): #project batch file + ctx.field("createXCodeProject.call").touch(); + else: + print "Error on project " + basename + ": Could not find xcode file " + xcodeFile; + noProjectFile += [basename]; + elif MLABFileManager.getLastModifiedDate(ctx.field("projectIter.curValue").value) > MLABFileManager.getLastModifiedDate(xcodeFile): + #print "pro file is newer: call bat file" + ctx.field("createXCodeProject.call").touch(); + if MLABFileManager.exists(xcodeFile): #visual studio project file + if ctx.field("releaseXCode").value <> "Skip": + ctx.field("buildXCodeProject.call").touch(); + if ctx.field("releaseXCode").value <> "Clear": + ret = checkBuildSuccessfulXCode("Release"); + buildResults += [ret]; + if ctx.field("debugXCode").value <> "Skip": + ctx.field("buildXCodeProjectDebug.call").touch(); + if ctx.field("debugXCode").value <> "Clear": + ret = checkBuildSuccessfulXCode("Debug"); + buildResults += [ret]; + else: + print "Error on project " + basename + ": Could not find xcode file " + xcodeFile; + noProjectFile += [basename]; + ctx.field("progress").value = (i+1.0)/ctx.field("projectIter.numValues").value; + print "Build batch completed"; + #print buildResults; + debugWithErrors = []; + releaseWithErrors = []; + debugWithWarnings = []; + releaseWithWarnings = []; + for b in buildResults: + if len(b)>0: + if b[1] == 'Debug' and b[2] > 0: + debugWithErrors += [b[0]]; + elif b[1] == 'Release' and b[2] > 0: + releaseWithErrors += [b[0]]; + if b[1] == 'Debug' and b[3] > 0: + debugWithWarnings += [b[0]]; + elif b[1] == 'Release' and b[3] > 0: + releaseWithWarnings += [b[0]]; + if ctx.field("releaseXCode").value == "Build" or ctx.field("releaseXCode").value == "Rebuild": + print "-- VCProject files ---"; + print "The following projects had no visual studio project file (", len(noProjectFile), "):"; + if len(noProjectFile)==0: + print "<none>"; + else: + for p in noProjectFile: + print p; + print "------------------------\n"; + #if ctx.field("debug").value == "Build" or ctx.field("debug").value == "Rebuild": + print "------- Debug --------"; + print "The following projects had errors (", len(debugWithErrors), "):"; + if len(debugWithErrors)==0: + print "<none>"; + else: + for p in debugWithErrors: + print p; + print "The following projects had warnings (", len(debugWithWarnings), "):"; + if len(debugWithWarnings)==0: + print "<none>"; + else: + for p in debugWithWarnings: + print p; + print "------------------------\n"; + #if ctx.field("release").value == "Build" or ctx.field("release").value == "Rebuild": + ''' print "------- Release --------"; + print "The following projects had errors (", len(releaseWithErrors), "):"; + if len(releaseWithErrors)==0: + print "<none>"; + else: + for p in releaseWithErrors: + print p; + print "The following projects had warnings (", len(releaseWithWarnings), "):"; + if len(releaseWithWarnings)==0: + print "<none>"; + else: + for p in releaseWithWarnings: + print p; + print "------------------------\n"; ''' + return; + +def runBatch2005(): + runBatch(2005); -def runBatch(): +def runBatch2010(): + runBatch(2010); + +def runBatch(vsversion): + if (vsversion == 2005): + ctx.field("StringUtils1.string3").value = ".vcproj"; + elif (vsversion == 2010): + ctx.field("StringUtils1.string3").value = ".vcxproj"; ctx.field("buildDebug.executable").value = ctx.field("devenvExecutable").value; ctx.field("buildRelease.executable").value = ctx.field("devenvExecutable").value; buildResults = []; @@ -52,7 +165,11 @@ ctx.field("progress").value = 0.0; for i in range(0, ctx.field("projectIter.numValues").value, 1): ctx.field("projectIter.curIndex").value = i; - projFile = ctx.field("projectIter.curValue").value; projFile = projFile.replace('.pro', '.vcproj'); + projFile = ctx.field("projectIter.curValue").value; + if (vsversion == 2005): + projFile = projFile.replace('.pro', '.vcproj'); + elif (vsversion == 2010): + projFile = projFile.replace('.pro', '.vcxproj'); basename = ctx.field("FileInformation.basename").value; if ctx.field("projectFiles").value == "Recreate": if MLABFileManager.exists(ctx.field("StringUtils2.result").value): #project batch file @@ -67,6 +184,7 @@ ctx.field("callBAT.call").touch(); else: print "Error on project " + basename + ": Could not find batch file " + ctx.field("StringUtils2.result").value; + noBatchFile += [basename]; elif MLABFileManager.getLastModifiedDate(ctx.field("projectIter.curValue").value) > MLABFileManager.getLastModifiedDate(projFile): #print "pro file is newer: call bat file" ctx.field("callBAT.call").touch(); @@ -84,7 +202,10 @@ ret = checkBuildSuccessful("Release"); buildResults += [ret]; else: - print "Error on project " + basename + ": Could not find vcproj file " + projFile; + if (vsversion == 2005): + print "Error on project " + basename + ": Could not find vcproj file " + projFile; + elif (vsversion == 2010): + print "Error on project " + basename + ": Could not find vcxproj file " + projFile; noProjectFile += [basename]; ctx.field("progress").value = (i+1.0)/ctx.field("projectIter.numValues").value; #print buildResults; @@ -114,7 +235,7 @@ print "------------------------\n"; if ctx.field("debug").value == "Build" or ctx.field("debug").value == "Rebuild" or ctx.field("release").value == "Build" or ctx.field("release").value == "Rebuild": print "-- VCProject files ---"; - print "The following projects had no vcproj file (", len(noProjectFile), "):"; + print "The following projects had no visual studio project file (", len(noProjectFile), "):"; if len(noProjectFile)==0: print "<none>"; else: @@ -168,4 +289,19 @@ print int(words[2]), "errors, ", int(words[4]), " warnings"; ret = [basename, buildtype, int(words[2]), int(words[4])]; buildlog.close(); + return ret; + +def checkBuildSuccessfulXCode(buildtype): + path = ctx.field("FileInformation.dirname").value; + basename = ctx.field("FileInformation.basename").value; + #targetFn = path + "/build/" + buildtype + "/lib" + basename + ".dylib"; + targetFn = path + "/build/" + "Release/lib" + basename; + if (buildtype == "Debug"): + targetFn += "_debug.dylib"; + else: + targetFn += ".dylib"; + if (MLABFileManager.exists(targetFn)): + ret = [basename, buildtype, 0, 0]; + else : + ret = [basename, buildtype, 1, 1]; return ret; \ No newline at end of file Modified: trunk/Community/General/Modules/Macros/Build/BuildProjects.script =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.script 2011-08-27 13:04:31 UTC (rev 375) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.script 2011-09-08 18:21:30 UTC (rev 376) @@ -35,11 +35,17 @@ Field numberOfProjects { internalName = projectIter.numValues } Field projectList {internalName = projectIter.fieldValues } Field devenvExecutable { type = String } + Field xcodeGeneratorExecutable { internalName = createXCodeProject.executable } + Field xcodeBuildExecutable { internalName = buildXCodeProject.executable } Field run { type = Trigger } + Field runXCode { type = Trigger } Field projectFiles { type = Enum values = "Skip, Create, Recreate"} Field debug {type = Enum values = "Skip, Build, Rebuild, Clean"} Field release {type = Enum values = "Skip, Build, Rebuild, Clean"} + Field projectFilesXCode { type = Enum values = "Skip, Create"} + Field debugXCode {type = Enum values = "Skip, Build"} + Field releaseXCode {type = Enum values = "Skip, Build"} Field progress { type = float value = 0 } } @@ -59,9 +65,13 @@ FieldListener recursionDepth { command = directoryChanged } - FieldListener run { - command = runBatch + //FieldListener run { + // command = runBatch + //} + FieldListener runXCode { + command = runBatchXCode } + } Window { @@ -76,16 +86,40 @@ Field recursionDepth { step = 1 dependsOn = includeSubDirectories } } } - Box "Build settings" { - Horizontal { - Field projectFiles { } - Field debug { } - Field release { } + TabView { + TabViewItem "Visual Studio 2005" { + Horizontal { + Field projectFiles { } + Field debug { } + Field release { } + } + Field devenvExecutable { browseButton = Yes browseMode = open browseFilter = "\*.exe" } + Button run { expandX = Yes command = runBatch2005 } + ProgressBar progress {} } - Field devenvExecutable { browseButton = Yes browseMode = open browseFilter = "\*.exe" } - Button run { expandX = Yes } - ProgressBar progress {} + TabViewItem "Visual Studio 2010" { + Horizontal { + Field projectFiles { } + Field debug { } + Field release { } + } + Field devenvExecutable { browseButton = Yes browseMode = open browseFilter = "\*.exe" } + Button run { expandX = Yes command = runBatch2010 } + ProgressBar progress {} + } + TabViewItem "XCode" { + Horizontal { + Field projectFilesXCode { } + Field debugXCode { } + Field releaseXCode { } + } + Field xcodeGeneratorExecutable { browseButton = Yes browseMode = open } + Field xcodeBuildExecutable { browseButton = Yes browseMode = open } + Button runXCode { expandX = Yes title = "Run"} + ProgressBar progress {} + } } + Box "Projects" { expandY = Yes Field numberOfProjects { edit = No} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <coe...@us...> - 2011-08-27 13:04:37
|
Revision: 375 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=375&view=rev Author: coertmetz Date: 2011-08-27 13:04:31 +0000 (Sat, 27 Aug 2011) Log Message: ----------- CM: Corrected def file. Modified Paths: -------------- trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def Modified: trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def =================================================================== --- trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def 2011-08-27 13:00:40 UTC (rev 374) +++ trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def 2011-08-27 13:04:31 UTC (rev 375) @@ -180,7 +180,7 @@ seeAlso = "" documentation = "$(LOCAL)/WEMCMSelectPatches/WEMCMSelectPatches.html" exampleNetwork = "$(LOCAL)/WEMCMSelectPatches/WEMCMSelectPatchesExample.mlab" - deprecatedName = "WEMSelectPatch;WEMSelectPatches" + deprecatedName = "WEMSelectPatch" Commands { FieldListener isProcessing { command = "*js: if (ctx.field("isProcessing").boolValue()){ MLAB.setWaitCursor(); } else { MLAB.removeWaitCursor(); } *" } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <coe...@us...> - 2011-08-27 13:00:46
|
Revision: 374 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=374&view=rev Author: coertmetz Date: 2011-08-27 13:00:40 +0000 (Sat, 27 Aug 2011) Log Message: ----------- CM: Renamed WEMSelectPatches to WEMCMSelectPatches to prevent collision with MeVisLab 2.2 module. CM = Community Modules (and not Coert Metz ;). Modified Paths: -------------- trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModulesInit.cpp Modified: trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModulesInit.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModulesInit.cpp 2011-08-27 12:59:14 UTC (rev 373) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModulesInit.cpp 2011-08-27 13:00:40 UTC (rev 374) @@ -15,7 +15,7 @@ #include "WEMPlane/WEMPlane.h" #include "WEMCenterOfMass/WEMCenterOfMass.h" #include "WEMVolume/WEMVolume.h" -#include "WEMSelectPatches/WEMSelectPatches.h" +#include "WEMCMSelectPatches/WEMCMSelectPatches.h" #include "WEMNodesToFile/WEMNodesToFile.h" ML_START_NAMESPACE @@ -28,7 +28,7 @@ WEMPlane::initClass(); WEMVolume::initClass(); - WEMSelectPatches::initClass(); + WEMCMSelectPatches::initClass(); WEMNodesToFile::initClass(); WEMCenterOfMass::initClass(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <coe...@us...> - 2011-08-27 12:59:21
|
Revision: 373 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=373&view=rev Author: coertmetz Date: 2011-08-27 12:59:14 +0000 (Sat, 27 Aug 2011) Log Message: ----------- CM: Renamed WEMSelectPatches to WEMCMSelectPatches to prevent collision with MeVisLab 2.2 module. CM = Community Modules (and not Coert Metz ;). Modified Paths: -------------- trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModules.pro Added Paths: ----------- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.cpp trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.h Removed Paths: ------------- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.cpp trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.h trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMSelectPatches/ Modified: trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModules.pro =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModules.pro 2011-08-27 12:58:42 UTC (rev 372) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/MLWEMCommunityModules.pro 2011-08-27 12:59:14 UTC (rev 373) @@ -39,7 +39,7 @@ WEMVolume/WEMVolume.h \ WEMCenterOfMass/WEMCenterOfMass.h \ WEMNodesToFile/WEMNodesToFile.h \ - WEMSelectPatches/WEMSelectPatches.h + WEMCMSelectPatches/WEMCMSelectPatches.h SOURCES += \ MLWEMCommunityModulesInit.cpp \ @@ -47,7 +47,7 @@ WEMVolume/WEMVolume.cpp \ WEMCenterOfMass/WEMCenterOfMass.cpp \ WEMNodesToFile/WEMNodesToFile.cpp \ - WEMSelectPatches/WEMSelectPatches.cpp + WEMCMSelectPatches/WEMCMSelectPatches.cpp RELATEDFILES += \ ../../../Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def Copied: trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.cpp (from rev 368, trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatches.cpp) =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.cpp 2011-08-27 12:59:14 UTC (rev 373) @@ -0,0 +1,247 @@ +//---------------------------------------------------------------------------------- +//! The ML module class WEMCMSelectPatches. +/*! +// \file WEMCMSelectPatches.cpp +// \author Coert Metz +// \date 2009-02-10 +// +// Select a range of patches from a WEM +*/ +//---------------------------------------------------------------------------------- + +/* ================================================================================= + Copyright (c) 2010, Biomedical Imaging Group Rotterdam (BIGR), + Departments of Radiology and Medical Informatics, Erasmus MC. 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 BIGR 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 BIGR 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. + =================================================================================*/ + +// Local includes +#include "WEMCMSelectPatches.h" + +#include <algorithm> +#include <functional> +#include <fstream> + +ML_START_NAMESPACE + +//! Implements code for the runtime type system of the ML +ML_BASEOP_CLASS_SOURCE(WEMCMSelectPatches, WEMProcessor); + +//---------------------------------------------------------------------------------- +//! Constructor +//---------------------------------------------------------------------------------- +WEMCMSelectPatches::WEMCMSelectPatches (std::string type) + : WEMProcessor(type, false) +{ + ML_TRACE_IN("WEMCMSelectPatches::WEMCMSelectPatches()") + + FieldContainer *fields = getFieldContainer(); + ML_CHECK(fields); + + // Suppress calls of handleNotification on field changes. + handleNotificationOff(); + + // WEM Patch start and end index field + _patchStartIndexFld = fields->addInt("patchStartIndex"); + _patchStartIndexFld->setIntValue(0); + _patchEndIndexFld = fields->addInt("patchEndIndex"); + _patchEndIndexFld->setIntValue(0); + + // Bool field to enable to select only one patch based on start index value + _onePatchFld = fields->addBool("onePatch"); + _onePatchFld->setBoolValue(false); + + // Set auto apply fields + _autoClearFld->setBoolValue(true); + _autoApplyFld->setBoolValue(true); + _autoUpdateFld->setBoolValue(true); + + _notifyFld = fields->addNotify("notify"); + + // Reactivate calls of handleNotification on field changes. + handleNotificationOn(); +} + +//---------------------------------------------------------------------------------- +//! Destructor +//---------------------------------------------------------------------------------- +WEMCMSelectPatches::~WEMCMSelectPatches() +{ + ML_TRACE_IN("WEMCMSelectPatches::~WEMCMSelectPatches()") +} + + +//---------------------------------------------------------------------------------- +//! Handle field changes of the field \c field. +//---------------------------------------------------------------------------------- +void WEMCMSelectPatches::handleNotification (Field *field) +{ + ML_TRACE_IN("WEMCMSelectPatches::handleNotification()") + + if (field==_patchStartIndexFld || field==_patchEndIndexFld || field==_onePatchFld) { + if (_autoApplyFld->getBoolValue()) { + _process(); + } + } + + // call parent class and handle apply/autoApply and in/outputs + WEMProcessor::handleNotification(field); +} + +//---------------------------------------------------------------------------------- +//! Code below is performed after module and network initialization. +//---------------------------------------------------------------------------------- +void WEMCMSelectPatches::activateAttachments() +{ + ML_TRACE_IN("WEMCMSelectPatches::activateAttachments()") + + // call parent class + WEMProcessor::activateAttachments(); +} + + +//---------------------------------------------------------------------------------- +//! The process method is called by the parent class. +//---------------------------------------------------------------------------------- +void WEMCMSelectPatches::_process() +{ + ML_TRACE_IN("WEMCMSelectPatches::process()") + + // for time measurement and mouse cursor setting. + _startProcessing(); + + WEMProcessor::_process(); + + // Now call the own processing routine. + if (_inWEM!=NULL) { + selectPatch(); + } + + // stop time measurement and mouse cursor resetting. + _finishProcessing(); + + // notify registered observer modules. + _notifyObservers(); + + _notifyFld->notifyAttachments(); +} + +//---------------------------------------------------------------------------------- +//! The main processing routine. Implement your algorithm here. +//---------------------------------------------------------------------------------- +void WEMCMSelectPatches::selectPatch() +{ + ML_TRACE_IN("WEMCMSelectPatches::selectPatch()") + + // Get number of input WEM patches + const int numPatches = _inWEM->getNumWEMPatches(); + + // Get settings + int patchStartIndex = _patchStartIndexFld->getIntValue(); + int patchEndIndex = _patchEndIndexFld->getIntValue(); + if (_onePatchFld->getBoolValue()) { + // Select only one patch, so set end index to start index + patchEndIndex=patchStartIndex; + } + + if (numPatches>0) { + // Check index numbers + if (patchStartIndex>patchEndIndex) { + patchEndIndex=patchStartIndex; + _patchEndIndexFld->setIntValue(patchEndIndex); + } + + if ( _inWEM->getWEMPatchAt(0)->getPatchType() == WEM_PATCH_TRIANGLES ) + { + // Output selected WEM patches + for (int i=patchStartIndex; i<=patchEndIndex; ++i) { + int index = i; + // Circular behaviour + while (index<0) { + index = index + numPatches; + } + + // Get input patch + WEMTrianglePatch * inPatch = (WEMTrianglePatch*) _inWEM->getWEMPatchAt(index % numPatches); + + // Create new output patch + WEMTrianglePatch * outTrianglePatch = NULL; + ML_CHECK_NEW(outTrianglePatch, WEMTrianglePatch(*inPatch)); + + _finish(outTrianglePatch); + _addWEMPatch(outTrianglePatch); + } + } + else if ( _inWEM->getWEMPatchAt(0)->getPatchType() == WEM_PATCH_POLYGONS ) + { + // Output selected WEM patches + for (int i=patchStartIndex; i<=patchEndIndex; ++i) { + int index = i; + // Circular behaviour + while (index<0) { + index = index + numPatches; + } + + // Get input patch + WEMPolygonPatch * inPatch = (WEMPolygonPatch*) _inWEM->getWEMPatchAt(index % numPatches); + + // Create new output patch + WEMPolygonPatch * outTrianglePatch = NULL; + ML_CHECK_NEW(outTrianglePatch, WEMPolygonPatch(*inPatch)); + + _finish(outTrianglePatch); + _addWEMPatch(outTrianglePatch); + } + } + else if ( _inWEM->getWEMPatchAt(0)->getPatchType() == WEM_PATCH_QUADS ) + { + // Output selected WEM patches + for (int i=patchStartIndex; i<=patchEndIndex; ++i) { + int index = i; + // Circular behaviour + while (index<0) { + index = index + numPatches; + } + + // Get input patch + WEMQuadPatch * inPatch = (WEMQuadPatch*) _inWEM->getWEMPatchAt(index % numPatches); + + // Create new output patch + WEMQuadPatch * outTrianglePatch = NULL; + ML_CHECK_NEW(outTrianglePatch, WEMQuadPatch(*inPatch)); + + _finish(outTrianglePatch); + _addWEMPatch(outTrianglePatch); + } + } + else + { + std::cout << "Input WEMPatch type not supported!" << std::endl; + return; + } + } +} + +ML_END_NAMESPACE Copied: trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.h (from rev 368, trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatches.h) =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.h (rev 0) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.h 2011-08-27 12:59:14 UTC (rev 373) @@ -0,0 +1,106 @@ +//---------------------------------------------------------------------------------- +//! The ML module class WEMCMSelectPatches. +/*! +// \file WEMCMSelectPatches.h +// \author Coert Metz +// \date 2009-02-10 +// +// Select a range of patches from a WEM +*/ +//---------------------------------------------------------------------------------- + +/* ================================================================================= + Copyright (c) 2010, Biomedical Imaging Group Rotterdam (BIGR), + Departments of Radiology and Medical Informatics, Erasmus MC. 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 BIGR 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 BIGR 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. + =================================================================================*/ + +#ifndef __WEMCMSelectPatches_H +#define __WEMCMSelectPatches_H + + +// Local includes +#include "MLWEMCommunityModulesSystem.h" + +// ML includes +#include "mlOperatorIncludes.h" + +// WEM inspector include +#include <WEMBase/WEMModuleBase/WEMProcessor.h> + +ML_START_NAMESPACE + +//! Select a subset of patches from a WEM +class MLWEMCOMMUNITYMODULES_EXPORT WEMCMSelectPatches : public WEMProcessor +{ + //! Implements interface for the runtime type system of the ML. + ML_BASEOP_CLASS_HEADER(WEMCMSelectPatches) + +public: + + //! Constructor. + WEMCMSelectPatches (std::string type="WEMCMSelectPatches"); + +protected: + + //! Destructor. + virtual ~WEMCMSelectPatches(); + + //! Initialize module after loading. + virtual void activateAttachments(); + + //! Handle field changes of the field \c field. + virtual void handleNotification (Field *field); + + //! _process()-routine for correct processing. + virtual void _process(); + +private: + // ---------------------------------------------------------- + //@{ \name Module field declarations + // ---------------------------------------------------------- + + //! Start and end index of output patches + IntField *_patchStartIndexFld; + IntField *_patchEndIndexFld; + + //! Field to select only one patch based on the start index number + BoolField *_onePatchFld; + + //! Notify field + NotifyField *_notifyFld; + + //@} + + //! The main processing routine which selects the patches. + void selectPatch(); +}; + + +ML_END_NAMESPACE + +#endif // __mlWEMCMSelectPatches_H + + Deleted: trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatches.cpp 2011-07-26 10:51:32 UTC (rev 368) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.cpp 2011-08-27 12:59:14 UTC (rev 373) @@ -1,247 +0,0 @@ -//---------------------------------------------------------------------------------- -//! The ML module class WEMSelectPatches. -/*! -// \file WEMSelectPatches.cpp -// \author Coert Metz -// \date 2009-02-10 -// -// Select a range of patches from a WEM -*/ -//---------------------------------------------------------------------------------- - -/* ================================================================================= - Copyright (c) 2010, Biomedical Imaging Group Rotterdam (BIGR), - Departments of Radiology and Medical Informatics, Erasmus MC. 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 BIGR 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 BIGR 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. - =================================================================================*/ - -// Local includes -#include "WEMSelectPatches.h" - -#include <algorithm> -#include <functional> -#include <fstream> - -ML_START_NAMESPACE - -//! Implements code for the runtime type system of the ML -ML_BASEOP_CLASS_SOURCE(WEMSelectPatches, WEMProcessor); - -//---------------------------------------------------------------------------------- -//! Constructor -//---------------------------------------------------------------------------------- -WEMSelectPatches::WEMSelectPatches (std::string type) - : WEMProcessor(type, false) -{ - ML_TRACE_IN("WEMSelectPatches::WEMSelectPatches()") - - FieldContainer *fields = getFieldContainer(); - ML_CHECK(fields); - - // Suppress calls of handleNotification on field changes. - handleNotificationOff(); - - // WEM Patch start and end index field - _patchStartIndexFld = fields->addInt("patchStartIndex"); - _patchStartIndexFld->setIntValue(0); - _patchEndIndexFld = fields->addInt("patchEndIndex"); - _patchEndIndexFld->setIntValue(0); - - // Bool field to enable to select only one patch based on start index value - _onePatchFld = fields->addBool("onePatch"); - _onePatchFld->setBoolValue(false); - - // Set auto apply fields - _autoClearFld->setBoolValue(true); - _autoApplyFld->setBoolValue(true); - _autoUpdateFld->setBoolValue(true); - - _notifyFld = fields->addNotify("notify"); - - // Reactivate calls of handleNotification on field changes. - handleNotificationOn(); -} - -//---------------------------------------------------------------------------------- -//! Destructor -//---------------------------------------------------------------------------------- -WEMSelectPatches::~WEMSelectPatches() -{ - ML_TRACE_IN("WEMSelectPatches::~WEMSelectPatches()") -} - - -//---------------------------------------------------------------------------------- -//! Handle field changes of the field \c field. -//---------------------------------------------------------------------------------- -void WEMSelectPatches::handleNotification (Field *field) -{ - ML_TRACE_IN("WEMSelectPatches::handleNotification()") - - if (field==_patchStartIndexFld || field==_patchEndIndexFld || field==_onePatchFld) { - if (_autoApplyFld->getBoolValue()) { - _process(); - } - } - - // call parent class and handle apply/autoApply and in/outputs - WEMProcessor::handleNotification(field); -} - -//---------------------------------------------------------------------------------- -//! Code below is performed after module and network initialization. -//---------------------------------------------------------------------------------- -void WEMSelectPatches::activateAttachments() -{ - ML_TRACE_IN("WEMSelectPatches::activateAttachments()") - - // call parent class - WEMProcessor::activateAttachments(); -} - - -//---------------------------------------------------------------------------------- -//! The process method is called by the parent class. -//---------------------------------------------------------------------------------- -void WEMSelectPatches::_process() -{ - ML_TRACE_IN("WEMSelectPatches::process()") - - // for time measurement and mouse cursor setting. - _startProcessing(); - - WEMProcessor::_process(); - - // Now call the own processing routine. - if (_inWEM!=NULL) { - selectPatch(); - } - - // stop time measurement and mouse cursor resetting. - _finishProcessing(); - - // notify registered observer modules. - _notifyObservers(); - - _notifyFld->notifyAttachments(); -} - -//---------------------------------------------------------------------------------- -//! The main processing routine. Implement your algorithm here. -//---------------------------------------------------------------------------------- -void WEMSelectPatches::selectPatch() -{ - ML_TRACE_IN("WEMSelectPatches::selectPatch()") - - // Get number of input WEM patches - const int numPatches = _inWEM->getNumWEMPatches(); - - // Get settings - int patchStartIndex = _patchStartIndexFld->getIntValue(); - int patchEndIndex = _patchEndIndexFld->getIntValue(); - if (_onePatchFld->getBoolValue()) { - // Select only one patch, so set end index to start index - patchEndIndex=patchStartIndex; - } - - if (numPatches>0) { - // Check index numbers - if (patchStartIndex>patchEndIndex) { - patchEndIndex=patchStartIndex; - _patchEndIndexFld->setIntValue(patchEndIndex); - } - - if ( _inWEM->getWEMPatchAt(0)->getPatchType() == WEM_PATCH_TRIANGLES ) - { - // Output selected WEM patches - for (int i=patchStartIndex; i<=patchEndIndex; ++i) { - int index = i; - // Circular behaviour - while (index<0) { - index = index + numPatches; - } - - // Get input patch - WEMTrianglePatch * inPatch = (WEMTrianglePatch*) _inWEM->getWEMPatchAt(index % numPatches); - - // Create new output patch - WEMTrianglePatch * outTrianglePatch = NULL; - ML_CHECK_NEW(outTrianglePatch, WEMTrianglePatch(*inPatch)); - - _finish(outTrianglePatch); - _addWEMPatch(outTrianglePatch); - } - } - else if ( _inWEM->getWEMPatchAt(0)->getPatchType() == WEM_PATCH_POLYGONS ) - { - // Output selected WEM patches - for (int i=patchStartIndex; i<=patchEndIndex; ++i) { - int index = i; - // Circular behaviour - while (index<0) { - index = index + numPatches; - } - - // Get input patch - WEMPolygonPatch * inPatch = (WEMPolygonPatch*) _inWEM->getWEMPatchAt(index % numPatches); - - // Create new output patch - WEMPolygonPatch * outTrianglePatch = NULL; - ML_CHECK_NEW(outTrianglePatch, WEMPolygonPatch(*inPatch)); - - _finish(outTrianglePatch); - _addWEMPatch(outTrianglePatch); - } - } - else if ( _inWEM->getWEMPatchAt(0)->getPatchType() == WEM_PATCH_QUADS ) - { - // Output selected WEM patches - for (int i=patchStartIndex; i<=patchEndIndex; ++i) { - int index = i; - // Circular behaviour - while (index<0) { - index = index + numPatches; - } - - // Get input patch - WEMQuadPatch * inPatch = (WEMQuadPatch*) _inWEM->getWEMPatchAt(index % numPatches); - - // Create new output patch - WEMQuadPatch * outTrianglePatch = NULL; - ML_CHECK_NEW(outTrianglePatch, WEMQuadPatch(*inPatch)); - - _finish(outTrianglePatch); - _addWEMPatch(outTrianglePatch); - } - } - else - { - std::cout << "Input WEMPatch type not supported!" << std::endl; - return; - } - } -} - -ML_END_NAMESPACE Deleted: trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.h =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatches.h 2011-07-26 10:51:32 UTC (rev 368) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.h 2011-08-27 12:59:14 UTC (rev 373) @@ -1,106 +0,0 @@ -//---------------------------------------------------------------------------------- -//! The ML module class WEMSelectPatches. -/*! -// \file WEMSelectPatches.h -// \author Coert Metz -// \date 2009-02-10 -// -// Select a range of patches from a WEM -*/ -//---------------------------------------------------------------------------------- - -/* ================================================================================= - Copyright (c) 2010, Biomedical Imaging Group Rotterdam (BIGR), - Departments of Radiology and Medical Informatics, Erasmus MC. 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 BIGR 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 BIGR 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. - =================================================================================*/ - -#ifndef __WEMSelectPatches_H -#define __WEMSelectPatches_H - - -// Local includes -#include "MLWEMCommunityModulesSystem.h" - -// ML includes -#include "mlOperatorIncludes.h" - -// WEM inspector include -#include <WEMBase/WEMModuleBase/WEMProcessor.h> - -ML_START_NAMESPACE - -//! Select a subset of patches from a WEM -class MLWEMCOMMUNITYMODULES_EXPORT WEMSelectPatches : public WEMProcessor -{ - //! Implements interface for the runtime type system of the ML. - ML_BASEOP_CLASS_HEADER(WEMSelectPatches) - -public: - - //! Constructor. - WEMSelectPatches (std::string type="WEMSelectPatches"); - -protected: - - //! Destructor. - virtual ~WEMSelectPatches(); - - //! Initialize module after loading. - virtual void activateAttachments(); - - //! Handle field changes of the field \c field. - virtual void handleNotification (Field *field); - - //! _process()-routine for correct processing. - virtual void _process(); - -private: - // ---------------------------------------------------------- - //@{ \name Module field declarations - // ---------------------------------------------------------- - - //! Start and end index of output patches - IntField *_patchStartIndexFld; - IntField *_patchEndIndexFld; - - //! Field to select only one patch based on the start index number - BoolField *_onePatchFld; - - //! Notify field - NotifyField *_notifyFld; - - //@} - - //! The main processing routine which selects the patches. - void selectPatch(); -}; - - -ML_END_NAMESPACE - -#endif // __mlWEMSelectPatches_H - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <coe...@us...> - 2011-08-27 12:58:48
|
Revision: 372 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=372&view=rev Author: coertmetz Date: 2011-08-27 12:58:42 +0000 (Sat, 27 Aug 2011) Log Message: ----------- CM: Renamed WEMSelectPatches to WEMCMSelectPatches to prevent collision with MeVisLab 2.2 module. CM = Community Modules (and not Coert Metz ;). Modified Paths: -------------- trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def Modified: trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def =================================================================== --- trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def 2011-08-27 12:58:10 UTC (rev 371) +++ trunk/Community/General/Modules/ML/MLWEMCommunityModules/MLWEMCommunityModules.def 2011-08-27 12:58:42 UTC (rev 372) @@ -166,9 +166,9 @@ } // MLModule WEMCenterOfMass //---------------------------------------------------------------------------------- -// MLModule WEMSelectPatches +// MLModule WEMCMSelectPatches //---------------------------------------------------------------------------------- -MLModule WEMSelectPatches { +MLModule WEMCMSelectPatches { DLL = "MLWEMCommunityModules" genre = "BIGR-WEM" @@ -178,9 +178,9 @@ comment = "Computes the center of mass of a WEM object" keywords = "WEM,Center of Mass,Centroid" seeAlso = "" - documentation = "$(LOCAL)/WEMSelectPatches/WEMSelectPatches.html" - exampleNetwork = "$(LOCAL)/WEMSelectPatches/WEMSelectPatchesExample.mlab" - deprecatedName = "WEMSelectPatch" + documentation = "$(LOCAL)/WEMCMSelectPatches/WEMCMSelectPatches.html" + exampleNetwork = "$(LOCAL)/WEMCMSelectPatches/WEMCMSelectPatchesExample.mlab" + deprecatedName = "WEMSelectPatch;WEMSelectPatches" Commands { FieldListener isProcessing { command = "*js: if (ctx.field("isProcessing").boolValue()){ MLAB.setWaitCursor(); } else { MLAB.removeWaitCursor(); } *" } @@ -202,7 +202,7 @@ CheckBox onePatch {} } } -} // MLModule WEMSelectPatches +} // MLModule WEMCMSelectPatches //---------------------------------------------------------------------------------- // MLModule WEMNodesToFile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <coe...@us...> - 2011-08-27 12:58:17
|
Revision: 371 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=371&view=rev Author: coertmetz Date: 2011-08-27 12:58:10 +0000 (Sat, 27 Aug 2011) Log Message: ----------- CM: Renamed WEMSelectPatches to WEMCMSelectPatches to prevent collision with MeVisLab 2.2 module. CM = Community Modules (and not Coert Metz ;). Added Paths: ----------- trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/ trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.html trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatchesExample.mlab Removed Paths: ------------- trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.html trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatchesExample.mlab trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMSelectPatches/ Copied: trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.html (from rev 368, trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatches.html) =================================================================== --- trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.html (rev 0) +++ trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatches.html 2011-08-27 12:58:10 UTC (rev 371) @@ -0,0 +1,69 @@ +<!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>Module Help Page</title> +</head> +<body> + +<center> <a href="#InputFields">Input</a> <a href="#OutputFields">Output</a> <a href="#Parameters">Parameters</a> + +<hr WIDTH="100%"></center> +<h2>WEMSelectPatches</h2> + + + + + + + +<h3><a NAME="InputFields"></a>Input</h3> +<blockquote> <ul> + <li> + <b>inWEM</b> + Input WEM. + </li> + </ul> + +</blockquote> + +<h3><a NAME="OutputFields"></a>Output</h3> +<blockquote> <ul> + <li> + <b>outWEM</b> + Output WEM with only the selected patches. + </li> + </ul> + +</blockquote> + +<h3><a NAME="Parameters"></a>Parameters</h3> +<blockquote> <ul> + <li> + <b>patchStartIndex</b> + Index of start patch to select. + </li> + <li> + <b>patchEndIndex</b> + Index of end patch to select. + </li> + <li> + <b>onePatch</b> + When enabled, only one path (at the start index) is selected. + </li> + </ul> + +</blockquote> + + + + + + + + + +</body> +</html> Copied: trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatchesExample.mlab (from rev 368, trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatchesExample.mlab) =================================================================== --- trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatchesExample.mlab (rev 0) +++ trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMCMSelectPatchesExample.mlab 2011-08-27 12:58:10 UTC (rev 371) @@ -0,0 +1,468 @@ +// MDL v1 utf8 +network { + watchlist = "" +} +module SoDepthPeelRenderer { + internal { + frame = "661 -35 152 56" + moduleGroupName = "" + } + fields { + instanceName = SoDepthPeelRenderer + renderCaching = AUTO + boundingBoxCaching = AUTO + renderCulling = AUTO + pickCulling = AUTO + useFBO = TRUE + useDepthPeeling = TRUE + useStencilBuffer = FALSE + layers = 4 + simulatedAlpha = 1 + opaqueBackgroundPass = TRUE + sceneDepthCompare = FALSE + debugLayers = FALSE + changeLayerColor = FALSE + layer1Color = "1 1 1" + layer2Color = "1 1 1" + layer3Color = "1 1 1" + layer4Color = "1 1 1" + layer5Color = "1 1 1" + layer6Color = "1 1 1" + layer7Color = "1 1 1" + layer8Color = "1 1 1" + } +} +module SoExaminerViewer { + internal { + frame = "669 -131 136 56" + moduleGroupName = "" + windows { + window _viewer { + geometry = "802 187 400 400" + sizeHint = "400 400" + wasOpen = yes + wasActive = no + } + } + } + fields { + instanceName = SoExaminerViewer + renderCaching = AUTO + boundingBoxCaching = AUTO + renderCulling = AUTO + pickCulling = AUTO + border = FALSE + background = "0 0 0" + transparency = BLEND + antialiasing = FALSE + antialiasingNumPasses = 1 + grabKeyFocus = TRUE + snapshotFormat = SNAPSHOT_RGB + outputAviFile = "" + autoRedrawWhenRecording = TRUE + frameRate = 7 + frameRateAvi = 15 + status = ready + outputSnapshotFile = none + outputSnapshotFileWritten = none + autoIncreaseFile = TRUE + autoUpdateML = FALSE + showSnapshotWithShell = FALSE + snapCount = 0 + headlight = TRUE + decoration = TRUE + popupMenuEnabled = FALSE + viewing = TRUE + autoClipping = TRUE + externalCamera = FALSE + drawStyle = VIEW_AS_IS + interactiveDrawStyle = VIEW_LOW_COMPLEXITY + viewAllFlag = FALSE + initialCameraOrientation = CAMERA_KEEP_AS_IS + applyCameraOrientation = CAMERA_KEEP_AS_IS + cameraType = CAMERA_PERSPECTIVE + userSettingOrientation = "0 0 1 0" + automaticViewAll = FALSE + storeCurrentState = TRUE + saveCamera = TRUE + cursor = TRUE + isCameraStored = TRUE + perspective = TRUE + stereoViewing = FALSE + stereoOffset = 3 + height = 0.7853981853 + position = "1.448529362678528 -0.2509514689445496 1.818761587142944" + orientation = "0.3550490140914917 0.1323456764221191 0.9254322648048401 2.151066064834595" + nearDistance = 1.120393872 + farDistance = 3.559265137 + focalDistance = 2.338612318 + forceRedrawOnInteraction = FALSE + button1events = TO_VIEWER + button2events = TO_VIEWER + button3events = TO_VIEWER + keyEvents = TO_VIEWER + animationEnabled = FALSE + feedback = FALSE + feedbackSize = 32 + mouseInteraction = "" + rotationAxis = "0 1 0" + rotationAngle = 360 + rotationSteps = 80 + rotationCurrentStep = 0 + recordRotation = TRUE + } +} +module SoWEMRenderer { + internal { + frame = "673 45 128 56" + moduleGroupName = "" + windows { + window _default { + geometry = "257 295 318 416" + sizeHint = "318 416" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SoWEMRenderer + renderCaching = AUTO + boundingBoxCaching = AUTO + renderCulling = AUTO + pickCulling = AUTO + autoApply = TRUE + autoUpdate = TRUE + autoClear = TRUE + useHighlightSelected = FALSE + usePolygonOffset = TRUE + useShapeHints = TRUE + allowHits = TRUE + parameterOverwriteMode = OVERWRITE_MODE_ALL + overwriteColorMode = FALSE + overwriteFaceParameters = FALSE + overwriteEdgeParameters = FALSE + overwriteNodeParameters = FALSE + overwriteBoundingBoxParameters = FALSE + colorMode = WEM_COLOR_GENERAL + drawFaces = TRUE + faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" + useFaceAmbientColor = TRUE + faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" + useFaceSpecularColor = TRUE + faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" + drawEdges = FALSE + edgeColor = "0 0 0" + drawNodes = FALSE + nodeColor = "1 1 1" + drawBoundingBoxes = FALSE + boundingBoxColor = "1 1 1" + drawFaceNormals = FALSE + drawNodeNormals = FALSE + faceNormalColor = "1 1 1" + nodeNormalColor = "1 1 1" + faceNormalScaling = 1 + nodeNormalScaling = 1 + faceAlphaValue = 1 + faceShininessValue = 1 + lineWidth = 1 + pointSize = 1 + useEdgeColoringMode = FALSE + nodeRenderingMode = WEM_NODE_RENDERING_NORMAL + boundingBoxMode = WEM_BOUNDING_BOX_AXIS_ALIGNED + primitiveValueLists = LUT + selectedPrimitiveValueList = LUT + primitiveValueListValid = FALSE + selectedTab = 0 + } +} +module WEMSelectPatches { + internal { + frame = "665 133 144 56" + moduleGroupName = "" + windows { + window _default { + geometry = "612 683 179 95" + sizeHint = "179 95" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = WEMSelectPatches + isProcessing = FALSE + elapsedTime = 0 + id = 0 + autoApply = TRUE + autoUpdate = TRUE + autoClear = TRUE + removePreviousWEMs = TRUE + label = "" + description = "" + show = TRUE + editable = TRUE + colorMode = "General " + drawFaces = TRUE + useFaceAmbientColor = TRUE + faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" + useFaceDiffuseColor = TRUE + faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" + useFaceSpecularColor = TRUE + faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" + faceAlphaValue = 1 + faceShininessValue = 1 + drawFaceNormals = FALSE + faceNormalsColor = "1 1 1" + faceNormalsScale = 1 + drawEdges = FALSE + edgeColor = "0 0 0" + usePolygonOffset = FALSE + lineWidth = 1 + useEdgeColoringMode = FALSE + drawNodes = FALSE + nodeColor = "1 1 1" + drawNodeNormals = FALSE + nodeNormalsColor = "1 1 1" + nodeNormalsScale = 1 + pointSize = 1 + nodeRenderingMode = Normal + drawBoundingBoxes = FALSE + boundingBoxMode = "Axis Aligned" + boundingBoxColor = "1 1 1" + copyInputWEMs = FALSE + listenToFinishNotifications = TRUE + forwardRepaintNotifications = TRUE + forwardSelectionNotifications = TRUE + progress = 0 + useInputWEMToCreateOutputWEM = FALSE + triangulationMode = Strip + modifyAttributes = FALSE + patchStartIndex = 0 + patchEndIndex = 0 + onePatch = TRUE + } +} +module WEMMerge { + internal { + frame = "665 205 144 56" + moduleGroupName = "" + windows { + window _default { + geometry = "252 325 322 391" + sizeHint = "322 391" + wasOpen = no + wasActive = no + } + window _automatic { + geometry = "513 422 499 472" + sizeHint = "260 224" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = WEMMerge + isProcessing = FALSE + elapsedTime = 0.01499999966 + id = 0 + autoApply = TRUE + autoUpdate = TRUE + autoClear = TRUE + removePreviousWEMs = TRUE + label = "" + description = "" + show = TRUE + editable = TRUE + colorMode = "General " + drawFaces = TRUE + useFaceAmbientColor = TRUE + faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" + useFaceDiffuseColor = TRUE + faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" + useFaceSpecularColor = TRUE + faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" + faceAlphaValue = 1 + faceShininessValue = 1 + drawFaceNormals = FALSE + faceNormalsColor = "1 1 1" + faceNormalsScale = 1 + drawEdges = FALSE + edgeColor = "0 0 0" + usePolygonOffset = FALSE + lineWidth = 1 + useEdgeColoringMode = FALSE + drawNodes = FALSE + nodeColor = "1 1 1" + drawNodeNormals = FALSE + nodeNormalsColor = "1 1 1" + nodeNormalsScale = 1 + pointSize = 1 + nodeRenderingMode = Normal + drawBoundingBoxes = FALSE + boundingBoxMode = "Axis Aligned" + boundingBoxColor = "1 1 1" + copyInputWEMs = TRUE + listenToFinishNotifications = TRUE + forwardRepaintNotifications = TRUE + forwardSelectionNotifications = TRUE + triangulationMode = Strip + modifyAttributes = FALSE + selectedTab = 0 + outputTabSelected = TRUE + } +} +module WEMInitialize { + internal { + frame = "737 333 112 56" + moduleGroupName = "" + windows { + window _default { + geometry = "354 428 322 391" + sizeHint = "322 391" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = WEMInitialize1 + isProcessing = FALSE + elapsedTime = 0 + id = 0 + autoApply = TRUE + autoUpdate = TRUE + autoClear = FALSE + removePreviousWEMs = TRUE + label = "" + description = "" + show = TRUE + editable = TRUE + colorMode = "General " + drawFaces = TRUE + useFaceAmbientColor = TRUE + faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" + useFaceDiffuseColor = TRUE + faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" + useFaceSpecularColor = TRUE + faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" + faceAlphaValue = 1 + faceShininessValue = 1 + drawFaceNormals = FALSE + faceNormalsColor = "1 1 1" + faceNormalsScale = 1 + drawEdges = FALSE + edgeColor = "0 0 0" + usePolygonOffset = FALSE + lineWidth = 1 + useEdgeColoringMode = FALSE + drawNodes = FALSE + nodeColor = "1 1 1" + drawNodeNormals = FALSE + nodeNormalsColor = "1 1 1" + nodeNormalsScale = 1 + pointSize = 1 + nodeRenderingMode = Normal + drawBoundingBoxes = FALSE + boundingBoxMode = "Axis Aligned" + boundingBoxColor = "1 1 1" + initialPosition = "0 0 0" + initialDeformation = "1 1 1" + initModel = Cube + mirrorFaces = FALSE + generateEdges = TRUE + selectedTab = 0 + } +} +module WEMInitialize { + internal { + frame = "629 333 104 56" + moduleGroupName = "" + windows { + window _default { + geometry = "99 378 322 391" + sizeHint = "322 391" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = WEMInitialize + isProcessing = FALSE + elapsedTime = 0.01600000076 + id = 0 + autoApply = TRUE + autoUpdate = TRUE + autoClear = FALSE + removePreviousWEMs = TRUE + label = "" + description = "" + show = TRUE + editable = TRUE + colorMode = "General " + drawFaces = TRUE + useFaceAmbientColor = TRUE + faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" + useFaceDiffuseColor = TRUE + faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" + useFaceSpecularColor = TRUE + faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" + faceAlphaValue = 1 + faceShininessValue = 1 + drawFaceNormals = FALSE + faceNormalsColor = "1 1 1" + faceNormalsScale = 1 + drawEdges = FALSE + edgeColor = "0 0 0" + usePolygonOffset = FALSE + lineWidth = 1 + useEdgeColoringMode = FALSE + drawNodes = FALSE + nodeColor = "1 1 1" + drawNodeNormals = FALSE + nodeNormalsColor = "1 1 1" + nodeNormalsScale = 1 + pointSize = 1 + nodeRenderingMode = Normal + drawBoundingBoxes = FALSE + boundingBoxMode = "Axis Aligned" + boundingBoxColor = "1 1 1" + initialPosition = "0 0 0" + initialDeformation = "1 1 1" + initModel = Dodecahedron + mirrorFaces = FALSE + generateEdges = TRUE + selectedTab = 0 + } +} +connections { + SoDepthPeelRenderer.children = SoWEMRenderer.self + SoExaminerViewer.children = SoDepthPeelRenderer.self + SoWEMRenderer.inWEM = WEMSelectPatches.outWEM + WEMSelectPatches.inWEM = WEMMerge.outWEM + WEMMerge.inWEM = WEMInitialize.outWEM + WEMMerge.inWEM1 = WEMInitialize1.outWEM +} +networkModel { + parentItems { + 0 { + MLABNetworkModelItem MLABNoteItem { + uniqueId = 15 + objectName = "" + parentUniqueId = 0 + frame = "411 -132 200 200" + backgroundColor { + r = 252 + g = 242 + b = 2 + a = 255 + } + text = "In this example two WEMs are merged, which results in two patches. One of the patches is subsequently selected using the WEMSelectPatches module." + titleText = Comment + isCollapsed = False + } + } + } +} Deleted: trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.html =================================================================== --- trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatches.html 2011-07-26 10:51:32 UTC (rev 368) +++ trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatches.html 2011-08-27 12:58:10 UTC (rev 371) @@ -1,69 +0,0 @@ -<!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>Module Help Page</title> -</head> -<body> - -<center> <a href="#InputFields">Input</a> <a href="#OutputFields">Output</a> <a href="#Parameters">Parameters</a> - -<hr WIDTH="100%"></center> -<h2>WEMSelectPatches</h2> - - - - - - - -<h3><a NAME="InputFields"></a>Input</h3> -<blockquote> <ul> - <li> - <b>inWEM</b> - Input WEM. - </li> - </ul> - -</blockquote> - -<h3><a NAME="OutputFields"></a>Output</h3> -<blockquote> <ul> - <li> - <b>outWEM</b> - Output WEM with only the selected patches. - </li> - </ul> - -</blockquote> - -<h3><a NAME="Parameters"></a>Parameters</h3> -<blockquote> <ul> - <li> - <b>patchStartIndex</b> - Index of start patch to select. - </li> - <li> - <b>patchEndIndex</b> - Index of end patch to select. - </li> - <li> - <b>onePatch</b> - When enabled, only one path (at the start index) is selected. - </li> - </ul> - -</blockquote> - - - - - - - - - -</body> -</html> Deleted: trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatchesExample.mlab =================================================================== --- trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMSelectPatches/WEMSelectPatchesExample.mlab 2011-07-26 10:51:32 UTC (rev 368) +++ trunk/Community/General/Modules/ML/MLWEMCommunityModules/WEMCMSelectPatches/WEMSelectPatchesExample.mlab 2011-08-27 12:58:10 UTC (rev 371) @@ -1,468 +0,0 @@ -// MDL v1 utf8 -network { - watchlist = "" -} -module SoDepthPeelRenderer { - internal { - frame = "661 -35 152 56" - moduleGroupName = "" - } - fields { - instanceName = SoDepthPeelRenderer - renderCaching = AUTO - boundingBoxCaching = AUTO - renderCulling = AUTO - pickCulling = AUTO - useFBO = TRUE - useDepthPeeling = TRUE - useStencilBuffer = FALSE - layers = 4 - simulatedAlpha = 1 - opaqueBackgroundPass = TRUE - sceneDepthCompare = FALSE - debugLayers = FALSE - changeLayerColor = FALSE - layer1Color = "1 1 1" - layer2Color = "1 1 1" - layer3Color = "1 1 1" - layer4Color = "1 1 1" - layer5Color = "1 1 1" - layer6Color = "1 1 1" - layer7Color = "1 1 1" - layer8Color = "1 1 1" - } -} -module SoExaminerViewer { - internal { - frame = "669 -131 136 56" - moduleGroupName = "" - windows { - window _viewer { - geometry = "802 187 400 400" - sizeHint = "400 400" - wasOpen = yes - wasActive = no - } - } - } - fields { - instanceName = SoExaminerViewer - renderCaching = AUTO - boundingBoxCaching = AUTO - renderCulling = AUTO - pickCulling = AUTO - border = FALSE - background = "0 0 0" - transparency = BLEND - antialiasing = FALSE - antialiasingNumPasses = 1 - grabKeyFocus = TRUE - snapshotFormat = SNAPSHOT_RGB - outputAviFile = "" - autoRedrawWhenRecording = TRUE - frameRate = 7 - frameRateAvi = 15 - status = ready - outputSnapshotFile = none - outputSnapshotFileWritten = none - autoIncreaseFile = TRUE - autoUpdateML = FALSE - showSnapshotWithShell = FALSE - snapCount = 0 - headlight = TRUE - decoration = TRUE - popupMenuEnabled = FALSE - viewing = TRUE - autoClipping = TRUE - externalCamera = FALSE - drawStyle = VIEW_AS_IS - interactiveDrawStyle = VIEW_LOW_COMPLEXITY - viewAllFlag = FALSE - initialCameraOrientation = CAMERA_KEEP_AS_IS - applyCameraOrientation = CAMERA_KEEP_AS_IS - cameraType = CAMERA_PERSPECTIVE - userSettingOrientation = "0 0 1 0" - automaticViewAll = FALSE - storeCurrentState = TRUE - saveCamera = TRUE - cursor = TRUE - isCameraStored = TRUE - perspective = TRUE - stereoViewing = FALSE - stereoOffset = 3 - height = 0.7853981853 - position = "1.448529362678528 -0.2509514689445496 1.818761587142944" - orientation = "0.3550490140914917 0.1323456764221191 0.9254322648048401 2.151066064834595" - nearDistance = 1.120393872 - farDistance = 3.559265137 - focalDistance = 2.338612318 - forceRedrawOnInteraction = FALSE - button1events = TO_VIEWER - button2events = TO_VIEWER - button3events = TO_VIEWER - keyEvents = TO_VIEWER - animationEnabled = FALSE - feedback = FALSE - feedbackSize = 32 - mouseInteraction = "" - rotationAxis = "0 1 0" - rotationAngle = 360 - rotationSteps = 80 - rotationCurrentStep = 0 - recordRotation = TRUE - } -} -module SoWEMRenderer { - internal { - frame = "673 45 128 56" - moduleGroupName = "" - windows { - window _default { - geometry = "257 295 318 416" - sizeHint = "318 416" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = SoWEMRenderer - renderCaching = AUTO - boundingBoxCaching = AUTO - renderCulling = AUTO - pickCulling = AUTO - autoApply = TRUE - autoUpdate = TRUE - autoClear = TRUE - useHighlightSelected = FALSE - usePolygonOffset = TRUE - useShapeHints = TRUE - allowHits = TRUE - parameterOverwriteMode = OVERWRITE_MODE_ALL - overwriteColorMode = FALSE - overwriteFaceParameters = FALSE - overwriteEdgeParameters = FALSE - overwriteNodeParameters = FALSE - overwriteBoundingBoxParameters = FALSE - colorMode = WEM_COLOR_GENERAL - drawFaces = TRUE - faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" - useFaceAmbientColor = TRUE - faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" - useFaceSpecularColor = TRUE - faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" - drawEdges = FALSE - edgeColor = "0 0 0" - drawNodes = FALSE - nodeColor = "1 1 1" - drawBoundingBoxes = FALSE - boundingBoxColor = "1 1 1" - drawFaceNormals = FALSE - drawNodeNormals = FALSE - faceNormalColor = "1 1 1" - nodeNormalColor = "1 1 1" - faceNormalScaling = 1 - nodeNormalScaling = 1 - faceAlphaValue = 1 - faceShininessValue = 1 - lineWidth = 1 - pointSize = 1 - useEdgeColoringMode = FALSE - nodeRenderingMode = WEM_NODE_RENDERING_NORMAL - boundingBoxMode = WEM_BOUNDING_BOX_AXIS_ALIGNED - primitiveValueLists = LUT - selectedPrimitiveValueList = LUT - primitiveValueListValid = FALSE - selectedTab = 0 - } -} -module WEMSelectPatches { - internal { - frame = "665 133 144 56" - moduleGroupName = "" - windows { - window _default { - geometry = "612 683 179 95" - sizeHint = "179 95" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = WEMSelectPatches - isProcessing = FALSE - elapsedTime = 0 - id = 0 - autoApply = TRUE - autoUpdate = TRUE - autoClear = TRUE - removePreviousWEMs = TRUE - label = "" - description = "" - show = TRUE - editable = TRUE - colorMode = "General " - drawFaces = TRUE - useFaceAmbientColor = TRUE - faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" - useFaceDiffuseColor = TRUE - faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" - useFaceSpecularColor = TRUE - faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" - faceAlphaValue = 1 - faceShininessValue = 1 - drawFaceNormals = FALSE - faceNormalsColor = "1 1 1" - faceNormalsScale = 1 - drawEdges = FALSE - edgeColor = "0 0 0" - usePolygonOffset = FALSE - lineWidth = 1 - useEdgeColoringMode = FALSE - drawNodes = FALSE - nodeColor = "1 1 1" - drawNodeNormals = FALSE - nodeNormalsColor = "1 1 1" - nodeNormalsScale = 1 - pointSize = 1 - nodeRenderingMode = Normal - drawBoundingBoxes = FALSE - boundingBoxMode = "Axis Aligned" - boundingBoxColor = "1 1 1" - copyInputWEMs = FALSE - listenToFinishNotifications = TRUE - forwardRepaintNotifications = TRUE - forwardSelectionNotifications = TRUE - progress = 0 - useInputWEMToCreateOutputWEM = FALSE - triangulationMode = Strip - modifyAttributes = FALSE - patchStartIndex = 0 - patchEndIndex = 0 - onePatch = TRUE - } -} -module WEMMerge { - internal { - frame = "665 205 144 56" - moduleGroupName = "" - windows { - window _default { - geometry = "252 325 322 391" - sizeHint = "322 391" - wasOpen = no - wasActive = no - } - window _automatic { - geometry = "513 422 499 472" - sizeHint = "260 224" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = WEMMerge - isProcessing = FALSE - elapsedTime = 0.01499999966 - id = 0 - autoApply = TRUE - autoUpdate = TRUE - autoClear = TRUE - removePreviousWEMs = TRUE - label = "" - description = "" - show = TRUE - editable = TRUE - colorMode = "General " - drawFaces = TRUE - useFaceAmbientColor = TRUE - faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" - useFaceDiffuseColor = TRUE - faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" - useFaceSpecularColor = TRUE - faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" - faceAlphaValue = 1 - faceShininessValue = 1 - drawFaceNormals = FALSE - faceNormalsColor = "1 1 1" - faceNormalsScale = 1 - drawEdges = FALSE - edgeColor = "0 0 0" - usePolygonOffset = FALSE - lineWidth = 1 - useEdgeColoringMode = FALSE - drawNodes = FALSE - nodeColor = "1 1 1" - drawNodeNormals = FALSE - nodeNormalsColor = "1 1 1" - nodeNormalsScale = 1 - pointSize = 1 - nodeRenderingMode = Normal - drawBoundingBoxes = FALSE - boundingBoxMode = "Axis Aligned" - boundingBoxColor = "1 1 1" - copyInputWEMs = TRUE - listenToFinishNotifications = TRUE - forwardRepaintNotifications = TRUE - forwardSelectionNotifications = TRUE - triangulationMode = Strip - modifyAttributes = FALSE - selectedTab = 0 - outputTabSelected = TRUE - } -} -module WEMInitialize { - internal { - frame = "737 333 112 56" - moduleGroupName = "" - windows { - window _default { - geometry = "354 428 322 391" - sizeHint = "322 391" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = WEMInitialize1 - isProcessing = FALSE - elapsedTime = 0 - id = 0 - autoApply = TRUE - autoUpdate = TRUE - autoClear = FALSE - removePreviousWEMs = TRUE - label = "" - description = "" - show = TRUE - editable = TRUE - colorMode = "General " - drawFaces = TRUE - useFaceAmbientColor = TRUE - faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" - useFaceDiffuseColor = TRUE - faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" - useFaceSpecularColor = TRUE - faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" - faceAlphaValue = 1 - faceShininessValue = 1 - drawFaceNormals = FALSE - faceNormalsColor = "1 1 1" - faceNormalsScale = 1 - drawEdges = FALSE - edgeColor = "0 0 0" - usePolygonOffset = FALSE - lineWidth = 1 - useEdgeColoringMode = FALSE - drawNodes = FALSE - nodeColor = "1 1 1" - drawNodeNormals = FALSE - nodeNormalsColor = "1 1 1" - nodeNormalsScale = 1 - pointSize = 1 - nodeRenderingMode = Normal - drawBoundingBoxes = FALSE - boundingBoxMode = "Axis Aligned" - boundingBoxColor = "1 1 1" - initialPosition = "0 0 0" - initialDeformation = "1 1 1" - initModel = Cube - mirrorFaces = FALSE - generateEdges = TRUE - selectedTab = 0 - } -} -module WEMInitialize { - internal { - frame = "629 333 104 56" - moduleGroupName = "" - windows { - window _default { - geometry = "99 378 322 391" - sizeHint = "322 391" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = WEMInitialize - isProcessing = FALSE - elapsedTime = 0.01600000076 - id = 0 - autoApply = TRUE - autoUpdate = TRUE - autoClear = FALSE - removePreviousWEMs = TRUE - label = "" - description = "" - show = TRUE - editable = TRUE - colorMode = "General " - drawFaces = TRUE - useFaceAmbientColor = TRUE - faceAmbientColor = "0.2666670083999634 0.2666670083999634 0.2666670083999634" - useFaceDiffuseColor = TRUE - faceDiffuseColor = "0.792156994342804 0.792156994342804 0.792156994342804" - useFaceSpecularColor = TRUE - faceSpecularColor = "0.06666699796915054 0.06666699796915054 0.06666699796915054" - faceAlphaValue = 1 - faceShininessValue = 1 - drawFaceNormals = FALSE - faceNormalsColor = "1 1 1" - faceNormalsScale = 1 - drawEdges = FALSE - edgeColor = "0 0 0" - usePolygonOffset = FALSE - lineWidth = 1 - useEdgeColoringMode = FALSE - drawNodes = FALSE - nodeColor = "1 1 1" - drawNodeNormals = FALSE - nodeNormalsColor = "1 1 1" - nodeNormalsScale = 1 - pointSize = 1 - nodeRenderingMode = Normal - drawBoundingBoxes = FALSE - boundingBoxMode = "Axis Aligned" - boundingBoxColor = "1 1 1" - initialPosition = "0 0 0" - initialDeformation = "1 1 1" - initModel = Dodecahedron - mirrorFaces = FALSE - generateEdges = TRUE - selectedTab = 0 - } -} -connections { - SoDepthPeelRenderer.children = SoWEMRenderer.self - SoExaminerViewer.children = SoDepthPeelRenderer.self - SoWEMRenderer.inWEM = WEMSelectPatches.outWEM - WEMSelectPatches.inWEM = WEMMerge.outWEM - WEMMerge.inWEM = WEMInitialize.outWEM - WEMMerge.inWEM1 = WEMInitialize1.outWEM -} -networkModel { - parentItems { - 0 { - MLABNetworkModelItem MLABNoteItem { - uniqueId = 15 - objectName = "" - parentUniqueId = 0 - frame = "411 -132 200 200" - backgroundColor { - r = 252 - g = 242 - b = 2 - a = 255 - } - text = "In this example two WEMs are merged, which results in two patches. One of the patches is subsequently selected using the WEMSelectPatches module." - titleText = Comment - isCollapsed = False - } - } - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mva...@us...> - 2011-08-08 06:16:52
|
Revision: 370 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=370&view=rev Author: mvanstralen Date: 2011-08-08 06:16:47 +0000 (Mon, 08 Aug 2011) Log Message: ----------- Fixed erroneous success report in the purely theoretical case that Elastix would crash Modified Paths: -------------- trunk/Community/General/Modules/Macros/Elastix/CallElastix.py Modified: trunk/Community/General/Modules/Macros/Elastix/CallElastix.py =================================================================== --- trunk/Community/General/Modules/Macros/Elastix/CallElastix.py 2011-08-08 06:15:30 UTC (rev 369) +++ trunk/Community/General/Modules/Macros/Elastix/CallElastix.py 2011-08-08 06:16:47 UTC (rev 370) @@ -163,6 +163,7 @@ callTransformix(ctx.field("createDeformationImage").value, ctx.field("createJacobianImage").value, ctx.field("createJacobianMatrixImage").value); else : print "elastix failed"; + ctx.field("succeeded").value = False; else : ctx.field("succeeded").value = False; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mva...@us...> - 2011-08-08 06:15:37
|
Revision: 369 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=369&view=rev Author: mvanstralen Date: 2011-08-08 06:15:30 +0000 (Mon, 08 Aug 2011) Log Message: ----------- Bugfix for v2.2 Modified Paths: -------------- trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab Modified: trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab 2011-07-26 10:51:32 UTC (rev 368) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab 2011-08-08 06:15:30 UTC (rev 369) @@ -11,13 +11,12 @@ geometry = "296 463 501 558" sizeHint = "501 566" wasOpen = no - wasActive = no } } } fields { instanceName = proFiles - rootPath = D:/Documents/Mevislab/Packages/ISI/Cardiac + rootPath = D:/Documents/Mevislab/Packages22/ISI/ThirdParty recursive = TRUE maxRecursionDepth = -1 fileType = Files @@ -28,11 +27,12 @@ exclude = "" excludeRegExp = FALSE ignoreCase = TRUE - fileList = "D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISILeftVentricleRemoveMitralRing/ISILeftVentricleRemoveMitralRing.pro -D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro" + fileList = "D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/ann_1.1.2/ANN.pro +D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/fann-2.1.0/fann.pro +D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/gpc/gpc.pro +D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/StealthLinkLibrary/StealthLinkLibrary.pro" dirMode = Absolute } - internalFields = "" } module StringUtils { internal { @@ -43,7 +43,6 @@ geometry = "190 690 983 331" sizeHint = "370 331" wasOpen = no - wasActive = no } } } @@ -53,7 +52,7 @@ string1 = / string2 = Build string3 = " release " - string4 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj + string4 = "" string5 = "" string6 = "" stringPrefix = [ @@ -82,19 +81,18 @@ geometry = "255 275 1110 364" sizeHint = "277 364" wasOpen = no - wasActive = no } } } fields { instanceName = buildRelease executable = "C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe" - arguments = "/Rebuild debug D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj" - workingDirectory = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + arguments = "/Build release " + workingDirectory = "" outputToLogWindow = FALSE logWindow = "" + callSucceeded = TRUE } - internalFields = "" } module StringUtils { internal { @@ -105,14 +103,13 @@ geometry = "299 280 1076 331" sizeHint = "234 204" wasOpen = no - wasActive = no } } } fields { instanceName = StringUtils1 operationType = Replace - string1 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + string1 = "" string2 = .pro string3 = .vcproj string4 = "" @@ -144,14 +141,13 @@ geometry = "235 600 1076 331" sizeHint = "234 204" wasOpen = no - wasActive = no } } } fields { instanceName = StringUtils2 operationType = Replace - string1 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + string1 = "" string2 = .pro string3 = .bat string4 = "" @@ -180,25 +176,26 @@ moduleGroupName = "" windows { window _default { - geometry = "948 286 415 317" - sizeHint = "415 317" + geometry = "948 286 408 299" + sizeHint = "408 299" wasOpen = no - wasActive = no } } } fields { instanceName = projectIter fieldNames = "" - fieldValues = "D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISILeftVentricleRemoveMitralRing/ISILeftVentricleRemoveMitralRing.pro -D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro" + fieldValues = "D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/ann_1.1.2/ANN.pro +D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/fann-2.1.0/fann.pro +D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/gpc/gpc.pro +D:\\Documents\\Mevislab\\Packages22\\ISI\\ThirdParty/Sources/StealthLinkLibrary/StealthLinkLibrary.pro" fieldSeparator = [,;] - valueSeparator = "\\n\\r|\\r\\n|[\\n\\r\\\\]" + valueSeparator = "\\n" valueHeader = FALSE - numValues = 2 + numValues = 4 indexTranslation = 0 - curIndex = 1 - curValue = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + curIndex = -1 + curValue = "" newValueEnable = FALSE verbose = FALSE delay = 1 @@ -206,7 +203,6 @@ running = FALSE autoReset = FALSE } - internalFields = "" } module FileInformation { internal { @@ -217,26 +213,24 @@ geometry = "601 237 655 306" sizeHint = "236 306" wasOpen = no - wasActive = no } } } fields { instanceName = FileInformation - path = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro - dirname = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ - filename = ISIPointTrackingDP2DT.pro - basename = ISIPointTrackingDP2DT - extension = .pro - type = File - size = 1576 - createDate = 2010-09-24T15:54:11 - exists = TRUE + path = "" + dirname = "" + filename = "" + basename = "" + extension = "" + type = "" + size = 0 + createDate = "" + exists = FALSE isDirectory = FALSE - isReadable = TRUE - isWritable = TRUE + isReadable = FALSE + isWritable = FALSE } - internalFields = "" } module CallApplication { internal { @@ -247,19 +241,18 @@ geometry = "200 217 1057 364" sizeHint = "277 364" wasOpen = no - wasActive = no } } } fields { instanceName = buildDebug executable = "C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe" - arguments = "/Rebuild debug D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj" - workingDirectory = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + arguments = "/Build debug " + workingDirectory = "" outputToLogWindow = FALSE logWindow = "" + callSucceeded = TRUE } - internalFields = "" } module StringUtils { internal { @@ -270,7 +263,6 @@ geometry = "193 246 1075 331" sizeHint = "370 331" wasOpen = no - wasActive = no } } } @@ -278,9 +270,9 @@ instanceName = StringUtils3 operationType = Concatenate string1 = / - string2 = Rebuild + string2 = Build string3 = " debug " - string4 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj + string4 = "" string5 = "*"*" string6 = "" stringPrefix = [ @@ -309,19 +301,18 @@ geometry = "939 406 717 364" sizeHint = "277 364" wasOpen = no - wasActive = no } } } fields { instanceName = callBAT - executable = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.bat + executable = "" arguments = "" - workingDirectory = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + workingDirectory = "" outputToLogWindow = FALSE logWindow = "" + callSucceeded = FALSE } - internalFields = "" } connections { StringUtils.string4 = StringUtils1.result This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mva...@us...> - 2011-07-26 10:51:42
|
Revision: 368 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=368&view=rev Author: mvanstralen Date: 2011-07-26 10:51:32 +0000 (Tue, 26 Jul 2011) Log Message: ----------- * Added the following ISI modules * Added BuildProjects module * Added CallApplication module * Added CallElastix module * Added Elastix module * Added ElastixParameterFile module * Added Transformix module * Added SendEMail module Modified Paths: -------------- trunk/Community/General/Modules/Groups.def Added Paths: ----------- trunk/Community/General/Modules/Macros/Build/ trunk/Community/General/Modules/Macros/Build/BuildProjects.def trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab trunk/Community/General/Modules/Macros/Build/BuildProjects.py trunk/Community/General/Modules/Macros/Build/BuildProjects.script trunk/Community/General/Modules/Macros/Build/html/ trunk/Community/General/Modules/Macros/Build/html/BuildProjects.html trunk/Community/General/Modules/Macros/Build/html/BuildProjects.mlhelp trunk/Community/General/Modules/Macros/Build/networks/ trunk/Community/General/Modules/Macros/Build/networks/BuildProjectsExample.mlab trunk/Community/General/Modules/Macros/Command/CallApplication.def trunk/Community/General/Modules/Macros/Command/CallApplication.py trunk/Community/General/Modules/Macros/Command/CallApplication.script trunk/Community/General/Modules/Macros/Command/html/CallApplication.html trunk/Community/General/Modules/Macros/Command/html/CallApplication.mlhelp trunk/Community/General/Modules/Macros/Command/networks/CallApplicationExample.mlab trunk/Community/General/Modules/Macros/EMail/ trunk/Community/General/Modules/Macros/EMail/SendEMail.def trunk/Community/General/Modules/Macros/EMail/SendEMail.mlab trunk/Community/General/Modules/Macros/EMail/SendEMail.script trunk/Community/General/Modules/Macros/EMail/SendMail.py trunk/Community/General/Modules/Macros/EMail/networks/ trunk/Community/General/Modules/Macros/EMail/networks/SendEMailExample.mlab trunk/Community/General/Modules/Macros/Elastix/ trunk/Community/General/Modules/Macros/Elastix/CallElastix.def trunk/Community/General/Modules/Macros/Elastix/CallElastix.mlab trunk/Community/General/Modules/Macros/Elastix/CallElastix.mlhelp trunk/Community/General/Modules/Macros/Elastix/CallElastix.py trunk/Community/General/Modules/Macros/Elastix/CallElastix.script trunk/Community/General/Modules/Macros/Elastix/Elastix.def trunk/Community/General/Modules/Macros/Elastix/Elastix.mlab trunk/Community/General/Modules/Macros/Elastix/Elastix.mlhelp trunk/Community/General/Modules/Macros/Elastix/Elastix.py trunk/Community/General/Modules/Macros/Elastix/Elastix.script trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.def trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.py trunk/Community/General/Modules/Macros/Elastix/ElastixParameterFile.script trunk/Community/General/Modules/Macros/Elastix/Transformix.def trunk/Community/General/Modules/Macros/Elastix/Transformix.mlab trunk/Community/General/Modules/Macros/Elastix/Transformix.py trunk/Community/General/Modules/Macros/Elastix/Transformix.script trunk/Community/General/Modules/Macros/Elastix/html/ trunk/Community/General/Modules/Macros/Elastix/html/CallElastix.html trunk/Community/General/Modules/Macros/Elastix/html/Elastix.html trunk/Community/General/Modules/Macros/Elastix/html/ElastixParameterFile.html trunk/Community/General/Modules/Macros/Elastix/html/ElastixParameterFile.mlhelp trunk/Community/General/Modules/Macros/Elastix/html/Transformix.html trunk/Community/General/Modules/Macros/Elastix/html/Transformix.mlhelp trunk/Community/General/Modules/Macros/Elastix/networks/ trunk/Community/General/Modules/Macros/Elastix/networks/CallElastixExample.mlab trunk/Community/General/Modules/Macros/Elastix/networks/ElastixExample.mlab trunk/Community/General/Modules/Macros/Elastix/networks/ElastixParameterFileExample.mlab trunk/Community/General/Modules/Macros/Elastix/networks/ExampleParameters.txt trunk/Community/General/Modules/Macros/Elastix/networks/ParameterFile.txt trunk/Community/General/Modules/Macros/Elastix/networks/TransformixExample.mlab trunk/Community/General/Modules/Macros/Elastix/networks/parameters_Rigid.txt trunk/Community/General/Modules/Macros/Elastix/parameters_Template.txt Modified: trunk/Community/General/Modules/Groups.def =================================================================== --- trunk/Community/General/Modules/Groups.def 2011-06-30 10:30:53 UTC (rev 367) +++ trunk/Community/General/Modules/Groups.def 2011-07-26 10:51:32 UTC (rev 368) @@ -22,3 +22,11 @@ type = std shy = false } + +ModuleGroup ISI { + owner = "Image Sciences Institute, ISI, Imaging Division, University Medical Center, Utrecht, The Netherlands" + title = "ISI Modules" + comment = "Internally developed modules of ISI" + type = std + shy = false +} \ No newline at end of file Added: trunk/Community/General/Modules/Macros/Build/BuildProjects.def =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.def (rev 0) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.def 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,49 @@ +// +// Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. +// 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. +// +//---------------------------------------------------------------------------------- +//! BuildProjects module definition +/*! +// \file BuildProjects.def +// \author Marijn van Stralen +// \date 2010-09-20 +*/ +//---------------------------------------------------------------------------------- + +MacroModule BuildProjects { + genre = "Special" + group = ISI + author = "Marijn van Stralen" + status = "work-in-progress" + comment = "Builds all mevislab projects in a directory (windows only)" + keywords = "Visual studio, build, compile, batch" + seeAlso = "" + exampleNetwork = "$(LOCAL)/networks/BuildProjectsExample.mlab" + + externalDefinition = "$(LOCAL)/BuildProjects.script" + +} // MacroModule BuildProjects + Added: trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab (rev 0) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.mlab 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,340 @@ +// MDL v1 utf8 +network { + watchlist = "" +} +module FileDirectory { + internal { + frame = "493 377 104 64" + moduleGroupName = "" + windows { + window _default { + geometry = "296 463 501 558" + sizeHint = "501 566" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = proFiles + rootPath = D:/Documents/Mevislab/Packages/ISI/Cardiac + recursive = TRUE + maxRecursionDepth = -1 + fileType = Files + joinImagePairs = FALSE + include = "**.pro*" + includeRegExp = FALSE + predefined = void + exclude = "" + excludeRegExp = FALSE + ignoreCase = TRUE + fileList = "D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISILeftVentricleRemoveMitralRing/ISILeftVentricleRemoveMitralRing.pro +D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro" + dirMode = Absolute + } + internalFields = "" +} +module StringUtils { + internal { + frame = "333 165 88 56" + moduleGroupName = "" + windows { + window _default { + geometry = "190 690 983 331" + sizeHint = "370 331" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = StringUtils + operationType = Concatenate + string1 = / + string2 = Build + string3 = " release " + string4 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = TRUE + toggle4 = TRUE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module CallApplication { + internal { + frame = "481 161 112 64" + moduleGroupName = "" + windows { + window _default { + geometry = "255 275 1110 364" + sizeHint = "277 364" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = buildRelease + executable = "C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe" + arguments = "/Rebuild debug D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj" + workingDirectory = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + outputToLogWindow = FALSE + logWindow = "" + } + internalFields = "" +} +module StringUtils { + internal { + frame = "329 317 96 56" + moduleGroupName = "" + windows { + window _default { + geometry = "299 280 1076 331" + sizeHint = "234 204" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = StringUtils1 + operationType = Replace + string1 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + string2 = .pro + string3 = .vcproj + string4 = "" + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = FALSE + toggle4 = FALSE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module StringUtils { + internal { + frame = "329 229 96 56" + moduleGroupName = "" + windows { + window _default { + geometry = "235 600 1076 331" + sizeHint = "234 204" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = StringUtils2 + operationType = Replace + string1 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + string2 = .pro + string3 = .bat + string4 = "" + string5 = "" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = FALSE + toggle4 = FALSE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module FieldIterator { + internal { + frame = "497 313 96 64" + moduleGroupName = "" + windows { + window _default { + geometry = "948 286 415 317" + sizeHint = "415 317" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = projectIter + fieldNames = "" + fieldValues = "D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISILeftVentricleRemoveMitralRing/ISILeftVentricleRemoveMitralRing.pro +D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro" + fieldSeparator = [,;] + valueSeparator = "\\n\\r|\\r\\n|[\\n\\r\\\\]" + valueHeader = FALSE + numValues = 2 + indexTranslation = 0 + curIndex = 1 + curValue = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + newValueEnable = FALSE + verbose = FALSE + delay = 1 + loop = FALSE + running = FALSE + autoReset = FALSE + } + internalFields = "" +} +module FileInformation { + internal { + frame = "665 317 112 56" + moduleGroupName = "" + windows { + window _default { + geometry = "601 237 655 306" + sizeHint = "236 306" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = FileInformation + path = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro + dirname = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + filename = ISIPointTrackingDP2DT.pro + basename = ISIPointTrackingDP2DT + extension = .pro + type = File + size = 1576 + createDate = 2010-09-24T15:54:11 + exists = TRUE + isDirectory = FALSE + isReadable = TRUE + isWritable = TRUE + } + internalFields = "" +} +module CallApplication { + internal { + frame = "481 97 112 64" + moduleGroupName = "" + windows { + window _default { + geometry = "200 217 1057 364" + sizeHint = "277 364" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = buildDebug + executable = "C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe" + arguments = "/Rebuild debug D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj" + workingDirectory = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + outputToLogWindow = FALSE + logWindow = "" + } + internalFields = "" +} +module StringUtils { + internal { + frame = "329 101 96 56" + moduleGroupName = "" + windows { + window _default { + geometry = "193 246 1075 331" + sizeHint = "370 331" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = StringUtils3 + operationType = Concatenate + string1 = / + string2 = Rebuild + string3 = " debug " + string4 = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.vcproj + string5 = "*"*" + string6 = "" + stringPrefix = [ + stringPostfix = ] + toggle1 = TRUE + toggle2 = TRUE + toggle3 = TRUE + toggle4 = TRUE + toggle5 = FALSE + toggle6 = FALSE + togglePrefix = FALSE + togglePostfix = FALSE + separator = "" + selectSeparator = 0 + toggleIgnoreCase = FALSE + inPos1 = 0 + inPos2 = 0 + } +} +module CallApplication { + internal { + frame = "481 225 112 64" + moduleGroupName = "" + windows { + window _default { + geometry = "939 406 717 364" + sizeHint = "277 364" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = callBAT + executable = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.bat + arguments = "" + workingDirectory = D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ + outputToLogWindow = FALSE + logWindow = "" + } + internalFields = "" +} +connections { + StringUtils.string4 = StringUtils1.result + buildRelease.arguments = StringUtils.result + buildRelease.workingDirectory = FileInformation.dirname + StringUtils1.string1 = projectIter.curValue + StringUtils2.string1 = projectIter.curValue + projectIter.fieldValues = proFiles.fileList + FileInformation.path = projectIter.curValue + buildDebug.arguments = StringUtils3.result + buildDebug.workingDirectory = FileInformation.dirname + StringUtils3.string4 = StringUtils1.result + callBAT.executable = StringUtils2.result + callBAT.workingDirectory = FileInformation.dirname +} +networkModel = "" Added: trunk/Community/General/Modules/Macros/Build/BuildProjects.py =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.py (rev 0) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.py 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,171 @@ +#---------------------------------------------------------------------------------- +# +# Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. +# 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. +# +#---------------------------------------------------------------------------------- + +from mevis import * +import string; +import codecs + +def init(): + ctx.field("directory").value = MLABPackageManager.packageByIdentifier("ISI/General").path().replace("/General", "") + directoryChanged(); + ctx.field("devenvExecutable").value = MLABFileManager.cleanupPath(MLAB.getenv("VS" + MLAB.compilerInfo()[2:MLAB.compilerInfo().find("_")] + "0COMNTOOLS").replace("Tools\\", "IDE\\devenv.exe")) + ctx.field("projectFiles").value = "Create"; + ctx.field("debug").value = "Build"; + ctx.field("release").value = "Build"; + +def directoryChanged(): + ctx.field("proFiles.update").touch(); + return; + +def runBatch(): + ctx.field("buildDebug.executable").value = ctx.field("devenvExecutable").value; + ctx.field("buildRelease.executable").value = ctx.field("devenvExecutable").value; + buildResults = []; + noBatchFile = []; + noProjectFile = []; + ctx.field("progress").value = 0.0; + for i in range(0, ctx.field("projectIter.numValues").value, 1): + ctx.field("projectIter.curIndex").value = i; + projFile = ctx.field("projectIter.curValue").value; projFile = projFile.replace('.pro', '.vcproj'); + basename = ctx.field("FileInformation.basename").value; + if ctx.field("projectFiles").value == "Recreate": + if MLABFileManager.exists(ctx.field("StringUtils2.result").value): #project batch file + ctx.field("callBAT.call").touch(); + else: + print "Error on project " + basename + ": Could not find batch file " + ctx.field("StringUtils2.result").value; + noBatchFile += [basename]; + elif ctx.field("projectFiles").value == "Create": + if not MLABFileManager.exists(projFile): + #print "proj file does not exist: call bat file" + if MLABFileManager.exists(ctx.field("StringUtils2.result").value): #project batch file + ctx.field("callBAT.call").touch(); + else: + print "Error on project " + basename + ": Could not find batch file " + ctx.field("StringUtils2.result").value; + elif MLABFileManager.getLastModifiedDate(ctx.field("projectIter.curValue").value) > MLABFileManager.getLastModifiedDate(projFile): + #print "pro file is newer: call bat file" + ctx.field("callBAT.call").touch(); + if MLABFileManager.exists(projFile): #visual studio project file + if ctx.field("debug").value <> "Skip": + ctx.field("StringUtils3.string2").value = ctx.field("debug").value; + ctx.field("buildDebug.call").touch(); + if ctx.field("debug").value <> "Clear": + ret = checkBuildSuccessful("Debug"); + buildResults += [ret]; + if ctx.field("release").value <> "Skip": + ctx.field("StringUtils.string2").value = ctx.field("release").value; + ctx.field("buildRelease.call").touch(); + if ctx.field("release").value <> "Clear": + ret = checkBuildSuccessful("Release"); + buildResults += [ret]; + else: + print "Error on project " + basename + ": Could not find vcproj file " + projFile; + noProjectFile += [basename]; + ctx.field("progress").value = (i+1.0)/ctx.field("projectIter.numValues").value; + #print buildResults; + debugWithErrors = []; + releaseWithErrors = []; + debugWithWarnings = []; + releaseWithWarnings = []; + for b in buildResults: + if len(b)>0: + if b[1] == 'Debug' and b[2] > 0: + debugWithErrors += [b[0]]; + elif b[1] == 'Release' and b[2] > 0: + releaseWithErrors += [b[0]]; + if b[1] == 'Debug' and b[3] > 0: + debugWithWarnings += [b[0]]; + elif b[1] == 'Release' and b[3] > 0: + releaseWithWarnings += [b[0]]; + print "Build batch completed"; + if ctx.field("projectFiles").value == "Create" or ctx.field("projectFiles").value == "Recreate": + print "--- Project files ----"; + print "The following projects had no batch file (", len(noBatchFile), "):"; + if len(noBatchFile)==0: + print "<none>"; + else: + for p in noBatchFile: + print p; + print "------------------------\n"; + if ctx.field("debug").value == "Build" or ctx.field("debug").value == "Rebuild" or ctx.field("release").value == "Build" or ctx.field("release").value == "Rebuild": + print "-- VCProject files ---"; + print "The following projects had no vcproj file (", len(noProjectFile), "):"; + if len(noProjectFile)==0: + print "<none>"; + else: + for p in noProjectFile: + print p; + print "------------------------\n"; + if ctx.field("debug").value == "Build" or ctx.field("debug").value == "Rebuild": + print "------- Debug --------"; + print "The following projects had errors (", len(debugWithErrors), "):"; + if len(debugWithErrors)==0: + print "<none>"; + else: + for p in debugWithErrors: + print p; + print "The following projects had warnings (", len(debugWithWarnings), "):"; + if len(debugWithWarnings)==0: + print "<none>"; + else: + for p in debugWithWarnings: + print p; + print "------------------------\n"; + if ctx.field("release").value == "Build" or ctx.field("release").value == "Rebuild": + print "------- Release --------"; + print "The following projects had errors (", len(releaseWithErrors), "):"; + if len(releaseWithErrors)==0: + print "<none>"; + else: + for p in releaseWithErrors: + print p; + print "The following projects had warnings (", len(releaseWithWarnings), "):"; + if len(releaseWithWarnings)==0: + print "<none>"; + else: + for p in releaseWithWarnings: + print p; + print "------------------------\n"; + return; + +def checkBuildSuccessful(buildtype): + path = ctx.field("FileInformation.dirname").value; + basename = ctx.field("FileInformation.basename").value; + buildlogFN = path + "/tmp/" + buildtype + "/obj/buildlog.htm"; + try: buildlog = codecs.open(buildlogFN, 'r', 'utf-16'); + except: + print "Error on project " + basename + ": Could not open buildlog for " + buildtype + " build"; + return [basename, buildtype, -1, -1]; + ret = []; + for l in buildlog.readlines(): + words = l.split(); + if len(words) > 0 and str(words[0]) == str(basename): + print int(words[2]), "errors, ", int(words[4]), " warnings"; + ret = [basename, buildtype, int(words[2]), int(words[4])]; + buildlog.close(); + return ret; \ No newline at end of file Added: trunk/Community/General/Modules/Macros/Build/BuildProjects.script =================================================================== --- trunk/Community/General/Modules/Macros/Build/BuildProjects.script (rev 0) +++ trunk/Community/General/Modules/Macros/Build/BuildProjects.script 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,100 @@ +// +// Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. +// 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. +// + +Interface { + Inputs = "" + Outputs = "" + Parameters { + Field directory { internalName = proFiles.rootPath } + Field includeSubDirectories { internalName = proFiles.recursive } + Field recursionDepth { internalName = proFiles.maxRecursionDepth } + Field numberOfProjects { internalName = projectIter.numValues } + Field projectList {internalName = projectIter.fieldValues } + Field devenvExecutable { type = String } + Field run { type = Trigger } + + Field projectFiles { type = Enum values = "Skip, Create, Recreate"} + Field debug {type = Enum values = "Skip, Build, Rebuild, Clean"} + Field release {type = Enum values = "Skip, Build, Rebuild, Clean"} + + Field progress { type = float value = 0 } + } +} + +Commands { + source = $(LOCAL)/BuildProjects.py + + initCommand = init + + FieldListener directory { + command = directoryChanged + } + FieldListener includeSubDirectories { + command = directoryChanged + } + FieldListener recursionDepth { + command = directoryChanged + } + FieldListener run { + command = runBatch + } +} + +Window { + preferredWidth = 600 + preferredHeight = 400 + Vertical { + expandY = Yes + Box "Select project files" { + Field directory { browseButton = Yes browseMode = directory} + Horizontal { + Field includeSubDirectories {} + Field recursionDepth { step = 1 dependsOn = includeSubDirectories } + } + } + Box "Build settings" { + Horizontal { + Field projectFiles { } + Field debug { } + Field release { } + } + Field devenvExecutable { browseButton = Yes browseMode = open browseFilter = "\*.exe" } + Button run { expandX = Yes } + ProgressBar progress {} + } + Box "Projects" { + expandY = Yes + Field numberOfProjects { edit = No} + TextView projectList { + title = "" + edit = no + expandY = Yes + //enabled = False + } + } + } +} \ No newline at end of file Added: trunk/Community/General/Modules/Macros/Build/html/BuildProjects.html =================================================================== --- trunk/Community/General/Modules/Macros/Build/html/BuildProjects.html (rev 0) +++ trunk/Community/General/Modules/Macros/Build/html/BuildProjects.html 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,219 @@ +<!DOCTYPE html> +<html> +<body> +<center> +<a href="#Purpose">Purpose</a> +<a href="#Usage">Usage</a> +<a href="#Parameters">Parameters</a> +<a href="#Known Bugs">Known Bugs</a> + <hr width="100%"> +</center> +<h2>BuildProjects +</h2> +<h3><a name="Purpose"></a>Purpose</h3> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Automatically (re)create project files and compile and link projects for a complete set of MeVisLab packages. <br> +<b>Warning:</b> Only implemented for use on Windows with Visual Studio 2005. With some small changes, it can be used for other compilers in Windows as well. No support for Linux and Mac OS. <br> +</blockquote> +<h3><a name="Usage"></a>Usage</h3> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Select the root directory of the packages that you would like to build. Make sure that the compiler executable is set correctly and configure the way you would like to (re) build your projects. +<b>Warning:</b> It does not check project dependencies. </blockquote> +<h3><a name="Parameters"></a>Parameters</h3> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +The builds can be configured globally, for all projects.</blockquote> +<a name="directory"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Directory</b> + <br> +The root directory of the packages to build.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>D:/Documents/Mevislab/Packages/ISI</b>. +</blockquote> + +<a name="includeSubDirectories"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Include Sub Directories</b> + <br> +Toggle inclusion of subdirectories on/off.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>TRUE</b>. +</blockquote> + +<a name="recursionDepth"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Recursion Depth</b> + <br> +Set the depth of the subdirectory recursion, if applicable.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>-1</b>. +</blockquote> + +<a name="numberOfProjects"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Number Of Projects</b> + <br> +Shows the total number of projects that was found under the root directory.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>83</b>. +</blockquote> + +<a name="projectList"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>(No Title)</b> + <br> +Shows the list of projects to be build.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISILeftVentricleRemoveMitralRing/ISILeftVentricleRemoveMitralRing.pro +D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISILoadTomTecBeutel/ISILoadTomTecBeutel.pro +D:/Documents/Mevislab/Packages/ISI/Cardiac/Sources/ML/ISIPointTrackingDP2DT/ISIPointTrackingDP2DT.pro +D:/Documents/Mevislab/Packages/ISI/Classification/Sources/ML/ISIcvFaceDetection/ISIcvFaceDetection.pro +D:/Documents/Mevislab/Packages/ISI/Classification/Sources/ML/ISIkNN/ISIkNN.pro +D:/Documents/Mevislab/Packages/ISI/Examples/Sources/ML/ISIAddImages/ISIAddImages.pro +D:/Documents/Mevislab/Packages/ISI/Examples/Sources/ML/ISICreateBarcode/ISICreateBarcode.pro +D:/Documents/Mevislab/Packages/ISI/Examples/Sources/ML/ISIMultiThreadSimpleAverage/ISIMultiThreadSimpleAverage.pro +D:/Documents/Mevislab/Packages/ISI/Examples/Sources/ML/ISISubtractMeanExample/ISISubtractMeanExample.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIAreaUnderTheCurve/ISIAreaUnderTheCurve.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIBiasFieldCorrection/ISIBiasFieldCorrection.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIcvSaveAVI/ISIcvSaveAVI.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIDiceSimilarityIndex/ISIDiceSimilarityIndex.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIDynamicProgrammingPath/ISIDynamicProgrammingPath.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIEvaluateMetric/ISIEvaluateMetric.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIImageTo1DImage/ISIImageTo1DImage.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIISIParRecLoad/ISIISIParRecLoad.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIITKPhilipsRecParLoad/ISIITKPhilipsRecParLoad.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISILogValue/ISILogValue.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIMaxFlow/ISIMaxFlow.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIMergeQuadrants2D/ISIMergeQuadrants2D.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISINormalizeCurves/ISINormalizeCurves.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIOneDimensionalStatistics/ISIOneDimensionalStatistics.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIPIP/ISIPIP.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIRadiograph/ISIRadiograph.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIShiftImageForShiftedInterpolation/ISIShiftImageForShiftedInterpolation.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISISIFTnD/ISISIFTnD.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISITextureMatching1D/ISITextureMatching1D.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKArrayArithmetic/ISIVTKArrayArithmetic.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKArrayToMLArray/ISIVTKArrayToMLArray.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKIterativeClosestPointTransform/ISIVTKIterativeClosestPointTransform.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKLandmarkTransform/ISIVTKLandmarkTransform.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKPointSetReplacePoints/ISIVTKPointSetReplacePoints.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKPointSetToXMarkerList/ISIVTKPointSetToXMarkerList.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKPointToPointDistance/ISIVTKPointToPointDistance.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKPolyDataMean/ISIVTKPolyDataMean.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKPolyDataReplacePoints/ISIVTKPolyDataReplacePoints.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIVTKSimpleObjWriter/ISIVTKSimpleObjWriter.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIXMarkerListSave/ISIXMarkerListSave.pro +D:/Documents/Mevislab/Packages/ISI/General/Sources/ML/ISIXMarkerListToVtkPolyData/ISIXMarkerListToVtkPolyData.pro +D:/Documents/Mevislab/Packages/ISI/Hifu/Sources/ML/ISIFUSDriver/ISIFUSDriver.pro +D:/Documents/Mevislab/Packages/ISI/Hifu/Sources/ML/ISINeoptixClient/ISINeoptixClient.pro +D:/Documents/Mevislab/Packages/ISI/Hifu/Sources/ML/ISIPFRTemperatureMap/ISIPFRTemperatureMap.pro +D:/Documents/Mevislab/Packages/ISI/Hifu/Sources/ML/ISIRealTIClient/ISIRealTIClient.pro +D:/Documents/Mevislab/Packages/ISI/Neuro/Sources/ML/ISIFANNSegmentation/ISIFANNSegmentation.pro +D:/Documents/Mevislab/Packages/ISI/Neuro/Sources/ML/ISIStealthLinkWrapper/ISIStealthLinkWrapper.pro +D:/Documents/Mevislab/Packages/ISI/Neuro/Sources/ML/ISITemporalMeanSquaredDifferenceFilter/ISITemporalMeanSquaredDifferenceFilter.pro +D:/Documents/Mevislab/Packages/ISI/Neuro/Sources/ML/ISITIPSFilter/ISITIPSFilter.pro +D:/Documents/Mevislab/Packages/ISI/Registration/Sources/ML/ISIApplyDeformationField/ISIApplyDeformationField.pro +D:/Documents/Mevislab/Packages/ISI/Registration/Sources/ML/ISIApplyDeformationFieldToPolyData/ISIApplyDeformationFieldToPolyData.pro +D:/Documents/Mevislab/Packages/ISI/Registration/Sources/ML/ISIInvertDeformationField/ISIInvertDeformationField.pro +D:/Documents/Mevislab/Packages/ISI/Registration/Sources/ML/ISIVectorFieldToVTKPolyData/ISIVectorFieldToVTKPolyData.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIAAMPoseArrayToMatrix/ISIAAMPoseArrayToMatrix.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIAAMSampleANNLabelArray/ISIAAMSampleANNLabelArray.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIAAMSampleANNPointArray/ISIAAMSampleANNPointArray.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIBuildTextureLookupImage/ISIBuildTextureLookupImage.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIComputeCostsHierarchicalPCAStatisticalShapeModel/ISIComputeCostsHierarchicalPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIComputeCumCostsHierarchicalPCAStatisticalShapeModel/ISIComputeCumCostsHierarchicalPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISICreateAppearance/ISICreateAppearance.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISICreateDeformationFieldWithPolyDatas/ISICreateDeformationFieldWithPolyDatas.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIDecorateHierarchicalPCAStatisticalShapeModel/ISIDecorateHierarchicalPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIGraphCutShapeMatch/ISIGraphCutShapeMatch.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPCAStatisticalShapeModel/ISIHierarchicalPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPCAStatisticalShapeModelToPolyData/ISIHierarchicalPCAStatisticalShapeModelToPolyData.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIHierarchicalPolyDataFilter/ISIHierarchicalPolyDataFilter.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIImageMatrixInverse/ISIImageMatrixInverse.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIImageToVTKPolyData/ISIImageToVTKPolyData.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIMatrixMultiplicationOfImages/ISIMatrixMultiplicationOfImages.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIPCAStatisticalShapeModel/ISIPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIProcrustesAlignmentFilter/ISIProcrustesAlignmentFilter.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIProjectPointsOnVTKPolyData/ISIProjectPointsOnVTKPolyData.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIRegularizeHierarchicalPCAStatisticalShapeModel/ISIRegularizeHierarchicalPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISISample1DTextureAtSurfacePoints/ISISample1DTextureAtSurfacePoints.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISISampleTextureWithLookup/ISISampleTextureWithLookup.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISITransformHierarchicalPCAStatisticalShapeModel/ISITransformHierarchicalPCAStatisticalShapeModel.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIVTKArrayVTKPolyDataVV/ISIVTKArrayVTKPolyDataVV.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataAddWhiskers/ISIVTKPolyDataAddWhiskers.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataRemoveWhiskers/ISIVTKPolyDataRemoveWhiskers.pro +D:/Documents/Mevislab/Packages/ISI/StatisticalModeling/Sources/ML/ISIVTKPolyDataToImage/ISIVTKPolyDataToImage.pro +D:/Documents/Mevislab/Packages/ISI/ThirdParty/Sources/ann_1.1.2/ANN.pro +D:/Documents/Mevislab/Packages/ISI/ThirdParty/Sources/fann-2.1.0/fann.pro +D:/Documents/Mevislab/Packages/ISI/ThirdParty/Sources/gpc/gpc.pro +D:/Documents/Mevislab/Packages/ISI/ThirdParty/Sources/StealthLinkLibrary/StealthLinkLibrary.pro</b>. +</blockquote> + +<a name="devenvExecutable"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Devenv Executable</b> + <br> +The compiler executable. For VS2005 it is devenv.exe, for other compilers it might be a different name.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>C:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe</b>. +</blockquote> + +<a name="run"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Run</b> + <br> +Start building the projects.</blockquote> +<a name="projectFiles"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Project Files</b> + <br> +Choose the mode for project file generation:<br> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<b>Skip:</b> Do not create project files.<br> +<b>Create:</b> Create the project file(s) only if they do not extist yet.<br> +<b>Recreate:</b> Alsways (re)create the project file(s). +</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>Create</b>. +</blockquote> + +<a name="debug"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Debug</b> + <br> +Choose the mode for the debug version:<br> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<b>Skip:</b> Do not build the debug vesrion.<br> +<b>Build:</b> Build the debug version only if it is out-of-date or unexisting.<br> +<b>Rebuild:</b> Alsways (re)build the debug version.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>Build</b>. +</blockquote> + +<a name="release"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Release</b> + <br> +Choose the mode for the release version:<br> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<b>Skip:</b> Do not build the release vesrion.<br> +<b>Build:</b> Build the release version only if it is out-of-date or unexisting.<br> +<b>Rebuild:</b> Alsways (re)build the release version.</blockquote> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +Default is <b>Build</b>. +</blockquote> + +<a name="progress"></a><blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<br> + <b>Progress</b> + <br> +Shows the progress of the total build task.</blockquote> +<h3><a name="Known Bugs"></a>Known Bugs</h3> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +None</blockquote> +<br> +<br> +<br> +<br> +</body> +</html> Added: trunk/Community/General/Modules/Macros/Build/html/BuildProjects.mlhelp =================================================================== --- trunk/Community/General/Modules/Macros/Build/html/BuildProjects.mlhelp (rev 0) +++ trunk/Community/General/Modules/Macros/Build/html/BuildProjects.mlhelp 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,143 @@ +ML_DOC_VERSION = 1.0 +ML_DOC_MODULE_NAME = BuildProjects +ML_DOC_NUM_SECTIONS = 22 +ML_DOC_SECTION { + NAME = Purpose + TYPE = Text + DESC = "Automatically (re)create project files and compile and link projects for a complete set of MeVisLab packages. <br> +<b>Warning:</b> Only implemented for use on Windows with Visual Studio 2005. With some small changes, it can be used for other compilers in Windows as well. No support for Linux and Mac OS. <br> +" +} +ML_DOC_SECTION { + NAME = Usage + TYPE = Text + DESC = "Select the root directory of the packages that you would like to build. Make sure that the compiler executable is set correctly and configure the way you would like to (re) build your projects. +<b>Warning:</b> It does not check project dependencies. " +} +ML_DOC_SECTION { + NAME = Details + TYPE = Text + ON = FALSE +} +ML_DOC_SECTION { + NAME = Inputs + TYPE = Text + ON = FALSE +} +ML_DOC_SECTION { + NAME = Outputs + TYPE = Text + ON = FALSE +} +ML_DOC_SECTION { + NAME = Parameters + TYPE = Text + DESC = "The builds can be configured globally, for all projects." +} +ML_DOC_SECTION { + NAME = instanceName + TYPE = Parameter + ON = FALSE + SHOW_INFO_LINE = FALSE +} +ML_DOC_SECTION { + NAME = directory + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "The root directory of the packages to build." +} +ML_DOC_SECTION { + NAME = includeSubDirectories + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Toggle inclusion of subdirectories on/off." +} +ML_DOC_SECTION { + NAME = recursionDepth + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Set the depth of the subdirectory recursion, if applicable." +} +ML_DOC_SECTION { + NAME = numberOfProjects + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Shows the total number of projects that was found under the root directory." +} +ML_DOC_SECTION { + NAME = projectList + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Shows the list of projects to be build." +} +ML_DOC_SECTION { + NAME = devenvExecutable + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "The compiler executable. For VS2005 it is devenv.exe, for other compilers it might be a different name." +} +ML_DOC_SECTION { + NAME = run + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Start building the projects." +} +ML_DOC_SECTION { + NAME = projectFiles + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Choose the mode for project file generation:<br> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<b>Skip:</b> Do not create project files.<br> +<b>Create:</b> Create the project file(s) only if they do not extist yet.<br> +<b>Recreate:</b> Alsways (re)create the project file(s). +" +} +ML_DOC_SECTION { + NAME = debug + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Choose the mode for the debug version:<br> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<b>Skip:</b> Do not build the debug vesrion.<br> +<b>Build:</b> Build the debug version only if it is out-of-date or unexisting.<br> +<b>Rebuild:</b> Alsways (re)build the debug version." +} +ML_DOC_SECTION { + NAME = release + TYPE = Parameter + SHOW_INFO_LINE = FALSE + DESC = "Choose the mode for the release version:<br> +<blockquote style='margin-top:2.0pt;margin-bottom:2.0pt'> +<b>Skip:</b> Do not build the release vesrion.<br> +<b>Build:</b> Build the release version only if it is out-of-date or unexisting.<br> +<b>Rebuild:</b> Alsways (re)build the release version." +} +ML_DOC_SECTION { + NAME = progress + TYPE = Parameter + SHOW_INFO_LINE = FALSE + ADD_DEFAULT = FALSE + DESC = "Shows the progress of the total build task." +} +ML_DOC_SECTION { + NAME = "Events And Interaction" + TYPE = Text + ON = FALSE +} +ML_DOC_SECTION { + NAME = Example + TYPE = Text + ON = FALSE + DESC = "See example network" +} +ML_DOC_SECTION { + NAME = "Tips And Tricks" + TYPE = Text + ON = FALSE +} +ML_DOC_SECTION { + NAME = "Known Bugs" + TYPE = Text + DESC = None +} Added: trunk/Community/General/Modules/Macros/Build/networks/BuildProjectsExample.mlab =================================================================== --- trunk/Community/General/Modules/Macros/Build/networks/BuildProjectsExample.mlab (rev 0) +++ trunk/Community/General/Modules/Macros/Build/networks/BuildProjectsExample.mlab 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,7 @@ +module BuildProjects { + fields { + instanceName = BuildProjects + } + +} + Added: trunk/Community/General/Modules/Macros/Command/CallApplication.def =================================================================== --- trunk/Community/General/Modules/Macros/Command/CallApplication.def (rev 0) +++ trunk/Community/General/Modules/Macros/Command/CallApplication.def 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,50 @@ +//---------------------------------------------------------------------------------- +// +// Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. +// 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. +// +//---------------------------------------------------------------------------------- +//! CallApplication module definition +/*! +// \file CallApplication.def +// \author Marijn van Stralen +// \date 2009-10-19 +*/ +//---------------------------------------------------------------------------------- + +MacroModule CallApplication { + genre = "Special" + author = "Marijn van Stralen" + status = "work-in-progress" + comment = "Calls an application using a command line call" + keywords = "call, command line, executable" + seeAlso = "ISICallElastix" + exampleNetwork = "$(LOCAL)/networks/CallApplicationExample.mlab" + + externalDefinition = "$(LOCAL)/CallApplication.script" + scriptOnly = yes + +} // MacroModule CallApplication + Added: trunk/Community/General/Modules/Macros/Command/CallApplication.py =================================================================== --- trunk/Community/General/Modules/Macros/Command/CallApplication.py (rev 0) +++ trunk/Community/General/Modules/Macros/Command/CallApplication.py 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,106 @@ +#---------------------------------------------------------------------------------- +# +# Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. +# 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. +# +#---------------------------------------------------------------------------------- +#! Macro module CallApplication +#/*! +# \file CallApplication.py +# \author Marijn van Stralen +# \date 2009-10-19 +# +# Calls an application using a command line call +#*/ +#---------------------------------------------------------------------------------- + +from mevis import * + +import os.path +import os +import glob +import string + +def processOut(p): + m = p.readStdOut(); + ctx.field("logWindow").value += m; + return + +def processExit(p): + MLAB.log("The following process has finished: " + p.userInfo() ); + return; + +def clear(): + ctx.field("logWindow").value = ""; + return + +def call(): + success = False; + ctx.field("callSucceeded").value = success; + prog = ctx.field("executable").value; + args = str(ctx.field("arguments").value).split(" "); + workingdir = ctx.field("workingDirectory").value; + g_Process = MLAB.newProcess(); + #global g_Process; + MLAB.processEvents(False); + MLAB.log( prog + " is started with the following options:"); + MLAB.log(args); + if g_Process: + g_Process.kill(); + if g_Process: + MLAB.deleteProcess( g_Process ); + g_Process = MLAB.newProcess(); + g_Process.clearArguments(); + g_Process.addArgument(prog); + g_Process.addArguments(args); + g_Process.setWorkDir(workingdir); + if ctx.field("outputToLogWindow").value: + g_Process.setStdOutHandler(ctx,"processOut"); + g_Process.setStdErrHandler(ctx,"processOut"); + g_Process.setExitedHandler(ctx,"processExit"); + g_Process.setUserInfo( prog ); + g_Process.run(); + g_Process.waitForLaunch(); + if g_Process.isRunning(): + MLAB.log(prog + " is running"); + success = True; + else: + MLAB.log(prog + " failed to start"); + success = False; + MLAB.processEvents(True); + if g_Process: + g_Process.waitForExit(); + if g_Process: + MLAB.deleteProcess( g_Process ); + ctx.field("callSucceeded").value = success; + return ; + +#//# MeVis signature v1 +#//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBANEfsmYse2e1dRhkQ9AQbreCq9uxwzWLoGom13MNYmyfwoJqQOEXljLFAgw2eEjaT12G4CdqKWhRxh9ANP6n7GMCARE=:VI/mB8bT4u+mRtf/ru8yUQi8BzpaS3UeL2x62YxsUYnVqCWuLrVNLiukIIjnJMKQXlc8ezmgOIcVAV7pgvgKpQ== +#//# owner: MeVis +#//# date: 2009-06-10T03:33:37 +#//# hash: lks83XOD1rwLpts/0uROAT66Ocrko+7LhFbofqmeuxV1ZH30HY6fhGIHF+HZNbHAg04QggrC+0bSlk6r3GDj5Q== +#//# MeVis end + Added: trunk/Community/General/Modules/Macros/Command/CallApplication.script =================================================================== --- trunk/Community/General/Modules/Macros/Command/CallApplication.script (rev 0) +++ trunk/Community/General/Modules/Macros/Command/CallApplication.script 2011-07-26 10:51:32 UTC (rev 368) @@ -0,0 +1,89 @@ +//---------------------------------------------------------------------------------- +// +// Copyright (c) 2011, Image Sciences Institute, UMC Utrecht. +// 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 ISI 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 ISI 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. +// +//---------------------------------------------------------------------------------- +//! Macro module CallApplication +/*! +// \file CallApplication.script +// \author Marijn van Stralen +// \date 2009-10-19 +// +// Calls an application using a command line call +*/ +//---------------------------------------------------------------------------------- + + +Interface { + Inputs {} + Outputs {} + Parameters { + // The executable file to be called + Field executable { type = string value = "" } + // The program arguments + Field arguments { type = string value = "" } + // The working diectory for the application + Field workingDirectory { type = string value = "" } + + Field outputToLogWindow { type = bool value = True } + Field call { type = trigger } + Field logWindow { type = string value = ""} + Field clear {type = trigger} + Field callSucceeded {type = Bool value = False} + } +} + + +Commands { + source = $(LOCAL)/CallApplication.py + FieldListener call { + command = call + } + FieldListener clear { + command = clear + } +} + +Window { + Vertical { + expandY = 1 + Field executable { browseButton = True browseMode = open browseFilter = "\*.exe" } + Field arguments {} + Field workingDirectory { browseButton = True browseMode = directory } + Field outputToLogWindow {} + Field callSucceeded { edit = False} + Horizontal { Field call {} Field clear{} } + TextView logWindow { console = True edit = False expandY = 1 } + } +} + +//# MeVis signature v1 +//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBANEfsmYse2e1dRhkQ9AQbreCq9uxwzWLoGom13MNYmyfwoJqQOEXljLFAgw... [truncated message content] |
From: <rha...@us...> - 2011-06-30 10:30:59
|
Revision: 367 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=367&view=rev Author: rhameeteman Date: 2011-06-30 10:30:53 +0000 (Thu, 30 Jun 2011) Log Message: ----------- KH. * Added max KeyFrames to interface parameters Modified Paths: -------------- trunk/Community/General/Modules/Macros/Viewers/View2DMPRPath.script Modified: trunk/Community/General/Modules/Macros/Viewers/View2DMPRPath.script =================================================================== --- trunk/Community/General/Modules/Macros/Viewers/View2DMPRPath.script 2011-06-30 10:29:14 UTC (rev 366) +++ trunk/Community/General/Modules/Macros/Viewers/View2DMPRPath.script 2011-06-30 10:30:53 UTC (rev 367) @@ -71,6 +71,7 @@ Field showOutputs { type = bool value = False } Field timePoint { internalName = SoView2D.timePoint } Field currentFrame { internalName = MPRPath.currentKeyFrame } + Field maxFrames { internalName = MPRPath.maxKeyFrame } Field currentPlane { internalName = MPRPath.plane } Field rotation { internalName = MPRPath.rotation } Field translation { internalName = MPRPath.translation } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-30 10:29:21
|
Revision: 366 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=366&view=rev Author: rhameeteman Date: 2011-06-30 10:29:14 +0000 (Thu, 30 Jun 2011) Log Message: ----------- KH. * updated the path of images to the MeVisLab 2.2 paths Modified Paths: -------------- trunk/Community/General/Modules/Macros/Fields/FieldTrigger.script Modified: trunk/Community/General/Modules/Macros/Fields/FieldTrigger.script =================================================================== --- trunk/Community/General/Modules/Macros/Fields/FieldTrigger.script 2011-06-21 08:01:14 UTC (rev 365) +++ trunk/Community/General/Modules/Macros/Fields/FieldTrigger.script 2011-06-30 10:29:14 UTC (rev 366) @@ -112,18 +112,18 @@ expandX = no Button { tooltip = "Update the module list" - image = $(MLAB_MeVisLab_Standard)/Modules/IDE/images/refresh.png + image = $(MLAB_MeVisLab_IDE)/Modules/IDE/images/refresh.png command = BuildModuleTreeView } Button { tooltip = "Add field to trigger list" - image="$(MLAB_MeVisLab_Standard)/Modules/IDE/images/connectRightOff.png" + image="$(MLAB_MeVisLab_IDE)/Modules/IDE/images/connectRightOff.png" command = AddFields } Button { tooltip = "Remove field from trigger list" command = DeleteFields - image="$(MLAB_MeVisLab_Standard)/Modules/IDE/images/connectLeftOn.png" + image="$(MLAB_MeVisLab_IDE)/Modules/IDE/images/connectLeftOn.png" style { colors { buttonText = red } titleFont { weight = Bold } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-21 08:01:24
|
Revision: 365 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=365&view=rev Author: rhameeteman Date: 2011-06-21 08:01:14 +0000 (Tue, 21 Jun 2011) Log Message: ----------- KH. * Removed accidentally committed files Removed Paths: ------------- trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.def Deleted: trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.def =================================================================== --- trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.def 2011-06-21 07:42:36 UTC (rev 364) +++ trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.def 2011-06-21 08:01:14 UTC (rev 365) @@ -1,22 +0,0 @@ -//---------------------------------------------------------------------------------- -//! MatlabReadWrite module definition -/*! -// \file MatlabReadWrite.def -// \author Reinhard Hameeteman -// \date 2011-01-24 -*/ -//---------------------------------------------------------------------------------- - -MacroModule MatlabReadWrite { - documentation = "$(LOCAL)/html/MatlabReadWrite.html" - genre = File - author = "Reinhard Hameeteman" - status = "work-in-progress" - comment = "conversion between a MeVisLab image and Matlab mat files" - keywords = "read write convert matlab mevislab image matrix" - seeAlso = "ImageLoad ImageSave" - exampleNetwork = "$(LOCAL)/networks/MatlabReadWriteExample.mlab" - externalDefinition = "$(LOCAL)/MatlabReadWrite.script" - -} // MacroModule MatlabReadWrite - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-21 07:42:42
|
Revision: 364 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=364&view=rev Author: rhameeteman Date: 2011-06-21 07:42:36 +0000 (Tue, 21 Jun 2011) Log Message: ----------- KH. * Auto indent on field drop * Save window size on closing the GUI Modified Paths: -------------- trunk/Community/General/Modules/Macros/Command/PythonExec.py trunk/Community/General/Modules/Macros/Command/PythonExec.script Modified: trunk/Community/General/Modules/Macros/Command/PythonExec.py =================================================================== --- trunk/Community/General/Modules/Macros/Command/PythonExec.py 2011-06-21 07:38:58 UTC (rev 363) +++ trunk/Community/General/Modules/Macros/Command/PythonExec.py 2011-06-21 07:42:36 UTC (rev 364) @@ -37,7 +37,27 @@ #---------------------------------------------------------------------------------- from mevis import * +from math import log +width = 800 +height = 200 +def SaveWindowSize(arg=None): + global width,height + width = ctx.control("WindowCtrl").width() + height= ctx.control("WindowCtrl").height() + return + +def SetWindowSize(): + global width,height + #ctx.callLater(3, 'SetSize' ) + return + +def SetSize(): + ctx.control("WindowCtrl").setWidth( width ) + ctx.control("WindowCtrl").setHeight( height ) + ctx.control("WindowCtrl").updateFrame() + return + def Run( field = None): if ( field != ctx.field("run") and not ctx.field('onArgChange').boolValue() ) : return command = ctx.field("command").value @@ -69,19 +89,21 @@ def FieldDroped( object ) : command = ctx.field("command").value + lastLine = command.split('\n')[-1] + spaces = len(lastLine)-len(lastLine.lstrip()) if ( ( object.owner().fullName().find( 'FieldIterator' ) != -1 or object.owner().fullName().find( 'FileIterator' ) != -1 ) and object.name == 'newValue' ) : moduleName = object.owner().name - command += "\nfor i"+moduleName+" in range( nw.field('" + moduleName+".numValues').value ) :" - command += "\n if MLAB.shouldStop() : break" - command += "\n nw.field('"+moduleName+".curIndex').value = i"+moduleName - command += "\n print nw.field('"+moduleName+".curValue').stringValue()" + command += "\n"+spaces*" "+"for i"+moduleName+" in range( nw.field('" + moduleName+".numValues').value ) :" + command += "\n"+spaces*" "+" if MLAB.shouldStop() : break" + command += "\n"+spaces*" "+" nw.field('"+moduleName+".curIndex').value = i"+moduleName + command += "\n"+spaces*" "+" print nw.field('"+moduleName+".curValue').stringValue()" else: if object.getType() == 'Trigger' : - command += "\nnw.field('" + object.fullName() + "').touch()" + command += "\n"+spaces*" "+"nw.field('" + object.fullName() + "').touch()" else : - command += "\nnw.field('" + object.fullName() + "').value" + command += "\n"+spaces*" "+"nw.field('" + object.fullName() + "').value" ctx.field("command").value = command return Modified: trunk/Community/General/Modules/Macros/Command/PythonExec.script =================================================================== --- trunk/Community/General/Modules/Macros/Command/PythonExec.script 2011-06-21 07:38:58 UTC (rev 363) +++ trunk/Community/General/Modules/Macros/Command/PythonExec.script 2011-06-21 07:42:36 UTC (rev 364) @@ -66,6 +66,8 @@ } Window { + name = WindowCtrl + wakeupCommand = SetWindowSize Vertical { expandY = Yes expandY = Yes @@ -81,6 +83,7 @@ droppedObjectCommand = FieldDroped syntaxHighlighting = Python showLineNumbers = Yes + hscroller = On tooltip = "Drop any field on this window and it will be added as nw.field(<fieldName>).value Trigger fields are added as nw.field(<fieldName>).touch() @@ -109,6 +112,8 @@ CheckBox onArgChange { title = "Listen to Arg changes" } } } + shouldCloseCommand = SaveWindowSize + Execute = SetWindowSize } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-21 07:39:05
|
Revision: 363 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=363&view=rev Author: rhameeteman Date: 2011-06-21 07:38:58 +0000 (Tue, 21 Jun 2011) Log Message: ----------- KH. * Removed accidentally committed files Removed Paths: ------------- trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.mlab trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.py trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.script Deleted: trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.mlab =================================================================== --- trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.mlab 2011-06-20 10:02:51 UTC (rev 362) +++ trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.mlab 2011-06-21 07:38:58 UTC (rev 363) @@ -1,112 +0,0 @@ -// MDL v1 utf8 -network { - watchlist = "" -} -module MatlabScriptWrapper { - internal { - frame = "701 461 168 56" - moduleGroupName = "" - windows { - window _default { - geometry = "819 224 600 804" - sizeHint = "600 579" - wasOpen = yes - wasActive = no - } - } - } - fields { - instanceName = MatlabScriptWrapper - matlabScript = "if read == 1 - vars=whos('-file',fileName); - exists=false; - foundNames = []; - for i=1:size(vars,1) - if strcmp(vars(i).name, varName) - exists= true; - end - foundNames=[foundNames ',' vars(i).name]; - end - if exists - load( fileName ); - Output0=Input0; - else - result=['Variable not found; only found: ' foundNames]; - end -else - save(string0,['Input' type]) -end" - useExternalScript = FALSE - matlabScriptPath = "" - inDataName0 = Input0 - inDataName1 = Input1 - inDataName2 = Input2 - outDataName0 = Output0 - outDataName1 = Output1 - outDataName2 = Output2 - inXMarkerName = InputXMarkerList - outXMarkerName = OutputXMarkerList - inWEMName = InputWEM - outWEMName = OutputWEM - inCurveName = InputCurveList - outCurveName = OutputCurveList - autoUpdate = FALSE - autoApply = FALSE - status = Ready. - scalarName0 = scalar0 - scalar0 = 0 - scalarName1 = scalar1 - scalar1 = 0 - scalarName2 = scalar2 - scalar2 = 0 - scalarName3 = scalar3 - scalar3 = 0 - scalarName4 = scalar4 - scalar4 = 0 - scalarName5 = scalar5 - scalar5 = 0 - stringName0 = fileName - string0 = "" - stringName1 = type - string1 = "" - stringName2 = varName - string2 = "" - stringName3 = result - string3 = "" - stringName4 = string4 - string4 = "" - stringName5 = string5 - string5 = "" - vectorName0 = vector0 - vector0 = "0 0 0 0" - vectorName1 = vector1 - vector1 = "0 0 0 0" - vectorName2 = vector2 - vector2 = "0 0 0 0" - vectorName3 = vector3 - vector3 = "0 0 0 0" - vectorName4 = vector4 - vector4 = "0 0 0 0" - vectorName5 = vector5 - vector5 = "0 0 0 0" - matrixName0 = matrix0 - matrix0 = "1 0 0 0 -0 1 0 0 -0 0 1 0 -0 0 0 1" - matrixName1 = matrix1 - matrix1 = "1 0 0 0 -0 1 0 0 -0 0 1 0 -0 0 0 1" - matrixName2 = matrix2 - matrix2 = "1 0 0 0 -0 1 0 0 -0 0 1 0 -0 0 0 1" - matlabOutput = "" - showSessionWindow = TRUE - } -} -connections = "" -networkModel = "" Deleted: trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.py =================================================================== --- trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.py 2011-06-20 10:02:51 UTC (rev 362) +++ trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.py 2011-06-21 07:38:58 UTC (rev 363) @@ -1,69 +0,0 @@ -#---------------------------------------------------------------------------------- -#! Macro module MatlabReadWrite -#/*! -# \file MatlabReadWrite.py -# \author Reinhard Hameeteman -# \date 2011-01-24 -# -# conversion between a MeVisLab image and Matlab mat files -#*/ -#---------------------------------------------------------------------------------- - -from mevis import * - -types = {'Image':'0', - 'XMarkerList':'XMarkerList', - 'WEM':'WEM', - 'CurveList':'CurveList'} -script = "\ -vars=whos(\'-file\',fileName);\n\ -exists=false;\n\ -foundNames = [];\n\ -for i=1:size(vars,1)\n\ - if strcmp(vars(i).name, varName)\n\ - exists= true;\n\ - end\n\ - foundNames=[foundNames vars(i).name ',' ];\n\ -end\n\ -if exists \n\ - load( fileName );\n\ - <Output>= <Input>;\n\ -else\n\ - result=[\'Variable not found; only found: \' foundNames];\n\ -end\n\ -" - -def Save(): - global types,script - type = types[ctx.field("type").value] - ctx.field("MatlabScriptWrapper.matlabScript").value = "save(fileName,\'Input"+type+"\')" - ctx.field("MatlabScriptWrapper.update").touch() - return - -def Load(): - global types, script - ctx.field("MatlabScriptWrapper.scalar0").value = 1 - type = types[ctx.field("type").value] - ctx.field("MatlabScriptWrapper.string1").value = type - varName = ctx.field("variableName") - if varName.value == "" : - varName.value = "Input"+type - ctx.field("MatlabScriptWrapper.string2").value = varName.value - loadScript = script.replace('<Output>','Output'+type) - loadScript = loadScript.replace('<Input>',varName.value) - ctx.field("MatlabScriptWrapper.matlabScript").value = loadScript - ctx.field("MatlabScriptWrapper.update").touch() - result = ctx.field("MatlabScriptWrapper.string3") - if result.value != "" : - ctx.field("MatlabScriptWrapper.status").value = result.value.strip(',') - result.value = "" - return - - -#//# MeVis signature v1 -#//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBANEfsmYse2e1dRhkQ9AQbreCq9uxwzWLoGom13MNYmyfwoJqQOEXljLFAgw2eEjaT12G4CdqKWhRxh9ANP6n7GMCARE=:VI/mB8bT4u+mRtf/ru8yUQi8BzpaS3UeL2x62YxsUYnVqCWuLrVNLiukIIjnJMKQXlc8ezmgOIcVAV7pgvgKpQ== -#//# owner: MeVis -#//# date: 2010-06-22T21:02:14 -#//# hash: WZ2Zrb7QlWYG9lWMjeYuCHRLvxmYYaZ6MQqO9Kg9XxPCBYK/DJHa2Qh3o2PxB1FLSyHsag8deKQO4CvxQgQMAA== -#//# MeVis end - Deleted: trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.script =================================================================== --- trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.script 2011-06-20 10:02:51 UTC (rev 362) +++ trunk/Community/General/Modules/Macros/FileIO/MatlabReadWrite.script 2011-06-21 07:38:58 UTC (rev 363) @@ -1,68 +0,0 @@ -//---------------------------------------------------------------------------------- -//! Macro module MatlabReadWrite -/*! -// \file MatlabReadWrite.script -// \author Reinhard Hameeteman -// \date 2011-01-24 -// -// conversion between a MeVisLab image and Matlab mat files -*/ -//---------------------------------------------------------------------------------- - - -Interface { - Inputs { - Field input0 { internalName = MatlabScriptWrapper.input0 } - Field inXMarkerList { internalName = MatlabScriptWrapper.inputXMarkerList } - Field inWEM { internalName = MatlabScriptWrapper.inputWEM } - Field inCurveList { internalName = MatlabScriptWrapper.inputCurve } - } - Outputs { - Field output0 { internalName = MatlabScriptWrapper.output0 } - Field outXMarkerList { internalName = MatlabScriptWrapper.outputXMarkerList } - Field outWEM { internalName = MatlabScriptWrapper.outputWEM } - Field outCurveList { internalName = MatlabScriptWrapper.outputCurveList } - } - Parameters { - Field save { type = Trigger } - Field load { type = Trigger } - Field fileName { internalName = MatlabScriptWrapper.string0 } - Field variableName { type = String value = "" } - Field type { - type = Enum - items { - item Image {} - item XMarkerList {} - item WEM {} - item CurveList {} - } - } - } -} - - -Commands { - source = $(LOCAL)/MatlabReadWrite.py - FieldListener load { command = Load } - FieldListener save { command = Save } -} - -Window { - Box { - ButtonBar type { show = Radio title = Type } - Field fileName { browseButton = Yes } - Field save {} - Field load {} - Field variableName {} - Field MatlabScriptWrapper.restartMatlab { title = Restart } - Field MatlabScriptWrapper.status { edit = No} - } -} - -//# MeVis signature v1 -//# key: MFowDQYJKoZIhvcNAQEBBQADSQAwRgJBANEfsmYse2e1dRhkQ9AQbreCq9uxwzWLoGom13MNYmyfwoJqQOEXljLFAgw2eEjaT12G4CdqKWhRxh9ANP6n7GMCARE=:VI/mB8bT4u+mRtf/ru8yUQi8BzpaS3UeL2x62YxsUYnVqCWuLrVNLiukIIjnJMKQXlc8ezmgOIcVAV7pgvgKpQ== -//# owner: MeVis -//# date: 2010-06-22T21:02:14 -//# hash: VRybCdbKA/kSEACdXizQO5SmWnw5W2WxDiOQwTBg3jGSU7vFPbBvyBhmopyHgNRv8EzY7mYPj22sk8HNYrgpkw== -//# MeVis end - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-20 10:02:57
|
Revision: 362 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=362&view=rev Author: rhameeteman Date: 2011-06-20 10:02:51 +0000 (Mon, 20 Jun 2011) Log Message: ----------- KH. * KH. * Added sync of the position and voxel value annotations Modified Paths: -------------- trunk/Community/General/Modules/Macros/Viewers/CustomOrthoView2D.mlab Modified: trunk/Community/General/Modules/Macros/Viewers/CustomOrthoView2D.mlab =================================================================== --- trunk/Community/General/Modules/Macros/Viewers/CustomOrthoView2D.mlab 2011-06-18 16:09:57 UTC (rev 361) +++ trunk/Community/General/Modules/Macros/Viewers/CustomOrthoView2D.mlab 2011-06-20 10:02:51 UTC (rev 362) @@ -341,12 +341,12 @@ input00 = 0.000 input01 = 0.000 input02 = 0.000 - input03 = 1145.00012207 - input04 = 3671.00024414 - input05 = 1145.00012207 - input06 = 3671.00024414 - input07 = 1145.00012207 - input08 = 3671.00024414 + input03 = 0.39250001 + input04 = 0.80250001 + input05 = 0.39250001 + input06 = 0.80250001 + input07 = 0.39250001 + input08 = 0.80250001 input09 = HU fontWidthDummyString = "" targetWidth = 0 @@ -699,6 +699,12 @@ Annotations.input00 = FieldBypass.outputString Annotations.input01 = StringUtils.result Annotations.input02 = StringUtils1.result + Annotations.input03 = ext.lutGreyCenter + Annotations.input04 = ext.lutGreyWidth + Annotations.input05 = ext.lutAlphaCenter + Annotations.input06 = ext.lutAlphaWidth + Annotations.input07 = ext.lutAlphaCenter + Annotations.input08 = ext.lutAlphaWidth view.worldPosition = pos.worldPosition pos.worldPosition = view.worldPosition pos.colorAxes = pos.colorBorder This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-18 16:10:03
|
Revision: 361 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=361&view=rev Author: rhameeteman Date: 2011-06-18 16:09:57 +0000 (Sat, 18 Jun 2011) Log Message: ----------- KH. * Made files selectable from list Modified Paths: -------------- trunk/Community/General/Modules/Macros/FileIO/FileIterator.mlab trunk/Community/General/Modules/Macros/FileIO/FileIterator.script Modified: trunk/Community/General/Modules/Macros/FileIO/FileIterator.mlab =================================================================== --- trunk/Community/General/Modules/Macros/FileIO/FileIterator.mlab 2011-06-17 06:16:09 UTC (rev 360) +++ trunk/Community/General/Modules/Macros/FileIO/FileIterator.mlab 2011-06-18 16:09:57 UTC (rev 361) @@ -41,7 +41,7 @@ window _default { geometry = "319 620 190 298" sizeHint = "190 298" - wasOpen = yes + wasOpen = no wasActive = no } } @@ -180,7 +180,7 @@ exists = FALSE isDirectory = FALSE isReadable = FALSE - isWritable = TRUE + isWritable = FALSE } internalFields = "" } @@ -221,8 +221,8 @@ moduleGroupName = "" windows { window _default { - geometry = "136 235 422 321" - sizeHint = "422 321" + geometry = "136 235 415 317" + sizeHint = "415 317" wasOpen = no wasActive = no } @@ -233,7 +233,7 @@ fieldNames = "" fieldValues = "" fieldSeparator = [,;] - valueSeparator = "\\n\\r|\\r\\n|[\\n\\r\\\\]" + valueSeparator = "\\n" valueHeader = FALSE numValues = 0 indexTranslation = 0 Modified: trunk/Community/General/Modules/Macros/FileIO/FileIterator.script =================================================================== --- trunk/Community/General/Modules/Macros/FileIO/FileIterator.script 2011-06-17 06:16:09 UTC (rev 360) +++ trunk/Community/General/Modules/Macros/FileIO/FileIterator.script 2011-06-18 16:09:57 UTC (rev 361) @@ -89,6 +89,9 @@ Field loop { internalName = FieldIterator.loop} Field running { internalName = FieldIterator.running} Field autoReset { internalName = FieldIterator.autoReset } + + // File list + Field showText { type = Bool value = False } // FileInformation Field dirname { internalName = FileInformation.dirname } @@ -296,8 +299,13 @@ } Vertical "List" { tooltip = "You can also connect an external list to the Files label" - FieldLabel externalList { title = "Files:" } + Horizontal { + expandY = No + FieldLabel externalList { title = "Files:" } + Field showText { title = text alignX = Right } + } TextView fileList { + visibleOn = showText tooltip = "Be carefull with the line numbers! Subtract 1 for the index number!" title = "" autoApply = Yes @@ -305,6 +313,11 @@ vscroller = Auto hscroller = Auto } + ListBox fileList { + visibleOn = "*!showText*" + rowSeparator = "\\n" + doubleClickedCommand = "*py:ctx.field('curIndex').value=args[0]*" + } } Vertical Name { expandY = No This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-17 06:16:15
|
Revision: 360 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=360&view=rev Author: rhameeteman Date: 2011-06-17 06:16:09 +0000 (Fri, 17 Jun 2011) Log Message: ----------- KH. * First version of a module to convert a curve to a string. Similar to PrintCurves, but I wanted the curves to be easily importable in Excel. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveList.pro trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveListInit.cpp Modified: trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveList.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveList.pro 2011-06-17 06:11:39 UTC (rev 359) +++ trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveList.pro 2011-06-17 06:16:09 UTC (rev 360) @@ -33,11 +33,13 @@ MLCMCurveListSystem.h \ CMCurveFilter/mlCMCurveFilter.h \ StringToCurve/mlStringToCurve.h \ + CurveToString/mlCurveToString.h SOURCES += \ MLCMCurveListInit.cpp \ CMCurveFilter/mlCMCurveFilter.cpp \ StringToCurve/mlStringToCurve.cpp \ + CurveToString/mlCurveToString.cpp # additional files that are NOT compiled RELATEDFILES += \ Modified: trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveListInit.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveListInit.cpp 2011-06-17 06:11:39 UTC (rev 359) +++ trunk/Community/General/Sources/ML/MLCMCurveList/MLCMCurveListInit.cpp 2011-06-17 06:16:09 UTC (rev 360) @@ -19,6 +19,7 @@ #include "CMCurveFilter/mlCMCurveFilter.h" #include "StringToCurve/mlStringToCurve.h" +#include "CurveToString/mlCurveToString.h" ML_START_NAMESPACE @@ -34,6 +35,7 @@ CMCurveFilter::initClass(); StringToCurve::initClass(); + CurveToString::initClass(); return 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-17 06:11:45
|
Revision: 359 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=359&view=rev Author: rhameeteman Date: 2011-06-17 06:11:39 +0000 (Fri, 17 Jun 2011) Log Message: ----------- KH. * First version of a module to convert a curve to a string. Similar to PrintCurves, but I wanted the curves to be easily importable in Excel. Modified Paths: -------------- trunk/Community/General/Modules/ML/MLCMCurveList/MLCMCurveList.def Added Paths: ----------- trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/ trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.cpp trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.h Modified: trunk/Community/General/Modules/ML/MLCMCurveList/MLCMCurveList.def =================================================================== --- trunk/Community/General/Modules/ML/MLCMCurveList/MLCMCurveList.def 2011-06-15 07:57:48 UTC (rev 358) +++ trunk/Community/General/Modules/ML/MLCMCurveList/MLCMCurveList.def 2011-06-17 06:11:39 UTC (rev 359) @@ -100,7 +100,7 @@ status = "work-in-progress" comment = "Convert a string into a curve" keywords = "string curve convert curvelist curvedata" - seeAlso = "PrintCurves" + seeAlso = "PrintCurves CurveToString" documentation = "$(LOCAL)/StringToCurve/StringToCurve.html" exampleNetwork = "$(LOCAL)/StringToCurve/StringToCurveExample.mlab" @@ -116,3 +116,33 @@ } } // MLModule StringToCurve + + +//---------------------------------------------------------------------------------- +// MLModule CurveToString +//---------------------------------------------------------------------------------- +MLModule CurveToString { + DLL = "MLCMCurveList" + group = "BIGR" + genre = Diagram + author = "Reinhard Hameeteman" + status = "work-in-progress" + comment = "Convert a curve into a string" + keywords = "string curve convert curvelist curvedata" + seeAlso = "PrintCurves StringToCurve" + documentation = "$(LOCAL)/CurveToString/CurveToString.html" + exampleNetwork = "$(LOCAL)/CurveToString/CurveToStringExample.mlab" + +Window { + expandY = Yes + Box { + expandY = Yes + Horizontal { + Field curveSeparator { title = curveSeparators } + Field valueSeparator { title = valueSeparators } + } + TextView curveString { expandY = Yes } + } +} + +} // MLModule CurveToString \ No newline at end of file Added: trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.cpp 2011-06-17 06:11:39 UTC (rev 359) @@ -0,0 +1,135 @@ +//---------------------------------------------------------------------------------- +// +// Copyright (c) 2010, Biomedical Imaging Group Rotterdam (BIGR), +// Departments of Radiology and Medical Informatics, Erasmus MC. 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 BIGR 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 BIGR 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. +// +//---------------------------------------------------------------------------------- +//! The ML module class CurveToString. +/*! +// \file mlCurveToString.cpp +// \author Reinhard Hameeteman +// \date 2011-06-06 +// +// Convert a curve into a string +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "mlCurveToString.h" + +#include <boost/algorithm/string.hpp> +ML_START_NAMESPACE + + +//! Implements code for the runtime type system of the ML +ML_MODULE_CLASS_SOURCE(CurveToString, Module); + +//---------------------------------------------------------------------------------- +//! Constructor +//---------------------------------------------------------------------------------- +CurveToString::CurveToString () : Module(0, 0) +{ + ML_TRACE_IN("CurveToString::CurveToString ()") + + handleNotificationOff(); + + FieldContainer *fieldC = getFieldContainer(); + + f_InCurveList = fieldC->addBase( "inCurveList" ); + + f_CurveString = fieldC->addString("curveString"); + f_CurveString->setStringValue(""); + + f_IndexString = fieldC->addString("indexString"); + f_IndexString->setStringValue(""); + + f_ValueSeparator = fieldC->addString("valueSeparator"); + f_ValueSeparator->setStringValue(" "); + + f_CurveSeparator = fieldC->addString( "curveSeparator" ); + f_CurveSeparator->setStringValue(";"); + + handleNotificationOn(); +} + + +//---------------------------------------------------------------------------------- +//! Handle field changes of the field field. +//---------------------------------------------------------------------------------- +void CurveToString::handleNotification (Field * field) +{ + ML_TRACE_IN("CurveToString::handleNotification ()"); + if ( field == f_InCurveList ) { + m_SingleCurveList.clear(); + m_InCurveList = NULL; + Base* baseInput = f_InCurveList->getBaseValue(); + CurveData* inCurve = mlbase_cast<CurveData*>( baseInput ); + if (inCurve){ + m_SingleCurveList.getCurveList().push_back( inCurve ); + m_InCurveList = &m_SingleCurveList; + } else { + m_InCurveList = mlbase_cast<CurveList*>(baseInput); + } + } + if ( m_InCurveList ){ + UpdateString(); + } +} + + +void CurveToString::UpdateString() +{ + + std::stringstream curveString; + std::string vSep = f_ValueSeparator->getStringValue(); + std::string cSep = f_CurveSeparator->getStringValue(); + int nCurveSets = m_InCurveList->getNumCurves(); + if ( nCurveSets == 0 ) {return;} + + for (int iSet = 0; iSet < nCurveSets; ++iSet ) { + + int nCurves = m_InCurveList->getCurveData( iSet )->getNumSeries(); + if (nCurves == 0 ) {continue;} + + for (int iCurve = 0; iCurve < nCurves; ++iCurve ) { + + CurveData *curveSet = m_InCurveList->getCurveData( iSet ); + + for (int iX = 0; iX < curveSet->getPoints(); ++iX ){ + float xValue = curveSet->getXValue( iX ); + float yValue = curveSet->getYValue( iCurve,iX ); + curveString << yValue << vSep; + } + char dummy; + curveString >> dummy; + curveString << cSep; + } + } + f_CurveString->setStringValue( curveString.str() ); + +} + +ML_END_NAMESPACE + Added: trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.h =================================================================== --- trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCMCurveList/CurveToString/mlCurveToString.h 2011-06-17 06:11:39 UTC (rev 359) @@ -0,0 +1,98 @@ +//---------------------------------------------------------------------------------- +// +// Copyright (c) 2010, Biomedical Imaging Group Rotterdam (BIGR), +// Departments of Radiology and Medical Informatics, Erasmus MC. 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 BIGR 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 BIGR 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. +// +//---------------------------------------------------------------------------------- +//! The ML module class CurveToString. +/*! +// \file mlCurveToString.cpp +// \author Reinhard Hameeteman +// \date 2011-06-06 +// +// Convert a curve into a string +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __mlCurveToString_H +#define __mlCurveToString_H + + +// Local includes +#include "../MLCMCurveListSystem.h" + +// ML includes +#include "mlModuleIncludes.h" +#include <mlDiagramData.h> + +ML_START_NAMESPACE + + +//! Convert a string into a curve +class MLCMCURVELIST_EXPORT CurveToString : public Module +{ +public: + + //! Constructor. + CurveToString (); + + //! Handle field changes of the field field. + virtual void handleNotification (Field * /*field*/); + + //! Curve data + BaseField *f_InCurveList; + + //! String containing all curves + StringField *f_CurveString; + + //! String with index values that are used for all curves + StringField *f_IndexString; + + //! Characters that separate the curves in the curvesString + StringField *f_ValueSeparator; + + //! Characters that separate the values in the curvesString + StringField *f_CurveSeparator; + +private: + + //! CurveList containing the output curves + CurveList *m_InCurveList; + + CurveList m_SingleCurveList; + + //! Actual conversion method + void UpdateString(); + + //! Implements interface for the runtime type system of the ML. + ML_MODULE_CLASS_HEADER(CurveToString) +}; + + +ML_END_NAMESPACE + +#endif // __mlCurveToString_H + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2011-06-15 07:57:54
|
Revision: 358 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=358&view=rev Author: rhameeteman Date: 2011-06-15 07:57:48 +0000 (Wed, 15 Jun 2011) Log Message: ----------- KH. * Fixed bug in displayed LUT values Modified Paths: -------------- trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.mlab trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.py trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script Modified: trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.mlab =================================================================== --- trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.mlab 2011-06-08 16:11:47 UTC (rev 357) +++ trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.mlab 2011-06-15 07:57:48 UTC (rev 358) @@ -2,6 +2,86 @@ network { watchlist = "" } +module SyncFields { + internal { + frame = "-179 793 136 64" + moduleGroupName = "" + windows { + window _default { + geometry = "399 397 183 387" + sizeHint = "183 387" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SyncViewingCenter + mode = Float + on = TRUE + precision = 0.001000000047 + float0 = 0 + float1 = 0 + float2 = 0 + float3 = 0 + float4 = 0 + float5 = 0 + float6 = 0 + float7 = 0 + float8 = 0 + float9 = 0 + vector0 = "0 0 0 0 0 0" + vector1 = "0 0 0 0 0 0" + vector2 = "0 0 0 0 0 0" + vector3 = "0 0 0 0 0 0" + vector4 = "0 0 0 0 0 0" + vector5 = "0 0 0 0 0 0" + vector6 = "0 0 0 0 0 0" + vector7 = "0 0 0 0 0 0" + vector8 = "0 0 0 0 0 0" + vector9 = "0 0 0 0 0 0" + } +} +module SyncFields { + internal { + frame = "-171 721 120 64" + moduleGroupName = "" + windows { + window _default { + geometry = "399 397 183 387" + sizeHint = "183 387" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SyncSliceOrigin + mode = Float + on = TRUE + precision = 0.001000000047 + float0 = 0 + float1 = 0 + float2 = 0 + float3 = 0 + float4 = 0 + float5 = 0 + float6 = 0 + float7 = 0 + float8 = 0 + float9 = 0 + vector0 = "0 0 0 0 0 0" + vector1 = "0 0 0 0 0 0" + vector2 = "0 0 0 0 0 0" + vector3 = "0 0 0 0 0 0" + vector4 = "0 0 0 0 0 0" + vector5 = "0 0 0 0 0 0" + vector6 = "0 0 0 0 0 0" + vector7 = "0 0 0 0 0 0" + vector8 = "0 0 0 0 0 0" + vector9 = "0 0 0 0 0 0" + } +} module CustomOrthoView2D { internal { frame = "21 341 152 56" @@ -484,7 +564,7 @@ window _default { geometry = "455 147 183 434" sizeHint = "183 434" - wasOpen = yes + wasOpen = no wasActive = no } } @@ -638,7 +718,7 @@ } module SoSeparator { internal { - frame = "-163 729 104 64" + frame = "-171 865 104 64" moduleGroupName = "" } fields { Modified: trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.py =================================================================== --- trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.py 2011-06-08 16:11:47 UTC (rev 357) +++ trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.py 2011-06-15 07:57:48 UTC (rev 358) @@ -193,14 +193,36 @@ for i in range(1,nInputs) : if ( syncZoom ) : ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceZoom' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.sliceZoom') ) + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceOrigin1' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.sliceOrigin1') ) + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceOrigin2' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.sliceOrigin2') ) + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceOrigin3' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.sliceOrigin3') ) + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.viewingCenter1' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.viewingCenter1') ) + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.viewingCenter2' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.viewingCenter2') ) + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.viewingCenter3' ).connectFrom( ctx.field('CustomOrthoView2D'+ str( i-1 ) + '.view.viewingCenter3') ) else : ctx.field( 'CustomOrthoView2D'+ str( i ) + '.view.sliceZoom').disconnectAll() + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceOrigin1' ).disconnectAll() + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceOrigin2' ).disconnectAll() + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.sliceOrigin3' ).disconnectAll() + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.viewingCenter1' ).disconnectAll() + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.viewingCenter2' ).disconnectAll() + ctx.field( 'CustomOrthoView2D'+ str( i )+'.view.viewingCenter3' ).disconnectAll() if syncZoom : ctx.field( 'SyncZoom.float0' ).connectFrom(ctx.field('CustomOrthoView2D'+ str( nInputs-1 ) + '.view.sliceZoom')) ctx.field( 'CustomOrthoView2D0.view.sliceZoom').connectFrom( ctx.field('SyncZoom.float1') ) + ctx.field( 'CustomOrthoView2D0.view.sliceOrigin3' ).connectFrom( ctx.field('SyncSliceOrigin.float1') ) + ctx.field( 'CustomOrthoView2D0.view.viewingCenter1' ).connectFrom( ctx.field('SyncViewingCenter.float1') ) else : ctx.field( 'SyncZoom.float0' ).disconnectAll() + ctx.field( 'SyncSliceOrigin.float0' ).disconnectAll() + ctx.field( 'SyncViewingCenter.float0' ).disconnectAll() ctx.field( 'CustomOrthoView2D0.view.sliceZoom').disconnectAll() + ctx.field( 'CustomOrthoView2D0.view.sliceOrigin1' ).disconnectAll() + ctx.field( 'CustomOrthoView2D0.view.sliceOrigin2' ).disconnectAll() + ctx.field( 'CustomOrthoView2D0.view.sliceOrigin3' ).disconnectAll() + ctx.field( 'CustomOrthoView2D0.view.viewingCenter1' ).disconnectAll() + ctx.field( 'CustomOrthoView2D0.view.viewingCenter2' ).disconnectAll() + ctx.field( 'CustomOrthoView2D0.view.viewingCenter3' ).disconnectAll() return Modified: trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script =================================================================== --- trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script 2011-06-08 16:11:47 UTC (rev 357) +++ trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script 2011-06-15 07:57:48 UTC (rev 358) @@ -109,6 +109,9 @@ item LAYOUT_CUBE_EQUAL { title = "Cube equal" } + item LAYOUT_ROW_EQUAL { + title = "Row equal" + } } } Field syncZoom { type = bool value = false } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2011-06-08 16:11:53
|
Revision: 357 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=357&view=rev Author: wolfspindler Date: 2011-06-08 16:11:47 +0000 (Wed, 08 Jun 2011) Log Message: ----------- Trial to fix platform incompatibility for required malloc.h. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.cpp Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp 2011-06-08 15:48:25 UTC (rev 356) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp 2011-06-08 16:11:47 UTC (rev 357) @@ -6,9 +6,10 @@ #include "UMDMainAxis.h" #include <stdlib.h> +#ifndef __APPLE__ #include <malloc.h> +#endif - #define JACOBI_ROTATE(a,i,j,k,l) g=a[i][j];\ h=a[k][l];\ a[i][j]=g-s*(h+g*tau);\ Modified: trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.cpp 2011-06-08 15:48:25 UTC (rev 356) +++ trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.cpp 2011-06-08 16:11:47 UTC (rev 357) @@ -28,7 +28,9 @@ #include <GL/glew.h> #pragma warning( disable : 4611 ) #include "png.h" +#ifndef __APPLE__ #include <malloc.h> +#endif SO_NODE_SOURCE(SoVisLogo) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2011-06-08 15:48:34
|
Revision: 356 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=356&view=rev Author: wolfspindler Date: 2011-06-08 15:48:25 +0000 (Wed, 08 Jun 2011) Log Message: ----------- MeVisLab2.1 to MeVisLab2.2: -Support for controlled library export symbols for non windows platforms added. -Missing gcc4.4 header files included. -Usage of ILAB5 definition not supported any more. Since no ILAB4 codes are supported any more those compiler switches have been removed completely. -CSO-Interface changes adopted. -Outdated Toggle fields replaced by BoolFields. -Outdated variable references removed from field creations. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp trunk/UMD/METK/Sources/Inventor/SoQHull3D/UMDQHull3DSystem.h trunk/UMD/METK/Sources/Inventor/UMDPickInfo/UMDPickInfoSystem.h trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/UMDSoExtractColoredFacesSystem.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMeasurementInit.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleToObjects.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleToObjects.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMeasureTool.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMinimalDistance.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMinimalDistance.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoThresholdToPointSet.cpp trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoThresholdToPointSet.h trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensionExample/UMDSoView2DExtensionExampleSystem.h trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/UMDSoView2DExtensionsSystem.h trunk/UMD/METK/Sources/Inventor/UMDStraightLine/UMDStraightLineSystem.h trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp trunk/UMD/METK/Sources/Inventor/UMDTools/UMDToolsSystem.h trunk/UMD/METK/Sources/Inventor/UMDViewerTrigger/UMDViewerTriggerSystem.h trunk/UMD/METK/Sources/Inventor/UMDVisLogo/SoVisLogo.cpp trunk/UMD/METK/Sources/Inventor/UMDVisLogo/UMDVisLogoSystem.h trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h trunk/UMD/METK/Sources/ML/Animation/AnimationSystem.h trunk/UMD/METK/Sources/ML/METK2DLabeling/METK2DLabelingSystem.h trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h trunk/UMD/METK/Sources/ML/METKMessaging/METKMessagingSystem.h trunk/UMD/METK/Sources/ML/METKPicking/METKPickingSystem.h trunk/UMD/METK/Sources/ML/METKSurfaceDistance/METKSurfaceDistanceSystem.h trunk/UMD/METK/Sources/ML/METKSurfaceDistance/mlMETKSurfaceDistance3D.h trunk/UMD/METK/Sources/ML/METKUndo/METKUndoSystem.h trunk/UMD/METK/Sources/ML/UMDBoundingBox2/UMDBoundingBox2System.h trunk/UMD/METK/Sources/ML/UMDBoundingBoxCalculator2/UMDBoundingBoxCalculator2System.h trunk/UMD/METK/Sources/ML/UMDCodedSegmentation/UMDCodedSegmentationSystem.h trunk/UMD/METK/Sources/ML/UMDInventorPointer/UMDInventorPointerSystem.h trunk/UMD/METK/Sources/ML/UMDObjDemo/UMDObjDemoSystem.h trunk/UMD/METK/Sources/ML/UMDRegionDistanceTransformation/UMDRegionDistanceTransformationSystem.h trunk/UMD/METK/Sources/ML/UMDSoSceneWriterMD/UMDSoSceneWriterMDSystem.h trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer/UMDVisDataViewerSystem.h trunk/UMD/METK/Sources/ML/kAviWriter/MLkAviWriterSystem.h trunk/UMD/METK/Sources/common/ObjMgrCommunicator.h trunk/UMD/METK/Sources/common/XMLParser.h trunk/UMD/METK/Sources/common/kBasics.h trunk/UMD/METK/Sources/common/kCamera.cpp trunk/UMD/METK/Sources/common/kCamera.h trunk/UMD/METK/Sources/common/kDebug.h Modified: trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2011-06-08 15:32:57 UTC (rev 355) +++ trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2011-06-08 15:48:25 UTC (rev 356) @@ -1,676 +1,677 @@ -//---------------------------------------------------------------------------------- -//! The Inventor module class SoQHull3D -/*! -// \file SoQHull3D.cpp -// \author Jens Haase -// \date 2005-02-01 -// -// convex hull of invetor scene using qhull -*/ -//---------------------------------------------------------------------------------- - -// Local includes -#include "SoQHull3D.h" - -// Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid -// collisions between OpenInventor and Windows headers. -#include "XVEnterScope.h" - -// TODO: include more inventor things here -#include "XVLeaveScope.h" - -#include <list> -#include <iostream> - -SO_NODE_SOURCE(SoQHull3D) - - -//debug -bool debug = 0; - - -/////////////////////////////////////////////////////////////////////////// -// INIT CLASS -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::initClass() -{ - SO_NODE_INIT_CLASS(SoQHull3D, SoSeparator, "Separator"); -} - -/////////////////////////////////////////////////////////////////////////// -// CONSTRUCTOR -/////////////////////////////////////////////////////////////////////////// -SoQHull3D::SoQHull3D() -{ - - // Execute inventor internal stuff for node construction. - SO_NODE_CONSTRUCTOR(SoQHull3D); - - - SO_NODE_ADD_FIELD(numInput, (0)); - SO_NODE_ADD_FIELD(numOutput, (0)); - SO_NODE_ADD_FIELD(numTriangles, (0)); - SO_NODE_ADD_FIELD(ch_surface, (0)); - SO_NODE_ADD_FIELD(ch_volume, (0)); - - SO_NODE_ADD_FIELD(showPoints, (true)); - SO_NODE_ADD_FIELD(showFaces, (true)); - SO_NODE_ADD_FIELD(pointColor, (0.5,0.5,1.0)); - SO_NODE_ADD_FIELD(faceColor, (0.7,0.7,0.4)); - SO_NODE_ADD_FIELD(useColors, (false)); - SO_NODE_ADD_FIELD(state, ("no input")); - SO_NODE_ADD_FIELD(out_qhull, (NULL)); - - //hidden in automatic panel - SO_NODE_ADD_FIELD(showNormals, (false)); - SO_NODE_ADD_FIELD(useFaceNormals, (true)); - - - // Create a sensor calling _nodeChangedCB if any field changes. Use a priority 0 - // sensor to be sure that changes are not delayed or collected. - nodeSensor = new SoNodeSensor(SoQHull3D::nodeChangedCB, this); - nodeSensor->setPriority(0); - nodeSensor->attach(this); - - //callbacks - callbackAction = new SoCallbackAction(); - callbackAction->addPreCallback (SoShape::getClassTypeId(), preCB, this); - callbackAction->addTriangleCallback (SoShape::getClassTypeId(), triangleCB, this); - callbackAction->addLineSegmentCallback (SoShape::getClassTypeId(), lineSegmentCB, this); - callbackAction->addPointCallback (SoShape::getClassTypeId(), pointCB, this); - - //separators/group - output = new SoGroup(); - chPoints = new SoSeparator(); - chFaces = new SoSeparator(); - chNormals = new SoSeparator(); - - //output - out_qhull.setValue(output); - output->addChild(chPoints); - output->addChild(chFaces); - output->addChild(chNormals); - - //flag - convexHullFound = 0; - - //clear vectors - inputPointList.clear(); - convexHullPoints.clear(); - convexHullFaceIndexList.clear(); - convexHullIndexLUT.clear(); - convexHullFaceNormals.clear(); - convexHullVertexNormals.clear(); - -} - -/////////////////////////////////////////////////////////////////////////// -// DESTRUCTOR -/////////////////////////////////////////////////////////////////////////// -SoQHull3D::~SoQHull3D() -{ - // remove the node sensor. - if (nodeSensor){ delete nodeSensor; nodeSensor = NULL; } - - //clear vectors - inputPointList.clear(); - convexHullPoints.clear(); - convexHullFaceIndexList.clear(); - convexHullIndexLUT.clear(); - convexHullFaceNormals.clear(); - convexHullVertexNormals.clear(); -} - -/////////////////////////////////////////////////////////////////////////// -// COLLECT PRIMITIVES -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::collectPrimitives() -{ - callbackAction->apply(this); -} - -/////////////////////////////////////////////////////////////////////////// -// CALL QHULL (see www.qhull.org for data structures, functions and macros) -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::callQHull() -{ - int dim = 3; // dimension of points - boolT ismalloc = 1; // True if qhull should free points in qh_freeqhull() or reallocation - char flags[]= "qhull Qt "; // option flags for qhull, see qh_opt.htm - int exitcode; // 0 if no error from qhull - vertexT *vertex, **vertexp; // set by FORALLvertices - facetT *facet; // set by FORALLfacets - facetT *neighbor, **neighborp; // set by FOREACHneighbor_ - int curlong, totlong; // memory remaining after qh_memfreeshort - unsigned int i = 0; - - //for vertex normals - std::list <SbVec3f> normalList; - std::list <SbVec3f>::iterator iN; - normalList.clear(); - SbVec3f tmp_normal = SbVec3f(0, 0, 0); - - //create array of coordinates for each point - coordT *qhullInput = (coordT *) calloc(inputPointList.size(), sizeof (realT)); - - //transfer pointlist to format qhull understands - for ( i=0; i<inputPointList.size(); i++ ) qhullInput[i] = inputPointList[i]; - - // number of points - int numPoints = (int) inputPointList.size()/dim; - - //call qhull for results - exitcode = qh_new_qhull (dim, numPoints, qhullInput, ismalloc, flags, NULL, stderr); - - // if no error - if (!exitcode) { - - convexHullFound = 1; - - //triangulate facets of convex hull - qh_triangulate(); - - //call qhull macro to get all POINTS of the convex hull - FORALLvertices { - convexHullPoints.push_back(SbVec3f(vertex->point[0], vertex->point[1], vertex->point[2])); - convexHullIndexLUT.push_back(vertex->id); - - //vertex normals - FOREACHneighbor_(vertex){ - //get all normals of neighboring facets - normalList.push_back(SbVec3f(neighbor->normal[0], neighbor->normal[1], neighbor->normal[2])); - } - //all normals just once - normalList.unique(); - - //get the average normals as vertex normal - for ( iN = normalList.begin(); iN != normalList.end(); iN++) tmp_normal += *iN; - tmp_normal /= normalList.size(); - tmp_normal.normalize(); - - //add vertex normal to vector - convexHullVertexNormals.push_back(tmp_normal); - - //clear tmps - normalList.clear(); - tmp_normal = SbVec3f(0, 0, 0); - } - - //index-stuff -> create a lookup table 'lut' - IndexVector::iterator iL; - iL = std::max_element(convexHullIndexLUT.begin(), convexHullIndexLUT.end()); - int maxID = *iL; - int32_t* lut = new int32_t[maxID]; - for (iL = convexHullIndexLUT.begin(), i=0; iL != convexHullIndexLUT.end(); iL++, i++) lut[*iL] = i; - - - - //call qhull macro to get all triangulated FACETS of the convex hull - FORALLfacets { - - //add face normal for actual face to vector - convexHullFaceNormals.push_back(SbVec3f(facet->normal[0], facet->normal[1], facet->normal[2])); - - //add indices for actual face - FOREACHvertex_(facet->vertices){ - convexHullFaceIndexList.push_back(lut[vertex->id]); - } - //add end index for actual face - convexHullFaceIndexList.push_back(SO_END_FACE_INDEX); - - } - - - //todo: get volume and surface - qh_getarea (qh facet_list); - ch_surface.setValue(qh totarea); - ch_volume.setValue(qh totvol); - - - //set state - state.setValue("convex hull finished"); - - } else { - //no hull :( - convexHullFound = 0; - - //set statistics to 0 - ch_surface.setValue(0); - ch_volume.setValue(0); - - } - - //cleanup - qh_freeqhull(!qh_ALL); - qh_memfreeshort (&curlong, &totlong); - if (curlong || totlong) fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong); - -} - - -/////////////////////////////////////////////////////////////////////////// -// DRAW POINTS -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::drawPoints() -{ - //clear separator from old stuff - chPoints->removeAllChildren(); - - //enough points? - if (convexHullPoints.size() >= 1 && showPoints.getValue()){ - - int i = 0, numPoints = convexHullPoints.size(); - PointVector::iterator iP; - SbVec3f* points = new SbVec3f[numPoints]; - SoVertexProperty *vProp = new SoVertexProperty(); - SoPointSet *pointSet = new SoPointSet(); - - //rewrite points - for (iP = convexHullPoints.begin(), i=0; iP != convexHullPoints.end(); iP++, i++) points[i] = *iP; - - //color/material - if (useColors.getValue()){ - SoMaterial *material = new SoMaterial(); - material->diffuseColor = pointColor.getValue(); - material->ambientColor = pointColor.getValue(); - chPoints->addChild(material); - } - - //set up vertex property and point set - vProp->vertex.setValues(0, numPoints, points); - pointSet->vertexProperty = vProp; - - //add point set to scene - chPoints->addChild(pointSet); - - //cleanup - delete[] points; points = NULL; - - } else { - if (debug) std::cout << " not enough points to render or input scene disconnected" << std::endl; - } -} - -/////////////////////////////////////////////////////////////////////////// -// DRAW FACES -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::drawFaces() -{ - //clear separator from old stuff - chFaces->removeAllChildren(); - - //can we render a face? - if (convexHullPoints.size() >= 3 && showFaces.getValue()){ - - int i, - numPoints = convexHullPoints.size(), - numIndices = convexHullFaceIndexList.size(), - numFaceNormals = convexHullFaceNormals.size(), - numVertexNormals = convexHullVertexNormals.size(); - - PointVector::iterator iP; - IndexVector::iterator iV; - - SoIndexedFaceSet *faceSet = new SoIndexedFaceSet(); - SoVertexProperty *vProp = new SoVertexProperty(); - SbVec3f *points = new SbVec3f[numPoints]; - SbVec3f *faceNormals = new SbVec3f[numFaceNormals]; - SbVec3f *vertexNormals = new SbVec3f[numVertexNormals]; - int32_t *indices = new int32_t[numIndices]; - - //rewrite points - for (iP = convexHullPoints.begin(), i=0; iP != convexHullPoints.end(); iP++, i++) points[i] = *iP; - - //rewrite normals - for (iP = convexHullFaceNormals.begin(), i=0; iP != convexHullFaceNormals.end(); iP++, i++) faceNormals[i] = *iP; - for (iP = convexHullVertexNormals.begin(), i=0; iP != convexHullVertexNormals.end(); iP++, i++) vertexNormals[i] = *iP; - - //rewrite indices - for (iV = convexHullFaceIndexList.begin(), i=0; iV != convexHullFaceIndexList.end(); iV++, i++) indices[i] = *iV; - - //set up vertex property - vProp->vertex.setValues(0, numPoints, points); - - //set up normals - if (useFaceNormals.getValue()){ - vProp->normal.setValues(0, numFaceNormals, faceNormals); - vProp->normalBinding.setValue(SoVertexProperty::PER_FACE); - } else { - vProp->normal.setValues(0, numVertexNormals, vertexNormals); - vProp->normalBinding.setValue(SoVertexProperty::PER_VERTEX_INDEXED); - } - - //rewrite colors - if (useColors.getValue()) { - - uint32_t *colors = new uint32_t[numPoints]; - SbColor col; - SoMFUInt32 colorField; - - for (i=0; i<numPoints; i++){ - col = faceColor.getValue(); - colors[i] = col.getPackedValue(0.0f); - } - - colorField.setValues(0, numPoints, colors); - vProp->materialBinding.setValue(SoVertexProperty::PER_VERTEX_INDEXED); - vProp->orderedRGBA = colorField; - - delete[] colors; colors = NULL; - } - - - //set up face set - faceSet->vertexProperty = vProp; - faceSet->coordIndex.setValues(0, numIndices, indices); - - //add face set to scene - chFaces->addChild(faceSet); - - //cleanup - delete[] points; points = NULL; - delete[] faceNormals; faceNormals = NULL; - delete[] vertexNormals; vertexNormals = NULL; - delete[] indices; indices = NULL; - - } else { - if (debug) std::cout << "not enough points to render faces or input scene disconnected" << std::endl; - } -} - - -/////////////////////////////////////////////////////////////////////////// -// DRAW NORMALS -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::drawNormals() -{ - //clear separator from old stuff - chNormals->removeAllChildren(); - - //can we render a face normal? - if (convexHullPoints.size() >= 3 && showNormals.getValue()){ - - int i, j, - numPoints = convexHullPoints.size(), - numFaceIndices = convexHullFaceNormals.size()*3, - numFaceNormals = convexHullFaceNormals.size()*2, - numVertexIndices = convexHullVertexNormals.size()*3, - numVertexNormals = convexHullVertexNormals.size()*2; - - PointVector::iterator iP, iN; - IndexVector::iterator iV; - - SoIndexedLineSet *lineSet = new SoIndexedLineSet(); - SoVertexProperty *vProp = new SoVertexProperty(); - SbVec3f *points = new SbVec3f[numPoints]; - int32_t *faceIndices = new int32_t[numFaceIndices]; - SbVec3f *faceNorm_points = new SbVec3f[numFaceNormals]; - int32_t *vertexIndices = new int32_t[numVertexIndices]; - SbVec3f *vertexNorm_points = new SbVec3f[numVertexNormals]; - SbVec3f middle; - - - //face normals - if (useFaceNormals.getValue()){ - //calculate points for normals - for (iV = convexHullFaceIndexList.begin(), i=0, iN = convexHullFaceNormals.begin(); iV != convexHullFaceIndexList.end(); iV+=4, iN++){ - middle = (convexHullPoints[*iV] + convexHullPoints[*(iV+1)] + convexHullPoints[*(iV+2)])/3; - faceNorm_points[i] = middle; - faceNorm_points[i+1] = middle + *iN; - i+=2; - } - //write face indices - for (i=0, j=0; i<numFaceIndices; i+=3, j++){ - faceIndices[i] = i-j; - faceIndices[i+1] = i-j+1; - faceIndices[i+2] = SO_END_LINE_INDEX; - } - - //set up vertex property - vProp->vertex.setValues(0, numFaceNormals, faceNorm_points); - //set up line set - lineSet->coordIndex.setValues(0, numFaceIndices, faceIndices); - - - - //vertex normals - } else { - //rewrite points - for (iP = convexHullPoints.begin(), iN = convexHullVertexNormals.begin(), i=0; iP != convexHullPoints.end(); iP++, i+=2, iN++){ - vertexNorm_points[i] = *iP; - vertexNorm_points[i+1] = (*iP)+(*iN); - } - //write vertex indices - for (i=0, j=0; i<numVertexIndices; i+=3, j++){ - vertexIndices[i] = i-j; - vertexIndices[i+1] = i-j+1; - vertexIndices[i+2] = SO_END_LINE_INDEX; - } - - //set up vertex property - vProp->vertex.setValues(0, numVertexNormals, vertexNorm_points); - //set up line set - lineSet->coordIndex.setValues(0, numVertexIndices, vertexIndices); - } - - - //add vertex property and line set to scene - lineSet->vertexProperty = vProp; - chNormals->addChild(lineSet); - - //cleanup - delete[] points; points = NULL; - delete[] faceIndices; faceIndices = NULL; - delete[] vertexIndices; vertexIndices = NULL; - delete[] faceNorm_points; faceNorm_points = NULL; - delete[] vertexNorm_points; vertexNorm_points = NULL; - - } else { - if (debug) std::cout << "not enough points to render normals or input scene disconnected" << std::endl; - } - -} - -//CALLBACK FUNCTIONS - -/////////////////////////////////////////////////////////////////////////// -// PRE CALLBACK -/////////////////////////////////////////////////////////////////////////// -SoCallbackAction::Response SoQHull3D::preCB(void *userData, SoCallbackAction *action, const SoNode*) -{ - SoQHull3D *helpMe = (SoQHull3D*) userData; - - // set world transformation matrix in object to - // transform collected vertices correctly - helpMe->transMatrix = action->getModelMatrix(); - - return SoCallbackAction::CONTINUE; -} - -/////////////////////////////////////////////////////////////////////////// -// POINT CALLBACK -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::pointCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v) -{ - SoQHull3D *helpMe = (SoQHull3D*)userData; - - // get the position of the point - SbVec3f p(v->getPoint()); - - //apply transformation matrix - helpMe->transMatrix.multVecMatrix(p,p); - - //add to vector for QHull - inputPointList.push_back(p[0]); - inputPointList.push_back(p[1]); - inputPointList.push_back(p[2]); - -} - - -/////////////////////////////////////////////////////////////////////////// -// LINE SEGMENT CALLBACK -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::lineSegmentCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2) -{ - - SoQHull3D *helpMe = (SoQHull3D*)userData; - - // get the position of the point - SbVec3f p1(v1->getPoint()); - SbVec3f p2(v2->getPoint()); - - //apply transformation matrix - helpMe->transMatrix.multVecMatrix(p1,p1); - helpMe->transMatrix.multVecMatrix(p2,p2); - - //add to vector for QHull - //QHull automaticly removes duplicates - so there is - //no need to ged rid of them - inputPointList.push_back(p1[0]); - inputPointList.push_back(p1[1]); - inputPointList.push_back(p1[2]); - - inputPointList.push_back(p2[0]); - inputPointList.push_back(p2[1]); - inputPointList.push_back(p2[2]); - -} - -/////////////////////////////////////////////////////////////////////////// -// TRIANGLE CALLBACK -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::triangleCB(void *userData, - SoCallbackAction *action, - const SoPrimitiveVertex *v1, - const SoPrimitiveVertex *v2, - const SoPrimitiveVertex *v3) -{ - - SoQHull3D *helpMe = (SoQHull3D*)userData; - - // get the positions of the primitive vertices - SbVec3f p1(v1->getPoint()); - SbVec3f p2(v2->getPoint()); - SbVec3f p3(v3->getPoint()); - - //apply transformation matrix - helpMe->transMatrix.multVecMatrix(p1,p1); - helpMe->transMatrix.multVecMatrix(p2,p2); - helpMe->transMatrix.multVecMatrix(p3,p3); - - //add to vector for QHull - //QHull automaticly removes duplicates - so there is - //no need to ged rid of them - inputPointList.push_back(p1[0]); - inputPointList.push_back(p1[1]); - inputPointList.push_back(p1[2]); - - inputPointList.push_back(p2[0]); - inputPointList.push_back(p2[1]); - inputPointList.push_back(p2[2]); - - inputPointList.push_back(p3[0]); - inputPointList.push_back(p3[1]); - inputPointList.push_back(p3[2]); -} - - - -/////////////////////////////////////////////////////////////////////////// -// NODE CHANGED CALLBACK -/////////////////////////////////////////////////////////////////////////// -void SoQHull3D::nodeChangedCB(void *data, SoSensor* sens) -{ - ((SoQHull3D*) data)->nodeChanged((SoNodeSensor*)sens); -} - -void SoQHull3D::nodeChanged(SoNodeSensor* sensor) -{ - - //get the node which caused the notification. - SoField *field = sensor->getTriggerField(); - - //get the node which caused the notification. - SoNode *node = sensor->getTriggerNode(); - - - if (field == 0 && node != NULL){ - - chPoints->removeAllChildren(); - chFaces->removeAllChildren(); - chNormals->removeAllChildren(); - - if ( getNumChildren() >= 1 ){ - - //clear vectors - inputPointList.clear(); - convexHullPoints.clear(); - convexHullFaceIndexList.clear(); - convexHullIndexLUT.clear(); - convexHullFaceNormals.clear(); - convexHullVertexNormals.clear(); - - //collect all point values from input scene - state.setValue("collecting primitives"); - collectPrimitives(); //get points and stuff ... - - //send points to QHull to compute the convex hull - state.setValue("computing convex hull"); - callQHull(); - - //do we have a hull? - if (convexHullFound){ - - //set statistical information - numInput.setValue(inputPointList.size()/3); - numOutput.setValue(convexHullPoints.size()); - numTriangles.setValue(convexHullFaceIndexList.size()/4); - - //call draw functions - drawPoints(); - drawFaces(); - drawNormals(); - - - //no hull was found - } else { - state.setValue("no convex hull found"); - if (debug) std::cout << " no convex hull found" << std::endl; - } - - //no input - } else { - if (getNumChildren() < 1) state.setValue("no input"); - numInput.setValue(0); - numOutput.setValue(0); - numTriangles.setValue(0); - ch_surface.setValue(0); - ch_volume.setValue(0); - } - } - - //handle changed fields - if (field == &showPoints || field == &pointColor){ - drawPoints(); - } - - if (field == &showFaces || field == &faceColor){ - drawFaces(); - } - - if (field == &useColors){ - drawPoints(); - drawFaces(); - } - - //'hidden' fields in automatic panel - if (field == &showNormals){ - drawNormals(); - } - if (field == &useFaceNormals){ - drawFaces(); - drawNormals(); - } -} - +//---------------------------------------------------------------------------------- +//! The Inventor module class SoQHull3D +/*! +// \file SoQHull3D.cpp +// \author Jens Haase +// \date 2005-02-01 +// +// convex hull of invetor scene using qhull +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "SoQHull3D.h" + +// Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid +// collisions between OpenInventor and Windows headers. +#include "XVEnterScope.h" + +// TODO: include more inventor things here +#include "XVLeaveScope.h" + +#include <list> +#include <iostream> +#include <algorithm> + +SO_NODE_SOURCE(SoQHull3D) + + +//debug +bool debug = 0; + + +/////////////////////////////////////////////////////////////////////////// +// INIT CLASS +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::initClass() +{ + SO_NODE_INIT_CLASS(SoQHull3D, SoSeparator, "Separator"); +} + +/////////////////////////////////////////////////////////////////////////// +// CONSTRUCTOR +/////////////////////////////////////////////////////////////////////////// +SoQHull3D::SoQHull3D() +{ + + // Execute inventor internal stuff for node construction. + SO_NODE_CONSTRUCTOR(SoQHull3D); + + + SO_NODE_ADD_FIELD(numInput, (0)); + SO_NODE_ADD_FIELD(numOutput, (0)); + SO_NODE_ADD_FIELD(numTriangles, (0)); + SO_NODE_ADD_FIELD(ch_surface, (0)); + SO_NODE_ADD_FIELD(ch_volume, (0)); + + SO_NODE_ADD_FIELD(showPoints, (true)); + SO_NODE_ADD_FIELD(showFaces, (true)); + SO_NODE_ADD_FIELD(pointColor, (0.5,0.5,1.0)); + SO_NODE_ADD_FIELD(faceColor, (0.7,0.7,0.4)); + SO_NODE_ADD_FIELD(useColors, (false)); + SO_NODE_ADD_FIELD(state, ("no input")); + SO_NODE_ADD_FIELD(out_qhull, (NULL)); + + //hidden in automatic panel + SO_NODE_ADD_FIELD(showNormals, (false)); + SO_NODE_ADD_FIELD(useFaceNormals, (true)); + + + // Create a sensor calling _nodeChangedCB if any field changes. Use a priority 0 + // sensor to be sure that changes are not delayed or collected. + nodeSensor = new SoNodeSensor(SoQHull3D::nodeChangedCB, this); + nodeSensor->setPriority(0); + nodeSensor->attach(this); + + //callbacks + callbackAction = new SoCallbackAction(); + callbackAction->addPreCallback (SoShape::getClassTypeId(), preCB, this); + callbackAction->addTriangleCallback (SoShape::getClassTypeId(), triangleCB, this); + callbackAction->addLineSegmentCallback (SoShape::getClassTypeId(), lineSegmentCB, this); + callbackAction->addPointCallback (SoShape::getClassTypeId(), pointCB, this); + + //separators/group + output = new SoGroup(); + chPoints = new SoSeparator(); + chFaces = new SoSeparator(); + chNormals = new SoSeparator(); + + //output + out_qhull.setValue(output); + output->addChild(chPoints); + output->addChild(chFaces); + output->addChild(chNormals); + + //flag + convexHullFound = 0; + + //clear vectors + inputPointList.clear(); + convexHullPoints.clear(); + convexHullFaceIndexList.clear(); + convexHullIndexLUT.clear(); + convexHullFaceNormals.clear(); + convexHullVertexNormals.clear(); + +} + +/////////////////////////////////////////////////////////////////////////// +// DESTRUCTOR +/////////////////////////////////////////////////////////////////////////// +SoQHull3D::~SoQHull3D() +{ + // remove the node sensor. + if (nodeSensor){ delete nodeSensor; nodeSensor = NULL; } + + //clear vectors + inputPointList.clear(); + convexHullPoints.clear(); + convexHullFaceIndexList.clear(); + convexHullIndexLUT.clear(); + convexHullFaceNormals.clear(); + convexHullVertexNormals.clear(); +} + +/////////////////////////////////////////////////////////////////////////// +// COLLECT PRIMITIVES +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::collectPrimitives() +{ + callbackAction->apply(this); +} + +/////////////////////////////////////////////////////////////////////////// +// CALL QHULL (see www.qhull.org for data structures, functions and macros) +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::callQHull() +{ + int dim = 3; // dimension of points + boolT ismalloc = 1; // True if qhull should free points in qh_freeqhull() or reallocation + char flags[]= "qhull Qt "; // option flags for qhull, see qh_opt.htm + int exitcode; // 0 if no error from qhull + vertexT *vertex, **vertexp; // set by FORALLvertices + facetT *facet; // set by FORALLfacets + facetT *neighbor, **neighborp; // set by FOREACHneighbor_ + int curlong, totlong; // memory remaining after qh_memfreeshort + unsigned int i = 0; + + //for vertex normals + std::list <SbVec3f> normalList; + std::list <SbVec3f>::iterator iN; + normalList.clear(); + SbVec3f tmp_normal = SbVec3f(0, 0, 0); + + //create array of coordinates for each point + coordT *qhullInput = (coordT *) calloc(inputPointList.size(), sizeof (realT)); + + //transfer pointlist to format qhull understands + for ( i=0; i<inputPointList.size(); i++ ) qhullInput[i] = inputPointList[i]; + + // number of points + int numPoints = (int) inputPointList.size()/dim; + + //call qhull for results + exitcode = qh_new_qhull (dim, numPoints, qhullInput, ismalloc, flags, NULL, stderr); + + // if no error + if (!exitcode) { + + convexHullFound = 1; + + //triangulate facets of convex hull + qh_triangulate(); + + //call qhull macro to get all POINTS of the convex hull + FORALLvertices { + convexHullPoints.push_back(SbVec3f(vertex->point[0], vertex->point[1], vertex->point[2])); + convexHullIndexLUT.push_back(vertex->id); + + //vertex normals + FOREACHneighbor_(vertex){ + //get all normals of neighboring facets + normalList.push_back(SbVec3f(neighbor->normal[0], neighbor->normal[1], neighbor->normal[2])); + } + //all normals just once + normalList.unique(); + + //get the average normals as vertex normal + for ( iN = normalList.begin(); iN != normalList.end(); iN++) tmp_normal += *iN; + tmp_normal /= normalList.size(); + tmp_normal.normalize(); + + //add vertex normal to vector + convexHullVertexNormals.push_back(tmp_normal); + + //clear tmps + normalList.clear(); + tmp_normal = SbVec3f(0, 0, 0); + } + + //index-stuff -> create a lookup table 'lut' + IndexVector::iterator iL; + iL = std::max_element(convexHullIndexLUT.begin(), convexHullIndexLUT.end()); + int maxID = *iL; + int32_t* lut = new int32_t[maxID]; + for (iL = convexHullIndexLUT.begin(), i=0; iL != convexHullIndexLUT.end(); iL++, i++) lut[*iL] = i; + + + + //call qhull macro to get all triangulated FACETS of the convex hull + FORALLfacets { + + //add face normal for actual face to vector + convexHullFaceNormals.push_back(SbVec3f(facet->normal[0], facet->normal[1], facet->normal[2])); + + //add indices for actual face + FOREACHvertex_(facet->vertices){ + convexHullFaceIndexList.push_back(lut[vertex->id]); + } + //add end index for actual face + convexHullFaceIndexList.push_back(SO_END_FACE_INDEX); + + } + + + //todo: get volume and surface + qh_getarea (qh facet_list); + ch_surface.setValue(qh totarea); + ch_volume.setValue(qh totvol); + + + //set state + state.setValue("convex hull finished"); + + } else { + //no hull :( + convexHullFound = 0; + + //set statistics to 0 + ch_surface.setValue(0); + ch_volume.setValue(0); + + } + + //cleanup + qh_freeqhull(!qh_ALL); + qh_memfreeshort (&curlong, &totlong); + if (curlong || totlong) fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong); + +} + + +/////////////////////////////////////////////////////////////////////////// +// DRAW POINTS +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::drawPoints() +{ + //clear separator from old stuff + chPoints->removeAllChildren(); + + //enough points? + if (convexHullPoints.size() >= 1 && showPoints.getValue()){ + + int i = 0, numPoints = convexHullPoints.size(); + PointVector::iterator iP; + SbVec3f* points = new SbVec3f[numPoints]; + SoVertexProperty *vProp = new SoVertexProperty(); + SoPointSet *pointSet = new SoPointSet(); + + //rewrite points + for (iP = convexHullPoints.begin(), i=0; iP != convexHullPoints.end(); iP++, i++) points[i] = *iP; + + //color/material + if (useColors.getValue()){ + SoMaterial *material = new SoMaterial(); + material->diffuseColor = pointColor.getValue(); + material->ambientColor = pointColor.getValue(); + chPoints->addChild(material); + } + + //set up vertex property and point set + vProp->vertex.setValues(0, numPoints, points); + pointSet->vertexProperty = vProp; + + //add point set to scene + chPoints->addChild(pointSet); + + //cleanup + delete[] points; points = NULL; + + } else { + if (debug) std::cout << " not enough points to render or input scene disconnected" << std::endl; + } +} + +/////////////////////////////////////////////////////////////////////////// +// DRAW FACES +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::drawFaces() +{ + //clear separator from old stuff + chFaces->removeAllChildren(); + + //can we render a face? + if (convexHullPoints.size() >= 3 && showFaces.getValue()){ + + int i, + numPoints = convexHullPoints.size(), + numIndices = convexHullFaceIndexList.size(), + numFaceNormals = convexHullFaceNormals.size(), + numVertexNormals = convexHullVertexNormals.size(); + + PointVector::iterator iP; + IndexVector::iterator iV; + + SoIndexedFaceSet *faceSet = new SoIndexedFaceSet(); + SoVertexProperty *vProp = new SoVertexProperty(); + SbVec3f *points = new SbVec3f[numPoints]; + SbVec3f *faceNormals = new SbVec3f[numFaceNormals]; + SbVec3f *vertexNormals = new SbVec3f[numVertexNormals]; + int32_t *indices = new int32_t[numIndices]; + + //rewrite points + for (iP = convexHullPoints.begin(), i=0; iP != convexHullPoints.end(); iP++, i++) points[i] = *iP; + + //rewrite normals + for (iP = convexHullFaceNormals.begin(), i=0; iP != convexHullFaceNormals.end(); iP++, i++) faceNormals[i] = *iP; + for (iP = convexHullVertexNormals.begin(), i=0; iP != convexHullVertexNormals.end(); iP++, i++) vertexNormals[i] = *iP; + + //rewrite indices + for (iV = convexHullFaceIndexList.begin(), i=0; iV != convexHullFaceIndexList.end(); iV++, i++) indices[i] = *iV; + + //set up vertex property + vProp->vertex.setValues(0, numPoints, points); + + //set up normals + if (useFaceNormals.getValue()){ + vProp->normal.setValues(0, numFaceNormals, faceNormals); + vProp->normalBinding.setValue(SoVertexProperty::PER_FACE); + } else { + vProp->normal.setValues(0, numVertexNormals, vertexNormals); + vProp->normalBinding.setValue(SoVertexProperty::PER_VERTEX_INDEXED); + } + + //rewrite colors + if (useColors.getValue()) { + + uint32_t *colors = new uint32_t[numPoints]; + SbColor col; + SoMFUInt32 colorField; + + for (i=0; i<numPoints; i++){ + col = faceColor.getValue(); + colors[i] = col.getPackedValue(0.0f); + } + + colorField.setValues(0, numPoints, colors); + vProp->materialBinding.setValue(SoVertexProperty::PER_VERTEX_INDEXED); + vProp->orderedRGBA = colorField; + + delete[] colors; colors = NULL; + } + + + //set up face set + faceSet->vertexProperty = vProp; + faceSet->coordIndex.setValues(0, numIndices, indices); + + //add face set to scene + chFaces->addChild(faceSet); + + //cleanup + delete[] points; points = NULL; + delete[] faceNormals; faceNormals = NULL; + delete[] vertexNormals; vertexNormals = NULL; + delete[] indices; indices = NULL; + + } else { + if (debug) std::cout << "not enough points to render faces or input scene disconnected" << std::endl; + } +} + + +/////////////////////////////////////////////////////////////////////////// +// DRAW NORMALS +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::drawNormals() +{ + //clear separator from old stuff + chNormals->removeAllChildren(); + + //can we render a face normal? + if (convexHullPoints.size() >= 3 && showNormals.getValue()){ + + int i, j, + numPoints = convexHullPoints.size(), + numFaceIndices = convexHullFaceNormals.size()*3, + numFaceNormals = convexHullFaceNormals.size()*2, + numVertexIndices = convexHullVertexNormals.size()*3, + numVertexNormals = convexHullVertexNormals.size()*2; + + PointVector::iterator iP, iN; + IndexVector::iterator iV; + + SoIndexedLineSet *lineSet = new SoIndexedLineSet(); + SoVertexProperty *vProp = new SoVertexProperty(); + SbVec3f *points = new SbVec3f[numPoints]; + int32_t *faceIndices = new int32_t[numFaceIndices]; + SbVec3f *faceNorm_points = new SbVec3f[numFaceNormals]; + int32_t *vertexIndices = new int32_t[numVertexIndices]; + SbVec3f *vertexNorm_points = new SbVec3f[numVertexNormals]; + SbVec3f middle; + + + //face normals + if (useFaceNormals.getValue()){ + //calculate points for normals + for (iV = convexHullFaceIndexList.begin(), i=0, iN = convexHullFaceNormals.begin(); iV != convexHullFaceIndexList.end(); iV+=4, iN++){ + middle = (convexHullPoints[*iV] + convexHullPoints[*(iV+1)] + convexHullPoints[*(iV+2)])/3; + faceNorm_points[i] = middle; + faceNorm_points[i+1] = middle + *iN; + i+=2; + } + //write face indices + for (i=0, j=0; i<numFaceIndices; i+=3, j++){ + faceIndices[i] = i-j; + faceIndices[i+1] = i-j+1; + faceIndices[i+2] = SO_END_LINE_INDEX; + } + + //set up vertex property + vProp->vertex.setValues(0, numFaceNormals, faceNorm_points); + //set up line set + lineSet->coordIndex.setValues(0, numFaceIndices, faceIndices); + + + + //vertex normals + } else { + //rewrite points + for (iP = convexHullPoints.begin(), iN = convexHullVertexNormals.begin(), i=0; iP != convexHullPoints.end(); iP++, i+=2, iN++){ + vertexNorm_points[i] = *iP; + vertexNorm_points[i+1] = (*iP)+(*iN); + } + //write vertex indices + for (i=0, j=0; i<numVertexIndices; i+=3, j++){ + vertexIndices[i] = i-j; + vertexIndices[i+1] = i-j+1; + vertexIndices[i+2] = SO_END_LINE_INDEX; + } + + //set up vertex property + vProp->vertex.setValues(0, numVertexNormals, vertexNorm_points); + //set up line set + lineSet->coordIndex.setValues(0, numVertexIndices, vertexIndices); + } + + + //add vertex property and line set to scene + lineSet->vertexProperty = vProp; + chNormals->addChild(lineSet); + + //cleanup + delete[] points; points = NULL; + delete[] faceIndices; faceIndices = NULL; + delete[] vertexIndices; vertexIndices = NULL; + delete[] faceNorm_points; faceNorm_points = NULL; + delete[] vertexNorm_points; vertexNorm_points = NULL; + + } else { + if (debug) std::cout << "not enough points to render normals or input scene disconnected" << std::endl; + } + +} + +//CALLBACK FUNCTIONS + +/////////////////////////////////////////////////////////////////////////// +// PRE CALLBACK +/////////////////////////////////////////////////////////////////////////// +SoCallbackAction::Response SoQHull3D::preCB(void *userData, SoCallbackAction *action, const SoNode*) +{ + SoQHull3D *helpMe = (SoQHull3D*) userData; + + // set world transformation matrix in object to + // transform collected vertices correctly + helpMe->transMatrix = action->getModelMatrix(); + + return SoCallbackAction::CONTINUE; +} + +/////////////////////////////////////////////////////////////////////////// +// POINT CALLBACK +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::pointCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v) +{ + SoQHull3D *helpMe = (SoQHull3D*)userData; + + // get the position of the point + SbVec3f p(v->getPoint()); + + //apply transformation matrix + helpMe->transMatrix.multVecMatrix(p,p); + + //add to vector for QHull + inputPointList.push_back(p[0]); + inputPointList.push_back(p[1]); + inputPointList.push_back(p[2]); + +} + + +/////////////////////////////////////////////////////////////////////////// +// LINE SEGMENT CALLBACK +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::lineSegmentCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2) +{ + + SoQHull3D *helpMe = (SoQHull3D*)userData; + + // get the position of the point + SbVec3f p1(v1->getPoint()); + SbVec3f p2(v2->getPoint()); + + //apply transformation matrix + helpMe->transMatrix.multVecMatrix(p1,p1); + helpMe->transMatrix.multVecMatrix(p2,p2); + + //add to vector for QHull + //QHull automaticly removes duplicates - so there is + //no need to ged rid of them + inputPointList.push_back(p1[0]); + inputPointList.push_back(p1[1]); + inputPointList.push_back(p1[2]); + + inputPointList.push_back(p2[0]); + inputPointList.push_back(p2[1]); + inputPointList.push_back(p2[2]); + +} + +/////////////////////////////////////////////////////////////////////////// +// TRIANGLE CALLBACK +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::triangleCB(void *userData, + SoCallbackAction *action, + const SoPrimitiveVertex *v1, + const SoPrimitiveVertex *v2, + const SoPrimitiveVertex *v3) +{ + + SoQHull3D *helpMe = (SoQHull3D*)userData; + + // get the positions of the primitive vertices + SbVec3f p1(v1->getPoint()); + SbVec3f p2(v2->getPoint()); + SbVec3f p3(v3->getPoint()); + + //apply transformation matrix + helpMe->transMatrix.multVecMatrix(p1,p1); + helpMe->transMatrix.multVecMatrix(p2,p2); + helpMe->transMatrix.multVecMatrix(p3,p3); + + //add to vector for QHull + //QHull automaticly removes duplicates - so there is + //no need to ged rid of them + inputPointList.push_back(p1[0]); + inputPointList.push_back(p1[1]); + inputPointList.push_back(p1[2]); + + inputPointList.push_back(p2[0]); + inputPointList.push_back(p2[1]); + inputPointList.push_back(p2[2]); + + inputPointList.push_back(p3[0]); + inputPointList.push_back(p3[1]); + inputPointList.push_back(p3[2]); +} + + + +/////////////////////////////////////////////////////////////////////////// +// NODE CHANGED CALLBACK +/////////////////////////////////////////////////////////////////////////// +void SoQHull3D::nodeChangedCB(void *data, SoSensor* sens) +{ + ((SoQHull3D*) data)->nodeChanged((SoNodeSensor*)sens); +} + +void SoQHull3D::nodeChanged(SoNodeSensor* sensor) +{ + + //get the node which caused the notification. + SoField *field = sensor->getTriggerField(); + + //get the node which caused the notification. + SoNode *node = sensor->getTriggerNode(); + + + if (field == 0 && node != NULL){ + + chPoints->removeAllChildren(); + chFaces->removeAllChildren(); + chNormals->removeAllChildren(); + + if ( getNumChildren() >= 1 ){ + + //clear vectors + inputPointList.clear(); + convexHullPoints.clear(); + convexHullFaceIndexList.clear(); + convexHullIndexLUT.clear(); + convexHullFaceNormals.clear(); + convexHullVertexNormals.clear(); + + //collect all point values from input scene + state.setValue("collecting primitives"); + collectPrimitives(); //get points and stuff ... + + //send points to QHull to compute the convex hull + state.setValue("computing convex hull"); + callQHull(); + + //do we have a hull? + if (convexHullFound){ + + //set statistical information + numInput.setValue(inputPointList.size()/3); + numOutput.setValue(convexHullPoints.size()); + numTriangles.setValue(convexHullFaceIndexList.size()/4); + + //call draw functions + drawPoints(); + drawFaces(); + drawNormals(); + + + //no hull was found + } else { + state.setValue("no convex hull found"); + if (debug) std::cout << " no convex hull found" << std::endl; + } + + //no input + } else { + if (getNumChildren() < 1) state.setValue("no input"); + numInput.setValue(0); + numOutput.setValue(0); + numTriangles.setValue(0); + ch_surface.setValue(0); + ch_volume.setValue(0); + } + } + + //handle changed fields + if (field == &showPoints || field == &pointColor){ + drawPoints(); + } + + if (field == &showFaces || field == &faceColor){ + drawFaces(); + } + + if (field == &useColors){ + drawPoints(); + drawFaces(); + } + + //'hidden' fields in automatic panel + if (field == &showNormals){ + drawNormals(); + } + if (field == &useFaceNormals){ + drawFaces(); + drawNormals(); + } +} + Modified: trunk/UMD/METK/Sources/Inventor/SoQHull3D/UMDQHull3DSystem.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/SoQHull3D/UMDQHull3DSystem.h 2011-06-08 15:32:57 UTC (rev 355) +++ trunk/UMD/METK/Sources/Inventor/SoQHull3D/UMDQHull3DSystem.h 2011-06-08 15:48:25 UTC (rev 356) @@ -1,43 +1,56 @@ -//---------------------------------------------------------------------------------- -//! Project global and OS specific declarations -/*! -// \file UMDQHull3DSystem.h -// \author Jens Haase -// \date 2005-02-01 -// -*/ -//---------------------------------------------------------------------------------- - - -#ifndef __UMDQHULL3DSYSTEM_H__ -#define __UMDQHULL3DSYSTEM_H__ - - -// DLL export macro definition -#ifdef WIN32 -#ifdef UMDQHULL3D_EXPORTS -// Use the UMDQHULL3D_EXPORT macro to export classes and functions -#define UMDQHULL3D_EXPORT __declspec(dllexport) -#else -// If included by external modules, exported symbols are declared as import symbols -#define UMDQHULL3D_EXPORT __declspec(dllimport) -#endif - -#include <vector> -#include <list> -#include <stdio.h> -#include <stdlib.h> -#include <iostream> -#include <math.h> -#include <algorithm> - -using namespace std; - -#else -// No export declarations are necessary for non-Windows systems -#define UMDQHULL3D_EXPORT -#endif - - -#endif -// __UMDQHULL3DSYSTEM_H__ +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations +/*! +// \file UMDQHull3DSystem.h +// \author Jens Haase +// \date 2005-02-01 +// +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __UMDQHULL3DSYSTEM_H__ +#define __UMDQHULL3DSYSTEM_H__ + + +// DLL export macro definition +#if defined (ML_LIBRARY_EXPORT_ATTRIBUTE) || defined (ML_LIBRARY_IMPORT_ATTRIBUTE) + // Make use of the new style and platform independent import/export definitions. + #ifdef UMDQHULL3D_EXPORTS + // Export library symbols. + #define UMDQHULL3D_EXPORT ML_LIBRARY_EXPORT_ATTRIBUTE + #else + // If included by external modules, exported symbols are declared as import symbols + #define UMDQHULL3D_EXPORT ML_LIBRARY_IMPORT_ATTRIBUTE + #endif +#else + // Only for backward compatibility to versions < MeVisLab2.2. + #ifdef WIN32 + #ifdef UMDQHULL3D_EXPORTS + // Use the UMDQHULL3D_EXPORT macro to export classes and functions + #define UMDQHULL3D_EXPORT __declspec(dllexport) + #else + // If included by external modules, exported symbols are declared as import symbols + #define UMDQHULL3D_EXPORT __declspec(dllimport) + #endif + #else + // No export declarations are necessary for non-Windows systems + #define UMDQHULL3D_EXPORT + #endif +#endif + +#ifdef WIN32 +#include <vector> +#include <list> +#include <stdio.h> +#include <stdlib.h> +#include <iostream> +#include <math.h> +#include <algorithm> + +using namespace std; +#endif + + +#endif +// __UMDQHULL3DSYSTEM_H__ Modified: trunk/UMD/METK/Sources/Inventor/UMDPickInfo/UMDPickInfoSystem.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDPickInfo/UMDPickInfoSystem.h 2011-06-08 15:32:57 UTC (rev 355) +++ trunk/UMD/METK/Sources/Inventor/UMDPickInfo/UMDPickInfoSystem.h 2011-06-08 15:48:25 UTC (rev 356) @@ -1,35 +1,46 @@ -//---------------------------------------------------------------------------------- -//! Project global and OS specific declarations -/*! -// \file UMDPickInfoSystem.h -// \author Stefan Hiller -// \date 2007-09-11 -*/ -//---------------------------------------------------------------------------------- - - -#ifndef __UMDPICKINFOSYSTEM_H__ -#define __UMDPICKINFOSYSTEM_H__ - -// include MeVis OpenGL headers first (includes GL/glew.h) -#include <mlOpenGL.h> - -// DLL export macro definition -#ifdef WIN32 -#ifdef UMDPICKINFO_EXPORTS -// Use the UMDPICKINFO_EXPORT macro to export classes and functions -#define UMDPICKINFO_EXPORT __declspec(dllexport) -#else -// If included by external modules, exported symbols are declared as import symbols -#define UMDPICKINFO_EXPORT __declspec(dllimport) -#endif - -#else -// No export declarations are necessary for non-Windows systems -#define UMDPICKINFO_EXPORT -#endif - - -#endif -// __UMDPICKINFOSYSTEM_H__ - +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations +/*! +// \file UMDPickInfoSystem.h +// \author Stefan Hiller +// \date 2007-09-11 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __UMDPICKINFOSYSTEM_H__ +#define __UMDPICKINFOSYSTEM_H__ + +// include MeVis OpenGL headers first (includes GL/glew.h) +#include <mlOpenGL.h> + +// DLL export macro definition +#if defined (ML_LIBRARY_EXPORT_ATTRIBUTE) || defined (ML_LIBRARY_IMPORT_ATTRIBUTE) + // Make use of the new style and platform independent import/export definitions. + #ifdef UMDPICKINFO_EXPORTS + // Export library symbols. + #define UMDPICKINFO_EXPORT ML_LIBRARY_EXPORT_ATTRIBUTE + #else + // If included by external modules, exported symbols are declared as import symbols + #define UMDPICKINFO_EXPORT ML_LIBRARY_IMPORT_ATTRIBUTE + #endif +#else + // Only for backward compatibility to versions < MeVisLab2.2. + #ifdef WIN32 + #ifdef UMDPICKINFO_EXPORTS + // Use the UMDPICKINFO_EXPORT macro to export classes and functions + #define UMDPICKINFO_EXPORT __declspec(dllexport) + #else + // If included by external modules, exported symbols are declared as import symbols + #define UMDPICKINFO_EXPORT __declspec(dllimport) + #endif + + #else + // No export declarations are necessary for non-Windows systems + #define UMDPICKINFO_EXPORT + #endif +#endif + +#endif +// __UMDPICKINFOSYSTEM_H__ + Modified: trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/UMDSoExtractColoredFacesSystem.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/UMDSoExtractColoredFacesSystem.h 2011-06-08 15:32:57 UTC (rev 355) +++ trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/UMDSoExtractColoredFacesSystem.h 2011-06-08 15:48:25 UTC (rev 356) @@ -1,35 +1,46 @@ -//---------------------------------------------------------------------------------- -//! Project global and OS specific declarations -/*! -// \file UMDSoExtractColoredFacesSystem.h -// \author Konrad M\xFChler -// \date 2008-02-01 -*/ -//---------------------------------------------------------------------------------- - - -#ifndef __UMDSOEXTRACTCOLOREDFACESSYSTEM_H__ -#define __UMDSOEXTRACTCOLOREDFACESSYSTEM_H__ - -// include MeVis OpenGL headers first (includes GL/glew.h) -#include <mlOpenGL.h> - -// DLL export macro definition -#ifdef WIN32 -#ifdef UMDSOEXTRACTCOLOREDFACES_EXPORTS -// Use the UMDSOEXTRACTCOLOREDFACES_EXPORT macro to export classes and functions -#define UMDSOEXTRACTCOLOREDFACES_EXPORT __declspec(dllexport) -#else -// If included by external modules, exported symbols are declared as import symbols -#define UMDSOEXTRACTCOLOREDFACES_EXPORT __declspec(dllimport) -#endif - -#else -// No export declarations are necessary for non-Windows systems -#define UMDSOEXTRACTCOLOREDFACES_EXPORT -#endif - - -#endif -// __UMDSOEXTRACTCOLOREDFACESSYSTEM_H__ - +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations +/*! +// \file UMDSoExtractColoredFacesSystem.h +// \author Konrad M\xFChler +// \date 2008-02-01 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __UMDSOEXTRACTCOLOREDFACESSYSTEM_H__ +#define __UMDSOEXTRACTCOLOREDFACESSYSTEM_H__ + +// include MeVis OpenGL headers first (includes GL/glew.h) +#include <mlOpenGL.h> + +// DLL export macro definition +#if defined (ML_LIBRARY_EXPORT_ATTRIBUTE) || defined (ML_LIBRARY_IMPORT_ATTRIBUTE) + // Make use of the new style and platform independent import/export definitions. + #ifdef UMDSOEXTRACTCOLOREDFACES_EXPORTS + // Export library symbols. + #define UMDSOEXTRACTCOLOREDFACES_EXPORT ML_LIBRARY_EXPORT_ATTRIBUTE + #else + // If included by external modules, exported symbols are declared as import symbols + #define UMDSOEXTRACTCOLOREDFACES_EXPORT ML_LIBRARY_IMPORT_ATTRIBUTE + #endif +#else + // Only for backward compatibility to versions < MeVisLab2.2. + #ifdef WIN32 + #ifdef UMDSOEXTRACTCOLOREDFACES_EXPORTS + // Use the UMDSOEXTRACTCOLOREDFACES_EXPORT macro to export classes and functions + #define UMDSOEXTRACTCOLOREDFACES_EXPORT __declspec(dllexport) + #else + // If included by external modules, exported symbols are declared as import symbols + #define UMDSOEXTRACTCOLOREDFACES_EXPORT __declspec(dllimport) + #endif + + #else + // No export declarations are necessary for non-Windows systems + #define UMDSOEXTRACTCOLOREDFACES_EXPORT + #endif +#endif + +#endif +// __UMDSOEXTRACTCOLOREDFACESSYSTEM_H__ + Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp 2011-06-08 15:32:57 UTC (rev 355) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.cpp 2011-06-08 15:48:25 UTC (rev 356) @@ -1,555 +1,557 @@ -// ######################################### -// ##### -// ##### UMDMainAxis.cpp -// ##### -// ######################################### - -#include "UMDMainAxis.h" - - -#define JACOBI_ROTATE(a,i,j,k,l) g=a[i][j];\ - h=a[k][l];\ - a[i][j]=g-s*(h+g*tau);\ -a[k][l]=h+s*(g-h*tau); - -#define NR_END 1 -#define FREE_ARG char* - - -//-------------------------------------------------------------------------- -// Numerical Recipes standard error handler -//-------------------------------------------------------------------------- -void nrerror(char error_text[]) -{ - fprintf(stderr,"Numerical Recipes run-time error...\n"); - fprintf(stderr,"%s\n",error_text); - fprintf(stderr,"...now exiting to system...\n"); - exit(1); -} - - -//-------------------------------------------------------------------------- -// Allocate a variable lenght float vector with subscript range v[nl..nh] -//-------------------------------------------------------------------------- -float *vL_vector(long nl, long nh) - -{ - // malloc -> Anfordern von Speicherplatz; - // R\xFCckgabewert ist Anfangsadresse des neu angelegten Speicherblocks - float *v = (float *) malloc((size_t)((nh-nl+1+NR_END)*sizeof(float))); - - if (!v) nrerror("allocation failure in vector()"); - - return v+NR_END-nl; -} - - -//-------------------------------------------------------------------------- -// Free a float vector allocated with vector() -//-------------------------------------------------------------------------- -void free_vector(float *v, long nl, long /*nh*/) -{ - free((FREE_ARG) (v+nl-NR_END)); -} - - -//-------------------------------------------------------------------------- -// Allocate a float matrix with subscript range m[nrl..nrh][ncl..nch] -//-------------------------------------------------------------------------- -float **matrix(long nrl, long nrh, long ncl, long nch) - -{ - // r -> row: Zeile - // c -> column: Spalte - - long i; - long nrow, ncol; - float **m; - - nrow = nrh-nrl+1; - ncol = nch-ncl+1; - - // Allocate pointers to rows - m=(float **) malloc((size_t)((nrow+NR_END)*sizeof(float*))); - if (!m) nrerror("allocation failure 1 in matrix()"); - m += NR_END; - m -= nrl; - - // Allocate rows and set pointers to them - m[nrl]=(float *) malloc((size_t)((nrow*ncol+NR_END)*sizeof(float))); - if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); - m[nrl] += NR_END; - m[nrl] -= ncl; - - for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; - - // Return pointer to array of pointers to rows. - return m; -} - - - -//-------------------------------------------------------------------------- -// Free a float matrix allocated by matrix() -//-------------------------------------------------------------------------- -void free_matrix(float **m, long nrl, long /*nrh*/, long ncl, long /*nch*/) -{ - free((FREE_ARG) (m[nrl]+ncl-NR_END)); - free((FREE_ARG) (m+nrl-NR_END)); -} - - - -//-------------------------------------------------------------------------- -// Compute the jacobi matrix. -//-------------------------------------------------------------------------- -void jacobi(float **a, int n, float d[], float **v, int *nrot) - -{ - int j,iq,ip,i; - float tresh,theta,tau,t,sm,s,h,g,c,*b,*z; - - b = vL_vector(1,n); - z = vL_vector(1,n); - - // Make v be a unit Matrix. - for (ip=1;ip<=n;ip++) - { - for (iq=1;iq<=n;iq++) - v[ip][iq]=0.0; - - v[ip][ip]=1.0; - } - - for (ip=1;ip<=n;ip++) - { - b[ip]=d[ip]=a[ip][ip]; - z[ip]=0.0; - } - - *nrot=0; - - for (i=1;i<=50;i++) - { - sm=0.0; - for (ip=1;ip<=n-1;ip++) - { - for (iq=ip+1;iq<=n;iq++) - sm += fabs(a[ip][iq]); - } - - if (sm == 0.0) - { - free_vector(z,1,n); - free_vector(b,1,n); - return; - } - - if (i < 4) - tresh=0.2*sm/(n*n); - else - tresh=0.0; - - for (ip=1;ip<=n-1;ip++) - { - for (iq=ip+1;iq<=n;iq++) - { - g=100.0*fabs(a[ip][iq]); - - if (i > 4 && (float)(fabs(d[ip])+g) == (float)fabs(d[ip]) - && (float)(fabs(d[iq])+g) == (float)fabs(d[iq])) - a[ip][iq]=0.0; - - else if (fabs(a[ip][iq]) > tresh) - { - h=d[iq]-d[ip]; - if ((float)(fabs(h)+g) == (float)fabs(h)) - t=(a[ip][iq])/h; - - else - { - theta=0.5*h/(a[ip][iq]); - t=1.0/(fabs(theta)+sqrt(1.0+theta*theta)); - if (theta < 0.0) t = -t; - } - - c=1.0/sqrt(1+t*t); - s=t*c; - tau=s/(1.0+c); - h=t*a[ip][iq]; - z[ip] -= h; - z[iq] += h; - d[ip] -= h; - d[iq] += h; - a[ip][iq]=0.0; - - for (j=1;j<=ip-1;j++) - { - JACOBI_ROTATE(a,j,ip,j,iq) - } - - for (j=ip+1;j<=iq-1;j++) - { - JACOBI_ROTATE(a,ip,j,j,iq) - } - ... [truncated message content] |
From: <wol...@us...> - 2011-06-08 15:33:03
|
Revision: 355 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=355&view=rev Author: wolfspindler Date: 2011-06-08 15:32:57 +0000 (Wed, 08 Jun 2011) Log Message: ----------- MeVisLab2.1 to MeVisLab2.2: -Support for controlled library export symbols for non windows platforms added. Modified Paths: -------------- trunk/Community/ThirdParty/Sources/SPLINE/spline.h Modified: trunk/Community/ThirdParty/Sources/SPLINE/spline.h =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/spline.h 2011-06-08 15:31:57 UTC (rev 354) +++ trunk/Community/ThirdParty/Sources/SPLINE/spline.h 2011-06-08 15:32:57 UTC (rev 355) @@ -1,28 +1,28 @@ /** \file spline.h Interface of SPLINE library - Interpolation and Approximation of Data - + \author Ruben Stein \date 2010-06-28 - + This library is a modified version of the original SPLINE library of John Burkardt found by the following link. - + Source: http://people.sc.fsu.edu/~jburkardt/cpp_src/spline/spline.html License: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 http://people.sc.fsu.edu/~jburkardt/txt/gnu_lgpl.txt - + ------------------------------------------------------------------------------- Description by John Burkardt: - + SPLINE is a C++ library which constructs and evaluates spline functions. - + These spline functions are typically used to - + - interpolate data exactly at a set of points; - approximate data at many points, or over an interval. - + ------------------------------------------------------------------------------- - + The above mentioned library was modified to be linkable as shared library. See below for a detailed list of changes. The resulting library is again licensed using LGPLv3. @@ -51,23 +51,35 @@ //stl #include <string> -//! \def SPLINE_EXPORT Defines import/export macros necessary to use a shared -//! library interface on windows platform. -#ifdef _WIN32 +//! \def SPLINE_EXPORT Defines library import/export macros necessary to use a shared +//! library interface on some platforms. +#if defined (ML_LIBRARY_EXPORT_ATTRIBUTE) || defined (ML_LIBRARY_IMPORT_ATTRIBUTE) + // Make use of the new style and platform independent import/export definitions. #ifdef SPLINE_EXPORTS - #define SPLINE_EXPORT __declspec(dllexport) + // Export library symbols. + #define SPLINE_EXPORT ML_LIBRARY_EXPORT_ATTRIBUTE #else - #define SPLINE_EXPORT __declspec(dllimport) + // If included by external modules, exported symbols are declared as import symbols + #define SPLINE_EXPORT ML_LIBRARY_IMPORT_ATTRIBUTE #endif #else - #define SPLINE_EXPORT + // Only for backward compatibility to versions < MeVisLab2.2. + #ifdef _WIN32 + #ifdef SPLINE_EXPORTS + #define SPLINE_EXPORT __declspec(dllexport) + #else + #define SPLINE_EXPORT __declspec(dllimport) + #endif + #else + #define SPLINE_EXPORT + #endif #endif //------------------------------------------------------------------------------ namespace spline { SPLINE_EXPORT double basis_function_b_val ( double tdata[], double tval ); -SPLINE_EXPORT double basis_function_beta_val ( double beta1, double beta2, double tdata[], +SPLINE_EXPORT double basis_function_beta_val ( double beta1, double beta2, double tdata[], double tval ); SPLINE_EXPORT double *basis_matrix_b_uni ( ); SPLINE_EXPORT double *basis_matrix_beta_uni ( double beta1, double beta2 ); @@ -79,7 +91,7 @@ SPLINE_EXPORT double *basis_matrix_overhauser_uni ( void); SPLINE_EXPORT double *basis_matrix_overhauser_uni_l ( ); SPLINE_EXPORT double *basis_matrix_overhauser_uni_r ( ); -SPLINE_EXPORT double basis_matrix_tmp ( int left, int n, double mbasis[], int ndata, +SPLINE_EXPORT double basis_matrix_tmp ( int left, int n, double mbasis[], int ndata, double tdata[], double ydata[], double tval ); SPLINE_EXPORT void bc_val ( int n, double t, double xcon[], double ycon[], double *xval, double *yval ); @@ -99,16 +111,16 @@ SPLINE_EXPORT double dif_val ( int ntab, double xtab[], double diftab[], double xval ); SPLINE_EXPORT int i4_max ( int i1, int i2 ); SPLINE_EXPORT int i4_min ( int i1, int i2 ); -SPLINE_EXPORT void least_set ( int point_num, double x[], double f[], double w[], +SPLINE_EXPORT void least_set ( int point_num, double x[], double f[], double w[], int nterms, double b[], double c[], double d[] ); -SPLINE_EXPORT double least_val ( int nterms, double b[], double c[], double d[], +SPLINE_EXPORT double least_val ( int nterms, double b[], double c[], double d[], double x ); -SPLINE_EXPORT void least_val2 ( int nterms, double b[], double c[], double d[], double x, +SPLINE_EXPORT void least_val2 ( int nterms, double b[], double c[], double d[], double x, double *px, double *pxp ); -SPLINE_EXPORT void least_set_old ( int ntab, double xtab[], double ytab[], int ndeg, +SPLINE_EXPORT void least_set_old ( int ntab, double xtab[], double ytab[], int ndeg, double ptab[], double b[], double c[], double d[], double *eps, int *ierror ); SPLINE_EXPORT double least_val_old ( double x, int ndeg, double b[], double c[], double d[] ); -SPLINE_EXPORT void parabola_val2 ( int ndim, int ndata, double tdata[], double ydata[], +SPLINE_EXPORT void parabola_val2 ( int ndim, int ndata, double tdata[], double ydata[], int left, double tval, double yval[] ); SPLINE_EXPORT double pchst ( double arg1, double arg2 ); SPLINE_EXPORT double r8_max ( double x, double y ); @@ -129,32 +141,32 @@ SPLINE_EXPORT double spline_beta_val ( double beta1, double beta2, int ndata, double tdata[], double ydata[], double tval ); SPLINE_EXPORT double spline_constant_val ( int ndata, double tdata[], double ydata[], double tval ); -SPLINE_EXPORT double *spline_cubic_set ( int n, double t[], double y[], int ibcbeg, double ybcbeg, +SPLINE_EXPORT double *spline_cubic_set ( int n, double t[], double y[], int ibcbeg, double ybcbeg, int ibcend, double ybcend ); SPLINE_EXPORT double spline_cubic_val ( int n, double t[], double tval, double y[], double ypp[], double *ypval, double *yppval ); -SPLINE_EXPORT void spline_cubic_val2 ( int n, double t[], double tval, int *left, double y[], +SPLINE_EXPORT void spline_cubic_val2 ( int n, double t[], double tval, int *left, double y[], double ypp[], double *yval, double *ypval, double *yppval ); -SPLINE_EXPORT double *spline_hermite_set ( int ndata, double tdata[], double ydata[], +SPLINE_EXPORT double *spline_hermite_set ( int ndata, double tdata[], double ydata[], double ypdata[] ); -SPLINE_EXPORT void spline_hermite_val ( int ndata, double tdata[], double c[], double tval, +SPLINE_EXPORT void spline_hermite_val ( int ndata, double tdata[], double c[], double tval, double *sval, double *spval ); -SPLINE_EXPORT double spline_linear_int ( int ndata, double tdata[], double ydata[], double a, +SPLINE_EXPORT double spline_linear_int ( int ndata, double tdata[], double ydata[], double a, double b ); -SPLINE_EXPORT void spline_linear_intset ( int int_n, double int_x[], double int_v[], +SPLINE_EXPORT void spline_linear_intset ( int int_n, double int_x[], double int_v[], double data_x[], double data_y[] ); -SPLINE_EXPORT void spline_linear_val ( int ndata, double tdata[], double ydata[], +SPLINE_EXPORT void spline_linear_val ( int ndata, double tdata[], double ydata[], double tval, double *yval, double *ypval ); -SPLINE_EXPORT double spline_overhauser_nonuni_val ( int ndata, double tdata[], +SPLINE_EXPORT double spline_overhauser_nonuni_val ( int ndata, double tdata[], double ydata[], double tval ); SPLINE_EXPORT double spline_overhauser_uni_val ( int ndata, double tdata[], double ydata[], double tval ); -SPLINE_EXPORT void spline_overhauser_val ( int ndim, int ndata, double tdata[], double ydata[], +SPLINE_EXPORT void spline_overhauser_val ( int ndim, int ndata, double tdata[], double ydata[], double tval, double yval[] ); SPLINE_EXPORT void spline_pchip_set ( int n, double x[], double f[], double d[] ); -SPLINE_EXPORT void spline_pchip_val ( int n, double x[], double f[], double d[], int ne, +SPLINE_EXPORT void spline_pchip_val ( int n, double x[], double f[], double d[], int ne, double xe[], double fe[] ); -SPLINE_EXPORT void spline_quadratic_val ( int ndata, double tdata[], double ydata[], +SPLINE_EXPORT void spline_quadratic_val ( int ndata, double tdata[], double ydata[], double tval, double *yval, double *ypval ); SPLINE_EXPORT void timestamp ( ); } //namespace spline This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |