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: <awa...@us...> - 2010-08-08 09:25:03
|
Revision: 304 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=304&view=rev Author: awakeideas Date: 2010-08-08 09:24:57 +0000 (Sun, 08 Aug 2010) Log Message: ----------- link something to keep the linker happy Modified Paths: -------------- trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro Modified: trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro =================================================================== --- trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro 2010-08-08 08:30:42 UTC (rev 303) +++ trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro 2010-08-08 09:24:57 UTC (rev 304) @@ -2,6 +2,7 @@ TEMPLATE = lib CONFIG -= qt +LIBS += -framework CoreFoundation macx:release:!debug { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <awa...@us...> - 2010-08-08 08:30:48
|
Revision: 303 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=303&view=rev Author: awakeideas Date: 2010-08-08 08:30:42 +0000 (Sun, 08 Aug 2010) Log Message: ----------- do not try to link against qt Modified Paths: -------------- trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro Modified: trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro =================================================================== --- trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro 2010-08-06 17:19:01 UTC (rev 302) +++ trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro 2010-08-08 08:30:42 UTC (rev 303) @@ -1,6 +1,7 @@ # MeVisLabHub TEMPLATE = lib +CONFIG -= qt macx:release:!debug { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <awa...@us...> - 2010-08-06 17:19:07
|
Revision: 302 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=302&view=rev Author: awakeideas Date: 2010-08-06 17:19:01 +0000 (Fri, 06 Aug 2010) Log Message: ----------- generate dummy lib Modified Paths: -------------- trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro Modified: trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro =================================================================== --- trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro 2010-08-06 16:58:38 UTC (rev 301) +++ trunk/Community/General/Sources/ML/MLOsiriXImporter/MeVisLabHub/MeVisLabHub.pro 2010-08-06 17:19:01 UTC (rev 302) @@ -1,5 +1,7 @@ # MeVisLabHub +TEMPLATE = lib + macx:release:!debug { # build the plugin using xcodebuild This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <awa...@us...> - 2010-08-06 16:58:44
|
Revision: 301 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=301&view=rev Author: awakeideas Date: 2010-08-06 16:58:38 +0000 (Fri, 06 Aug 2010) Log Message: ----------- - adapted OpenGL includes - ignore *.xcodeproj Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.cpp trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h Property Changed: ---------------- trunk/UMD/METK/Sources/Inventor/SoQHull3D/ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/ trunk/UMD/METK/Sources/Inventor/UMDTools/ trunk/UMD/METK/Sources/ML/METK2DLabeling/ trunk/UMD/METK/Sources/ML/METKLiftChart/ trunk/UMD/METK/Sources/ML/METKMessaging/ trunk/UMD/METK/Sources/ML/METKPicking/ trunk/UMD/METK/Sources/ML/METKSurfaceDistance/ trunk/UMD/METK/Sources/ML/METKUndo/ trunk/UMD/METK/Sources/ML/kAviWriter/ trunk/UMD/METK/Sources/common/ Property changes on: trunk/UMD/METK/Sources/Inventor/SoQHull3D ___________________________________________________________________ Modified: svn:ignore - UMDQHull3D.sln UMDQHull3D.suo UMDQHull3D.vcproj UMDQHull3D.vcproj.lapsus-win.wolf.user + UMDQHull3D.sln UMDQHull3D.suo UMDQHull3D.vcproj UMDQHull3D.vcproj.lapsus-win.wolf.user *.xcodeproj Property changes on: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement ___________________________________________________________________ Modified: svn:ignore - UMDSoMeasurement.sln UMDSoMeasurement.suo UMDSoMeasurement.vcproj UMDSoMeasurement.vcproj.lapsus-win.wolf.user + UMDSoMeasurement.sln UMDSoMeasurement.suo UMDSoMeasurement.vcproj UMDSoMeasurement.vcproj.lapsus-win.wolf.user *.xcodeproj Property changes on: trunk/UMD/METK/Sources/Inventor/UMDTools ___________________________________________________________________ Added: svn:ignore + *.xcodeproj Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.cpp 2010-07-30 12:31:57 UTC (rev 300) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoClearGLBuffers.cpp 2010-08-06 16:58:38 UTC (rev 301) @@ -11,7 +11,7 @@ #include <Inventor/SbLinear.h> #include <Inventor/sensors/SoNodeSensor.h> -#include <GL/gl.h> +#include <mlOpenGL.h> SO_NODE_SOURCE(SoClearGLBuffers); Modified: trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp 2010-07-30 12:31:57 UTC (rev 300) +++ trunk/UMD/METK/Sources/Inventor/UMDTools/SoMinimalEnclosingCircle.cpp 2010-08-06 16:58:38 UTC (rev 301) @@ -33,7 +33,7 @@ #include "XVLeaveScope.h" -#include <GL/gl.h> +#include <mlOpenGL.h> SO_NODE_SOURCE(SoMinimalEnclosingCircle) Property changes on: trunk/UMD/METK/Sources/ML/METK2DLabeling ___________________________________________________________________ Modified: svn:ignore - METK2DLabeling.sln METK2DLabeling.suo METK2DLabeling.vcproj METK2DLabeling.vcproj.lapsus-win.wolf.user + METK2DLabeling.sln METK2DLabeling.suo METK2DLabeling.vcproj METK2DLabeling.vcproj.lapsus-win.wolf.user *.xcodeproj Property changes on: trunk/UMD/METK/Sources/ML/METKLiftChart ___________________________________________________________________ Added: svn:ignore + *.xcodeproj Modified: trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h =================================================================== --- trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h 2010-07-30 12:31:57 UTC (rev 300) +++ trunk/UMD/METK/Sources/ML/METKLiftChart/METKLiftChartSystem.h 2010-08-06 16:58:38 UTC (rev 301) @@ -48,7 +48,6 @@ #include <string> //#include <FLOAT.H> -#include <GL/gl.h> #include <stdio.h> #include <stdlib.h> #include <iostream> Property changes on: trunk/UMD/METK/Sources/ML/METKMessaging ___________________________________________________________________ Modified: svn:ignore - METKMessaging.sln METKMessaging.suo METKMessaging.vcproj METKMessaging.vcproj.lapsus-win.wolf.user + METKMessaging.sln METKMessaging.suo METKMessaging.vcproj METKMessaging.vcproj.lapsus-win.wolf.user *.xcodeproj Property changes on: trunk/UMD/METK/Sources/ML/METKPicking ___________________________________________________________________ Added: svn:ignore + *.xcodeproj Property changes on: trunk/UMD/METK/Sources/ML/METKSurfaceDistance ___________________________________________________________________ Added: svn:ignore + *.xcodeproj Property changes on: trunk/UMD/METK/Sources/ML/METKUndo ___________________________________________________________________ Added: svn:ignore + *.xcodeproj Property changes on: trunk/UMD/METK/Sources/ML/kAviWriter ___________________________________________________________________ Modified: svn:ignore - MLkAviWriter.sln MLkAviWriter.suo MLkAviWriter.vcproj MLkAviWriter.vcproj.lapsus-win.wolf.user + MLkAviWriter.sln MLkAviWriter.suo MLkAviWriter.vcproj MLkAviWriter.vcproj.lapsus-win.wolf.user *.xcodeproj Property changes on: trunk/UMD/METK/Sources/common ___________________________________________________________________ Modified: svn:ignore - common.sln common.suo common.vcproj common.vcproj.PERIFERIK.mevis.user + common.sln common.suo common.vcproj common.vcproj.PERIFERIK.mevis.user *.xcodeproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2010-07-30 12:32:03
|
Revision: 300 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=300&view=rev Author: bartdedobbelaer Date: 2010-07-30 12:31:57 +0000 (Fri, 30 Jul 2010) Log Message: ----------- - Added origin field Modified Paths: -------------- trunk/Community/General/Modules/ML/MLImageUtilities/MLImageUtilities.def Modified: trunk/Community/General/Modules/ML/MLImageUtilities/MLImageUtilities.def =================================================================== --- trunk/Community/General/Modules/ML/MLImageUtilities/MLImageUtilities.def 2010-07-30 12:31:26 UTC (rev 299) +++ trunk/Community/General/Modules/ML/MLImageUtilities/MLImageUtilities.def 2010-07-30 12:31:57 UTC (rev 300) @@ -1,78 +1,79 @@ - -//---------------------------------------------------------------------------------- -// MLModule MIP -//---------------------------------------------------------------------------------- -MLModule MIP { - DLL = "MLImageUtilities" - author = "Bart De Dobbelaer" - status = "stable" - comment = "Project image with Maximum Intensity Projection" - keywords = "mip xray" - seeAlso = "MIPMacro Reformat Resample3D OrthoSwapFlip" - exampleNetwork = "$(LOCAL)/MIP/MIPExample.mlab" - - Window { - Category { - Field = direction - Separator { direction = Horizontal } - Horizontal { - CheckBox = autoUpdate - Button update { dependsOn = !autoUpdate } - } - } - } -} // MLModule MIP - -//---------------------------------------------------------------------------------- -// MLModule PlaneClip -//---------------------------------------------------------------------------------- -MLModule PlaneClip { - DLL = "MLImageUtilities" - author = "Bart De Dobbelaer" - status = "stable" - exampleNetwork = "$(LOCAL)/PlaneClip/PlaneClipExample.mlab" - Window { - Category { - Field plane { title = "" } - Horizontal { - alignX = right - Field = autoApply - Button apply { dependsOn = !autoApply } - } - } - } - -} // MLModule PlaneClip - -//---------------------------------------------------------------------------------- -// MLModule AnalyzeHeader -//---------------------------------------------------------------------------------- -MLModule AnalyzeHeader { - DLL = "MLImageUtilities" - author = "Bart De Dobbelaer" - status = "stable" - comment = "Parses Analyze Header for scale factor" - - Window { - Category { - w = 250 mw = 250 pw = 250 - Field filename { browseButton = YES browseMode = open } - Separator { direction = Horizontal } - Field funused1 { edit = NO minLength = 10 } - Field funused2 { edit = NO minLength = 10 } - Field funused3 { edit = NO minLength = 10 } - Separator { direction = Horizontal } - Field dimensions { edit = NO minLength = 10 } - Field voxelSize { edit = NO minLength = 10 } - } - } -} // MLModule AnalyzeHeader - -//--------------------------------------------------------------------- -// MacroModule LocalAnalyzeLoad -//---------------------------------------------------------------------------------- -MacroModule LocalAnalyzeLoad { - author = "Bart De Dobbelaer" - status = "stable" - externalDefinition = "$(LOCAL)/LocalAnalyzeLoad/LocalAnalyzeLoad.script" -} // MacroModule LocalAnalyzeLoad + +//---------------------------------------------------------------------------------- +// MLModule MIP +//---------------------------------------------------------------------------------- +MLModule MIP { + DLL = "MLImageUtilities" + author = "Bart De Dobbelaer" + status = "stable" + comment = "Project image with Maximum Intensity Projection" + keywords = "mip xray" + seeAlso = "MIPMacro Reformat Resample3D OrthoSwapFlip" + exampleNetwork = "$(LOCAL)/MIP/MIPExample.mlab" + + Window { + Category { + Field = direction + Separator { direction = Horizontal } + Horizontal { + CheckBox = autoUpdate + Button update { dependsOn = !autoUpdate } + } + } + } +} // MLModule MIP + +//---------------------------------------------------------------------------------- +// MLModule PlaneClip +//---------------------------------------------------------------------------------- +MLModule PlaneClip { + DLL = "MLImageUtilities" + author = "Bart De Dobbelaer" + status = "stable" + exampleNetwork = "$(LOCAL)/PlaneClip/PlaneClipExample.mlab" + Window { + Category { + Field plane { title = "" } + Horizontal { + alignX = right + Field = autoApply + Button apply { dependsOn = !autoApply } + } + } + } + +} // MLModule PlaneClip + +//---------------------------------------------------------------------------------- +// MLModule AnalyzeHeader +//---------------------------------------------------------------------------------- +MLModule AnalyzeHeader { + DLL = "MLImageUtilities" + author = "Bart De Dobbelaer" + status = "stable" + comment = "Parses Analyze Header for scale factor" + + Window { + Category { + w = 250 mw = 250 pw = 250 + Field filename { browseButton = YES browseMode = open } + Separator { direction = Horizontal } + Field funused1 { edit = NO minLength = 10 } + Field funused2 { edit = NO minLength = 10 } + Field funused3 { edit = NO minLength = 10 } + Separator { direction = Horizontal } + Field dimensions { edit = NO minLength = 10 } + Field voxelSize { edit = NO minLength = 10 } + Field origin { edit = NO minLength = 10 } + } + } +} // MLModule AnalyzeHeader + +//--------------------------------------------------------------------- +// MacroModule LocalAnalyzeLoad +//---------------------------------------------------------------------------------- +MacroModule LocalAnalyzeLoad { + author = "Bart De Dobbelaer" + status = "stable" + externalDefinition = "$(LOCAL)/LocalAnalyzeLoad/LocalAnalyzeLoad.script" +} // MacroModule LocalAnalyzeLoad This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2010-07-30 12:31:33
|
Revision: 299 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=299&view=rev Author: bartdedobbelaer Date: 2010-07-30 12:31:26 +0000 (Fri, 30 Jul 2010) Log Message: ----------- - Added origin field Modified Paths: -------------- trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.cpp trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h Modified: trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.cpp 2010-07-30 08:59:43 UTC (rev 298) +++ trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.cpp 2010-07-30 12:31:26 UTC (rev 299) @@ -34,42 +34,43 @@ (_dimensionsFld = getFieldContainer()->addVec4f("dimensions"))->setVec4fValue(vec4(0.0f,0.0f,0.0f,0.0f)); (_voxelSizeFld = getFieldContainer()->addVec4f("voxelSize"))->setVec4fValue(vec4(0.0f,0.0f,0.0f,0.0f)); + (_originFld = getFieldContainer()->addVec3f("origin"))->setVec3fValue(vec3(0.0f,0.0f,0.0f)); handleNotificationOn(); } //////////////////////////////////////////////////////////////////////// -void AnalyzeHeader::swap(void *s,int bytes) { - unsigned char *tp,temp; - tp=(unsigned char *)s; - if (bytes==2) { - temp=tp[0];tp[0]=tp[1];tp[1]=temp; - } - if (bytes==4) { - temp=tp[0];tp[0]=tp[3];tp[3]=temp; - temp=tp[1];tp[1]=tp[2];tp[2]=temp; - } - if (bytes==8) { - temp=tp[0];tp[0]=tp[7];tp[7]=temp; - temp=tp[1];tp[1]=tp[6];tp[6]=temp; - temp=tp[2];tp[2]=tp[5];tp[5]=temp; - temp=tp[3];tp[3]=tp[4];tp[4]=temp; - } -} - -//////////////////////////////////////////////////////////////////////// - -bool AnalyzeHeader::checkEndianness() { - char *ec=0; - int et=1; - - ec=(char *)&et; - if (*ec) return true; else return false; -} - +void AnalyzeHeader::swap(void *s,int bytes) { + unsigned char *tp,temp; + tp=(unsigned char *)s; + if (bytes==2) { + temp=tp[0];tp[0]=tp[1];tp[1]=temp; + } + if (bytes==4) { + temp=tp[0];tp[0]=tp[3];tp[3]=temp; + temp=tp[1];tp[1]=tp[2];tp[2]=temp; + } + if (bytes==8) { + temp=tp[0];tp[0]=tp[7];tp[7]=temp; + temp=tp[1];tp[1]=tp[6];tp[6]=temp; + temp=tp[2];tp[2]=tp[5];tp[5]=temp; + temp=tp[3];tp[3]=tp[4];tp[4]=temp; + } +} + //////////////////////////////////////////////////////////////////////// +bool AnalyzeHeader::checkEndianness() { + char *ec=0; + int et=1; + + ec=(char *)&et; + if (*ec) return true; else return false; +} + +//////////////////////////////////////////////////////////////////////// + void AnalyzeHeader::handleNotification (Field *field) { ML_TRACE_IN("AnalyzeHeader::handleNotification()") if (field == _filenameFld) { @@ -77,98 +78,99 @@ std::string str = _filenameFld->getStringValue(); char filename[1000]; sprintf(filename,str.c_str()); - - FILE *file; - int nr,i; - unsigned short d[8]; - bool swapendian; - - int hdrsize,extents,glmax,glmin,views,vols_added,start_field,field_skip,omax, - omin,smax,smin; - unsigned char regular,hkey_un0,orient,vox_units[4],cal_units[8]; - char data_type[10],db_name[18],descrip[80],aux_file[24],generated[10],scannum[10],patient_id[10],exp_date[10], - exp_time[10],hist_un0[3]; - unsigned short session_error,unused1,datatypean,bitpix,dim_un0,origin[5]; - float pixdim[8],vox_offset,cal_max,cal_min,compressed,verified; - - float funused1 = 0.0f, funused2 = 0.0f, funused3 = 0.0f; - for (i = 0;i < 8; i ++) { - d[i] = 0; - pixdim[i] = 0.0f; - } - - - file=fopen(filename,"rb"); - if (file!=NULL) { - nr=fread(&hdrsize,4,1,file); - - //we presume that the hdr-files are not corrupted -> size always 348 - //check itmp for endian swap - if ((checkEndianness() && hdrsize!=348) || - (!checkEndianness() && hdrsize==348)) - swapendian=true; else swapendian=false; - - if (swapendian) swap(&hdrsize,4); - if (nr > 0 && hdrsize == 348) { - fread(&data_type[0],10,1,file); - fread(&db_name[0],18,1,file); - fread(&extents,4,1,file);if (swapendian) swap(&extents,4); - fread(&session_error,2,1,file);if (swapendian) swap(&session_error,2); - fread(®ular,1,1,file); - fread(&hkey_un0,1,1,file); - for (i=0;i<8;i++) { - fread(&d[i],2,1,file);if (swapendian) swap(&d[i],2); - } - fread(&vox_units[0],4,1,file); - fread(&cal_units[0],8,1,file); - fread(&unused1,2,1,file);if (swapendian) swap(&unused1,2); - fread(&datatypean,2,1,file);if (swapendian) swap(&datatypean,2); - fread(&bitpix,2,1,file);if (swapendian) swap(&bitpix,2); - fread(&dim_un0,2,1,file);if (swapendian) swap(&dim_un0,2); - for (i=0;i<8;i++) { - fread(&pixdim[i],4,1,file);if (swapendian) swap(&pixdim[i],4); - } - fread(&vox_offset,4,1,file);if (swapendian) swap(&vox_offset,4); - fread(&funused1,4,1,file);if (swapendian) swap(&funused1,4); - fread(&funused2,4,1,file);if (swapendian) swap(&funused2,4); - fread(&funused3,4,1,file);if (swapendian) swap(&funused3,4); - fread(&cal_max,4,1,file);if (swapendian) swap(&cal_max,4); - fread(&cal_min,4,1,file);if (swapendian) swap(&cal_min,4); - fread(&compressed,4,1,file);if (swapendian) swap(&compressed,4); - fread(&verified,4,1,file);if (swapendian) swap(&verified,4); - fread(&glmax,4,1,file);if (swapendian) swap(&glmax,4); - fread(&glmin,4,1,file);if (swapendian) swap(&glmin,4); - - fread(&descrip[0],80,1,file); - fread(&aux_file[0],24,1,file); - fread(&orient,1,1,file); - for (i=0;i<5;i++) { - fread(&origin[i],2,1,file);if (swapendian) swap(&origin[i],2); - }; - fread(&generated[0],10,1,file); - fread(&scannum[0],10,1,file); - fread(&patient_id,10,1,file); - fread(&exp_date,10,1,file); - fread(&exp_time,10,1,file); - fread(&hist_un0,3,1,file); - fread(&views,4,1,file);if (swapendian) swap(&views,4); - fread(&vols_added,4,1,file);if (swapendian) swap(&vols_added,4); - fread(&start_field,4,1,file);if (swapendian) swap(&start_field,4); - fread(&field_skip,4,1,file);if (swapendian) swap(&field_skip,4); - fread(&omax,4,1,file);if (swapendian) swap(&omax,4); - fread(&omin,4,1,file);if (swapendian) swap(&omin,4); - fread(&smax,4,1,file);if (swapendian) swap(&smax,4); - fread(&smin,4,1,file);if (swapendian) swap(&smin,4); - - } - fclose(file); + + FILE *file; + int nr,i; + unsigned short d[8]; + bool swapendian; + + int hdrsize,extents,glmax,glmin,views,vols_added,start_field,field_skip,omax, + omin,smax,smin; + unsigned char regular,hkey_un0,orient,vox_units[4],cal_units[8]; + char data_type[10],db_name[18],descrip[80],aux_file[24],generated[10],scannum[10],patient_id[10],exp_date[10], + exp_time[10],hist_un0[3]; + unsigned short session_error,unused1,datatypean,bitpix,dim_un0,origin[5]; + float pixdim[8],vox_offset,cal_max,cal_min,compressed,verified; + + float funused1 = 0.0f, funused2 = 0.0f, funused3 = 0.0f; + for (i = 0;i < 8; i ++) { + d[i] = 0; + pixdim[i] = 0.0f; } + + file=fopen(filename,"rb"); + if (file!=NULL) { + nr=fread(&hdrsize,4,1,file); + + //we presume that the hdr-files are not corrupted -> size always 348 + //check itmp for endian swap + if ((checkEndianness() && hdrsize!=348) || + (!checkEndianness() && hdrsize==348)) + swapendian=true; else swapendian=false; + + if (swapendian) swap(&hdrsize,4); + if (nr > 0 && hdrsize == 348) { + fread(&data_type[0],10,1,file); + fread(&db_name[0],18,1,file); + fread(&extents,4,1,file);if (swapendian) swap(&extents,4); + fread(&session_error,2,1,file);if (swapendian) swap(&session_error,2); + fread(®ular,1,1,file); + fread(&hkey_un0,1,1,file); + for (i=0;i<8;i++) { + fread(&d[i],2,1,file);if (swapendian) swap(&d[i],2); + } + fread(&vox_units[0],4,1,file); + fread(&cal_units[0],8,1,file); + fread(&unused1,2,1,file);if (swapendian) swap(&unused1,2); + fread(&datatypean,2,1,file);if (swapendian) swap(&datatypean,2); + fread(&bitpix,2,1,file);if (swapendian) swap(&bitpix,2); + fread(&dim_un0,2,1,file);if (swapendian) swap(&dim_un0,2); + for (i=0;i<8;i++) { + fread(&pixdim[i],4,1,file);if (swapendian) swap(&pixdim[i],4); + } + fread(&vox_offset,4,1,file);if (swapendian) swap(&vox_offset,4); + fread(&funused1,4,1,file);if (swapendian) swap(&funused1,4); + fread(&funused2,4,1,file);if (swapendian) swap(&funused2,4); + fread(&funused3,4,1,file);if (swapendian) swap(&funused3,4); + fread(&cal_max,4,1,file);if (swapendian) swap(&cal_max,4); + fread(&cal_min,4,1,file);if (swapendian) swap(&cal_min,4); + fread(&compressed,4,1,file);if (swapendian) swap(&compressed,4); + fread(&verified,4,1,file);if (swapendian) swap(&verified,4); + fread(&glmax,4,1,file);if (swapendian) swap(&glmax,4); + fread(&glmin,4,1,file);if (swapendian) swap(&glmin,4); + + fread(&descrip[0],80,1,file); + fread(&aux_file[0],24,1,file); + fread(&orient,1,1,file); + for (i=0;i<5;i++) { + fread(&origin[i],2,1,file);if (swapendian) swap(&origin[i],2); + }; + fread(&generated[0],10,1,file); + fread(&scannum[0],10,1,file); + fread(&patient_id,10,1,file); + fread(&exp_date,10,1,file); + fread(&exp_time,10,1,file); + fread(&hist_un0,3,1,file); + fread(&views,4,1,file);if (swapendian) swap(&views,4); + fread(&vols_added,4,1,file);if (swapendian) swap(&vols_added,4); + fread(&start_field,4,1,file);if (swapendian) swap(&start_field,4); + fread(&field_skip,4,1,file);if (swapendian) swap(&field_skip,4); + fread(&omax,4,1,file);if (swapendian) swap(&omax,4); + fread(&omin,4,1,file);if (swapendian) swap(&omin,4); + fread(&smax,4,1,file);if (swapendian) swap(&smax,4); + fread(&smin,4,1,file);if (swapendian) swap(&smin,4); + + } + fclose(file); + } + _funused1Fld->setFloatValue(funused1); _funused2Fld->setFloatValue(funused2); _funused3Fld->setFloatValue(funused3); _dimensionsFld->setVec4fValue(vec4(d[1],d[2],d[3],d[4])); _voxelSizeFld->setVec4fValue(vec4(pixdim[1],pixdim[2],pixdim[3],pixdim[4])); + _originFld->setVec3fValue(vec3(origin[0],origin[1],origin[2])); } Modified: trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h =================================================================== --- trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h 2010-07-30 08:59:43 UTC (rev 298) +++ trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h 2010-07-30 12:31:26 UTC (rev 299) @@ -39,6 +39,7 @@ Vec4fField *_dimensionsFld; Vec4fField *_voxelSizeFld; + Vec3fField *_originFld; FloatField *_funused1Fld; FloatField *_funused2Fld; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2010-07-30 08:59:49
|
Revision: 298 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=298&view=rev Author: rhameeteman Date: 2010-07-30 08:59:43 +0000 (Fri, 30 Jul 2010) Log Message: ----------- KH. * Implemented activateAttachments so the file is loaded on network load and module copy when autoUpdate is set. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h Modified: trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp 2010-07-23 13:20:08 UTC (rev 297) +++ trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.cpp 2010-07-30 08:59:43 UTC (rev 298) @@ -179,5 +179,9 @@ _outputXMarkerListFld->notifyAttachments(); } } - +void XMarkerListFromFile::activateAttachments() +{ + this->handleNotification( _filenameFld ); + BaseOp::activateAttachments(); +} ML_END_NAMESPACE Modified: trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h =================================================================== --- trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h 2010-07-23 13:20:08 UTC (rev 297) +++ trunk/Community/General/Sources/ML/MLXMarkerListCommunityModules/XMarkerListFile/mlXMarkerListFromFile.h 2010-07-30 08:59:43 UTC (rev 298) @@ -60,6 +60,8 @@ //! Handle field changes of the field \c field. virtual void handleNotification (Field *field); + virtual void activateAttachments(); + private: // ---------------------------------------------------------- //@{ \name Module field declarations This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2010-07-23 13:20:18
|
Revision: 297 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=297&view=rev Author: rhameeteman Date: 2010-07-23 13:20:08 +0000 (Fri, 23 Jul 2010) Log Message: ----------- KH. * Added the option to convert the box vectors from world to voxel and vice versa. Modified Paths: -------------- trunk/Community/General/Modules/ML/MLCMCoordinate/BoxArithmetic/BoxArithmetic.html trunk/Community/General/Modules/ML/MLCMCoordinate/MLCMCoordinate.def trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.cpp trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.h Modified: trunk/Community/General/Modules/ML/MLCMCoordinate/BoxArithmetic/BoxArithmetic.html =================================================================== --- trunk/Community/General/Modules/ML/MLCMCoordinate/BoxArithmetic/BoxArithmetic.html 2010-07-23 10:18:48 UTC (rev 296) +++ trunk/Community/General/Modules/ML/MLCMCoordinate/BoxArithmetic/BoxArithmetic.html 2010-07-23 13:20:08 UTC (rev 297) @@ -22,7 +22,8 @@ </blockquote> <h3><a NAME=Details></a>Details</h3> -<blockquote>Box0 and Box1 can be obtained form input0 and input1 respectively or from the scalar, vector or box fileds. If you select input0 or input1, UseVoxelCenter can be used to use (0.5,0.5,0.5) as origin of the image (seems to be needed when connecting the output box to a SubImage module).<br/> +<blockquote>Box0 and Box1 can be obtained form input0 and input1 respectively or from the scalar, vector or box fileds. If you select input0 or input1, UseVoxelCenter can be used to use (0.5,0.5,0.5) as origin of the image (seems to be needed when connecting the output box to a SubImage module). After Box0 an Box1 are defined they can be converted from world to voxel or vice versa according to the matrix of the corresponding input image and they can be corrected, by checking the appropriate chekboxes.<br/> +<br/> The following operations are available: <table> <tr><td>ExpandScalar:</td><td>Box.v1 = Box0.v1-Constant (applied to all components)</td></tr> Modified: trunk/Community/General/Modules/ML/MLCMCoordinate/MLCMCoordinate.def =================================================================== --- trunk/Community/General/Modules/ML/MLCMCoordinate/MLCMCoordinate.def 2010-07-23 10:18:48 UTC (rev 296) +++ trunk/Community/General/Modules/ML/MLCMCoordinate/MLCMCoordinate.def 2010-07-23 13:20:08 UTC (rev 297) @@ -63,12 +63,16 @@ Label { title = "Box0:" alignGroupX = c1 } ButtonBar inputMode0 { show = Radio } CheckBox correctInput0 { title = Correct } + CheckBox w2VInput0 { title = w2v } + CheckBox v2WInput0 { title = v2w } } Horizontal { alignX = Left Label { title = "Box1:" alignGroupX = c1 } ButtonBar inputMode1 { show = Radio } CheckBox correctInput1 { title = Correct } + CheckBox w2VInput1 { title = w2v } + CheckBox v2WInput1 { title = v2w } } } Box "Scalar Input" { @@ -116,8 +120,14 @@ Field outputBox0 { title = Box0 } Field outputBox1 { title = Box1 } Horizontal { - Field outputBox { title = Box: } - CheckBox correctBox { title = correct } + Horizontal { + Field outputBox { title = Box: } + } + Horizontal { + alignX = Right + expandX = No + CheckBox correctBox { title = correct } + } } Field outputExtent { title = Size: } Field outV1 { title = v1: } Modified: trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.cpp 2010-07-23 10:18:48 UTC (rev 296) +++ trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.cpp 2010-07-23 13:20:08 UTC (rev 297) @@ -69,6 +69,18 @@ f_CorrectInput1 = fieldC->addBool( "correctInput1" ); f_CorrectInput1->setBoolValue( false ); + f_V2WInput0 = fieldC->addBool( "V2WInput0" ); + f_V2WInput0->setBoolValue( false ); + + f_V2WInput1 = fieldC->addBool( "V2WInput1" ); + f_V2WInput1->setBoolValue( false ); + + f_W2VInput0 = fieldC->addBool( "W2VInput0" ); + f_W2VInput0->setBoolValue( false ); + + f_W2VInput1 = fieldC->addBool( "W2VInput1" ); + f_W2VInput1->setBoolValue( false ); + f_UseVoxelCenter = fieldC->addBool( "useVoxelCenter" ); f_UseVoxelCenter->setBoolValue( false ); @@ -131,13 +143,27 @@ //---------------------------------------------------------------------------------- //! Handle field changes of the field field. //---------------------------------------------------------------------------------- -void BoxArithmetic::handleNotification (Field * /*field*/) +void BoxArithmetic::handleNotification (Field *field) { ML_TRACE_IN("BoxArithmetic::handleNotification ()"); if (m_LockUpdate) {return;} m_LockUpdate = true; + if ( field == f_W2VInput0 && f_W2VInput0->getBoolValue() ){ + f_V2WInput0->setBoolValue( false ); + } + if ( field == f_W2VInput1 && f_W2VInput1->getBoolValue() ){ + f_V2WInput1->setBoolValue( false ); + } + + if ( field == f_V2WInput0 && f_V2WInput0->getBoolValue() ){ + f_W2VInput0->setBoolValue( false ); + } + if ( field == f_V2WInput1 && f_V2WInput1->getBoolValue() ){ + f_W2VInput1->setBoolValue( false ); + } + SubImgBoxf newBox = SubImgBoxf(); SubImgBoxf box0 = SubImgBoxf(); SubImgBoxf box1 = SubImgBoxf(); @@ -186,6 +212,32 @@ default: break; } + if ( f_W2VInput0->getBoolValue() ){ + PagedImg *inImage0 = getNonDummyUpdatedInImg( 0 ); + if ( inImage0 ){ + const Vector3 v1 = inImage0->mapWorldToVoxel(Vector3(box0.v1[0],box0.v1[1],box0.v1[2])); + const Vector3 v2 = inImage0->mapWorldToVoxel(Vector3(box0.v2[0],box0.v2[1],box0.v2[2])); + box0.v1[0] = v1[0]; + box0.v1[1] = v1[1]; + box0.v1[2] = v1[2]; + box0.v2[0] = v2[0]; + box0.v2[1] = v2[1]; + box0.v2[2] = v2[2]; + } + } + if ( f_V2WInput0->getBoolValue() ){ + PagedImg *inImage0 = getNonDummyUpdatedInImg( 0 ); + if ( inImage0 ){ + const Vector3 v1 = inImage0->mapVoxelToWorld(Vector3(box0.v1[0],box0.v1[1],box0.v1[2])); + const Vector3 v2 = inImage0->mapVoxelToWorld(Vector3(box0.v2[0],box0.v2[1],box0.v2[2])); + box0.v1[0] = v1[0]; + box0.v1[1] = v1[1]; + box0.v1[2] = v1[2]; + box0.v2[0] = v2[0]; + box0.v2[1] = v2[1]; + box0.v2[2] = v2[2]; + } + } if ( f_CorrectInput0->getBoolValue() ){ box0.correct(); } @@ -237,6 +289,32 @@ default: break; } + if ( f_W2VInput1->getBoolValue() ){ + const PagedImg *inImage1 = getNonDummyUpdatedInImg( 0 ); + if ( inImage1 ){ + const Vector3 v1 = inImage1->mapWorldToVoxel(Vector3(box1.v1[0],box1.v1[1],box1.v1[2])); + const Vector3 v2 = inImage1->mapWorldToVoxel(Vector3(box1.v2[0],box1.v2[1],box1.v2[2])); + box1.v1[0] = v1[0]; + box1.v1[1] = v1[1]; + box1.v1[2] = v1[2]; + box1.v2[0] = v2[0]; + box1.v2[1] = v2[1]; + box1.v2[2] = v2[2]; + } + } + if ( f_V2WInput0->getBoolValue() ){ + const PagedImg *inImage1 = getNonDummyUpdatedInImg( 1 ); + if ( inImage1 ){ + const Vector3 v1 = inImage1->mapVoxelToWorld(Vector3(box1.v1[0],box1.v1[1],box1.v1[2])); + const Vector3 v2 = inImage1->mapVoxelToWorld(Vector3(box1.v2[0],box1.v2[1],box1.v2[2])); + box1.v1[0] = v1[0]; + box1.v1[1] = v1[1]; + box1.v1[2] = v1[2]; + box1.v2[0] = v2[0]; + box1.v2[1] = v2[1]; + box1.v2[2] = v2[2]; + } + } if ( f_CorrectInput1->getBoolValue() ){ box1.correct(); } Modified: trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.h =================================================================== --- trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.h 2010-07-23 10:18:48 UTC (rev 296) +++ trunk/Community/General/Sources/ML/MLCMCoordinate/BoxArithmetic/mlBoxArithmetic.h 2010-07-23 13:20:08 UTC (rev 297) @@ -58,7 +58,7 @@ BoxArithmetic (); //! Handle field changes of the field field. - virtual void handleNotification (Field * /*field*/); + virtual void handleNotification (Field * field); private: @@ -67,6 +67,10 @@ SubImgBoxfField *f_InBox1; BoolField *f_CorrectInput0; BoolField *f_CorrectInput1; + BoolField *f_V2WInput0; + BoolField *f_V2WInput1; + BoolField *f_W2VInput0; + BoolField *f_W2VInput1; BoolField *f_UseVoxelCenter; SubImgBoxfField *f_OutBox; SubImgBoxfField *f_OutBox0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <of...@us...> - 2010-07-23 10:18:54
|
Revision: 296 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=296&view=rev Author: ofriman Date: 2010-07-23 10:18:48 +0000 (Fri, 23 Jul 2010) Log Message: ----------- Added boost_filesystem to .pro file to (try to) fix a problem in the Linux build. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro 2010-07-22 15:38:58 UTC (rev 295) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro 2010-07-23 10:18:48 UTC (rev 296) @@ -17,7 +17,7 @@ WARN = HIGH # add used projects here (see included pri files below for available projects) -CONFIG += dll ML MLCSO MLDicomTree_OFFIS MLDicomTreeImagePropertyExtension +CONFIG += dll ML MLCSO MLDicomTree_OFFIS MLDicomTreeImagePropertyExtension boost_filesystem MLAB_PACKAGES += MeVisLab_Standard This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rha...@us...> - 2010-07-22 15:39:05
|
Revision: 295 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=295&view=rev Author: rhameeteman Date: 2010-07-22 15:38:58 +0000 (Thu, 22 Jul 2010) Log Message: ----------- KH. * Replaced wakupCommand with Execute to be able to clone the GUI Modified Paths: -------------- trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.mlab 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 2010-07-22 14:53:21 UTC (rev 294) +++ trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.mlab 2010-07-22 15:38:58 UTC (rev 295) @@ -489,8 +489,8 @@ moduleGroupName = "" windows { window _default { - geometry = "-44 218 456 602" - sizeHint = "456 602" + geometry = "232 190 414 550" + sizeHint = "414 550" wasOpen = no wasActive = no } @@ -505,7 +505,6 @@ useInventorComposition = FALSE composeMatrix = TRUE scale = "1 1 1" - rotationAngles = "0 0 0" rotation = "0 0 1 0" translation = "0 0 0" center = "0 0 0" @@ -514,7 +513,6 @@ autoCenter = TRUE interpolation = Trilinear memoryAccess = Global - isVectorUpdateEnabled = FALSE } } module Bypass { @@ -654,8 +652,9 @@ useGlobalInputImage = TRUE snapToCenter = FALSE alternCubeLayout = FALSE + timePoint = 0 borderOn = TRUE - borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + borderColor = "0.899999976158142 0.899999976158142 0.899999976158142" greyWidth = 1 greyCenter = 1 annotationOn = TRUE @@ -702,7 +701,6 @@ In10.noBypass = In9.noBypass In9.noBypass = In8.noBypass In8.noBypass = In7.noBypass - SoGroup.children = "" In7.noBypass = In6.noBypass In6.noBypass = In5.noBypass In5.noBypass = In4.noBypass @@ -710,7 +708,6 @@ In3.noBypass = In2.noBypass In2.noBypass = In1.noBypass In1.noBypass = In0.noBypass - Dummy.children = "" OrthoView2D0.image = In0.output0 OrthoView2D0.worldPosition = SyncPos.vector2 } Modified: trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script =================================================================== --- trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script 2010-07-22 14:53:21 UTC (rev 294) +++ trunk/Community/General/Modules/Macros/Viewers/nSyncViewer.script 2010-07-22 15:38:58 UTC (rev 295) @@ -187,7 +187,7 @@ } DynamicFrame { name = ViewerFrame autoSize = Yes } } - wakeupCommand = NumberOfInputChanged + Execute = NumberOfInputChanged FieldListener numberOfInputs { command = NumberOfInputChanged } FieldListener singleInvInput { command = NumberOfInputChanged } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <of...@us...> - 2010-07-22 14:53:27
|
Revision: 294 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=294&view=rev Author: ofriman Date: 2010-07-22 14:53:21 +0000 (Thu, 22 Jul 2010) Log Message: ----------- Added newline at the end of file to remove Linux warning. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-22 14:49:14 UTC (rev 293) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-22 14:53:21 UTC (rev 294) @@ -41,4 +41,4 @@ ML_END_NAMESPACE -#endif \ No newline at end of file +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <of...@us...> - 2010-07-22 14:49:21
|
Revision: 293 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=293&view=rev Author: ofriman Date: 2010-07-22 14:49:14 +0000 (Thu, 22 Jul 2010) Log Message: ----------- Added header files again, but corrected spelling (uppercase/lowercase) to match the exact filenames. Linux will not find the files otherwise. Changed a few "unsigned int" to "size_t" to remove "data loss" compile warnings. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-22 08:31:44 UTC (rev 292) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-22 14:49:14 UTC (rev 293) @@ -13,15 +13,6 @@ #ifndef __mlRTStructure_H #define __mlRTStructure_H #include "MLCSOToRTStructureSystem.h" -#include <DCMTree_Lib.h> -#include "DCMTree_IOParameter.h" -#include "DCMTree_Reader.h" -#include "DCMTree_Dict.h" -#include "DCMTree_Tag.h" -#include "DCMTree_Value.h" -#include "DCMTree_Unicode.h" -#include "DCMTree_Writer.h" -#include <CSOBase/CSOList.h> #include "mlBase.h" ML_START_NAMESPACE Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-22 08:31:44 UTC (rev 292) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-22 14:49:14 UTC (rev 293) @@ -412,7 +412,7 @@ //---------------------------------------------------------------------------------- void CSOToRTStructure::addRTROIObTags(DCMTree::TagPtr RTROIObTag, DCMTree::TreePtr /*RTROIObSeq*/) { - unsigned int seqSize = RTROIObTag->sequenceItems().size(); + size_t seqSize = RTROIObTag->sequenceItems().size(); if (seqSize != 0) { RTROIObTag->sequenceItems().erase(RTROIObTag->sequenceItems().begin(), RTROIObTag->sequenceItems().end()); @@ -500,7 +500,7 @@ ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); return false; } - unsigned int seqSize = csoTag->sequenceItems().size(); + size_t seqSize = csoTag->sequenceItems().size(); if (seqSize != 0) { csoTag->sequenceItems().erase(csoTag->sequenceItems().begin(), csoTag->sequenceItems().end()); @@ -527,7 +527,7 @@ DCMTree::TreePtr childGTree(new DCMTree::Tree()); addSequence(csoGTree, childGTree, DCMTree::TagId(0x3006,0x0040)); DCMTree::TagPtr childGTag = csoGTree->getTag_rw(DCMTree::TagId(0x3006, 0x0040)); - unsigned int seqGSize = childGTag->sequenceItems().size(); + size_t seqGSize = childGTag->sequenceItems().size(); if (seqGSize != 0) { childGTag->sequenceItems().erase(childGTag->sequenceItems().begin(), childGTag->sequenceItems().end()); @@ -555,7 +555,7 @@ addTag(seqTree, DCMTree::TagId(0x0008,0x1150),_refSopClassUID, DCMTree::UI); addTag(seqTree, DCMTree::TagId(0x0008,0x1155),refUID, DCMTree::UI); addTag(csoCTree, DCMTree::TagId(0x3006,0x0042),"CLOSED_PLANAR", DCMTree::CS); - unsigned int ptNum = 0; + size_t ptNum = 0; for (unsigned int i = 0; i < cso->numPathPointLists(); i ++){ ml::CSOPathPoints* pt = cso->getPathPointsAt(i); std::vector<vec3> vec; Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h 2010-07-22 08:31:44 UTC (rev 292) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h 2010-07-22 14:49:14 UTC (rev 293) @@ -15,13 +15,13 @@ // Local includes -#include <DCMTree_UIDGenerator.h> +#include "DCMTree_UIDGenerator.h" #include "MLCSOToRTStructureSystem.h" #include <CSOBase/CSOList.h> // ML includes #include "mlOperatorIncludes.h" -#include <DCMTree_Lib.h> +#include "DCMTree_Lib.h" #include "DCMTree_IOParameter.h" #include "DCMTree_Reader.h" #include "DCMTree_Dict.h" @@ -29,10 +29,12 @@ #include "DCMTree_Value.h" #include "DCMTree_Unicode.h" #include "DCMTree_Writer.h" +#include "DCMTree_Exception.h" +#include "DCMTree_Message.h" +#include "DCMTree_DicomTags.h" #include "RTStructure.h" - ML_START_NAMESPACE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <of...@us...> - 2010-07-22 08:31:50
|
Revision: 292 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=292&view=rev Author: ofriman Date: 2010-07-22 08:31:44 +0000 (Thu, 22 Jul 2010) Log Message: ----------- Remove a few errors/warnings in the Linux build. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro 2010-07-22 08:20:14 UTC (rev 291) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro 2010-07-22 08:31:44 UTC (rev 292) @@ -19,8 +19,7 @@ # add used projects here (see included pri files below for available projects) CONFIG += dll ML MLCSO MLDicomTree_OFFIS MLDicomTreeImagePropertyExtension -MLAB_PACKAGES += STUMevisApp_General \ - MeVisLab_Standard +MLAB_PACKAGES += MeVisLab_Standard # make sure that this file is included after CONFIG and MLAB_PACKAGES include ($(MLAB_MeVis_Foundation)/Configuration/IncludePackages.pri) Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-22 08:20:14 UTC (rev 291) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-22 08:31:44 UTC (rev 292) @@ -21,9 +21,6 @@ #include "DCMTree_Value.h" #include "DCMTree_Unicode.h" #include "DCMTree_Writer.h" -#include <dcmtree_dicomtags.h> -#include <dcmtree_exception.h> -#include <dcmtree_message.h> #include <CSOBase/CSOList.h> #include "mlBase.h" Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-22 08:20:14 UTC (rev 291) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-22 08:31:44 UTC (rev 292) @@ -410,7 +410,7 @@ //---------------------------------------------------------------------------------- //! Add the RTR IOB Tags in RT structure //---------------------------------------------------------------------------------- -void CSOToRTStructure::addRTROIObTags(DCMTree::TagPtr RTROIObTag, DCMTree::TreePtr RTROIObSeq) +void CSOToRTStructure::addRTROIObTags(DCMTree::TagPtr RTROIObTag, DCMTree::TreePtr /*RTROIObSeq*/) { unsigned int seqSize = RTROIObTag->sequenceItems().size(); if (seqSize != 0) { @@ -485,7 +485,7 @@ //---------------------------------------------------------------------------------- //! add CSO Tags into RT structure //---------------------------------------------------------------------------------- -bool CSOToRTStructure::addCSOTags(DCMTree::TagPtr csoTag, DCMTree::TreePtr contourTree) { +bool CSOToRTStructure::addCSOTags(DCMTree::TagPtr csoTag, DCMTree::TreePtr /*contourTree*/) { if (_inputCSOs== NULL){ ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <of...@us...> - 2010-07-22 08:20:20
|
Revision: 291 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=291&view=rev Author: ofriman Date: 2010-07-22 08:20:14 +0000 (Thu, 22 Jul 2010) Log Message: ----------- Updated README.txt Modified Paths: -------------- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/README.txt Modified: trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/README.txt =================================================================== --- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/README.txt 2010-07-21 22:53:47 UTC (rev 290) +++ trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/README.txt 2010-07-22 08:20:14 UTC (rev 291) @@ -11,6 +11,8 @@ - Python 2.5 (Python 3.0 or higher will not work). - A local installation of Matlab. + - Linux only: the C Shell csh + If you use Windows, the free Visual Studio Express version may be used as compiler. @@ -42,8 +44,8 @@ - That you started the Release mode of MeVisLab if you compiled in release mode, or in Debug mode if you compiled in debug mode. - - That the path to the Matlab DLL-files is known to the system. Under Windows, you may have to modify the - PATH environment variable manually (this has been reported with the Matlab 2009 versions). The Matlab + - That the path to the Matlab DLL-files is not known to the system. Under Windows, you may have to add the path + to the Matlab DLL-files to the PATH environment variable manually. The Matlab DLL files are found in a subdirectory in the $MATLABROOT$/bin/ directory, e.g., in C:\Program Files\MATLAB\R2007b\bin\win32 Make sure that this directory is in the PATH environment variable and restart MeVisLab after the PATH variable @@ -57,7 +59,6 @@ If you experience troubles, please search the MeVisLab forum http://www.mevis-research.de/cgi-bin/discus/discus.cgi - General hints: - Under Windows, you may have to execute the command "matlab \regserver" from a Windows command prompt (not the Matlab prompt!). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-07-21 22:53:53
|
Revision: 290 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=290&view=rev Author: linaliu Date: 2010-07-21 22:53:47 +0000 (Wed, 21 Jul 2010) Log Message: ----------- add more error handling Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-21 22:49:29 UTC (rev 289) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-21 22:53:47 UTC (rev 290) @@ -89,7 +89,10 @@ writeToDCMFile(_genTreePtr, _rtStructFileFld->getStringValue()); } } - } + }else { + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "There is no DICOM header information in the provided input image. RTStructure file cannot be generated."); + return; + } setValid(this); } @@ -187,6 +190,8 @@ DicomTreeImagePropertyExtension* propertyExtension = reinterpret_cast<DicomTreeImagePropertyExtension*> (propertyContainer.getFirstEntryOfType(runtimeType)); DCMTree::Const_TreePtr dicomTreePtr = getDicomTreeFromImagePropertyExtension(propertyExtension); + if (dicomTreePtr == NULL) + return; ml::Vector ext = img->getImgExt(); DCMTree::TreePtr childTreePtr(new DCMTree::Tree()); childTreePtr = dicomTreePtr->copy(); @@ -435,12 +440,12 @@ //---------------------------------------------------------------------------------- bool CSOToRTStructure::addCSOGroupTags(DCMTree::TagPtr csoGroupTag, std::string refFOfRef) { if (_inputCSOs== NULL){ - ML_PRINT_ERROR("mlRefImgCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOGroupTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); return false; } unsigned int groupNum = _inputCSOs->numGroups(); if (groupNum == 0) { - ML_PRINT_ERROR("mlRefImgCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOGroupTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); return false; } for (unsigned int i=0; i < _inputCSOs->numGroups(); i++) { @@ -465,7 +470,7 @@ s << int(group->getId()); label.append(s.str()); - ML_PRINT_WARNING("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "There is no CSO group label.Add default as group [number]"); + ML_PRINT_WARNING("mlCSOToRTStructure::addCSOGroupTags",ML_BAD_PARAMETER, "There is no CSO group label.Add default as group [number]"); } itemTag3->addValue(label); childTree->addTag(childInfo1.id(), itemTag1); @@ -482,17 +487,17 @@ //---------------------------------------------------------------------------------- bool CSOToRTStructure::addCSOTags(DCMTree::TagPtr csoTag, DCMTree::TreePtr contourTree) { if (_inputCSOs== NULL){ - ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); return false; } unsigned int num = _inputCSOs->numCSO(); if (num == 0) { - ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); return false; } unsigned int groupNum = _inputCSOs->numGroups(); if (groupNum == 0) { - ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); return false; } unsigned int seqSize = csoTag->sequenceItems().size(); @@ -503,7 +508,7 @@ for (unsigned int gInd = 0; gInd < groupNum; gInd ++) { CSOGroup* group = _inputCSOs->getGroupAt(gInd); if (group == NULL || group->numCSO() == 0){ - ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because some groups donot contain any CSOs."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "RT structure file cannot be generated because some groups donot contain any CSOs."); return false; } DCMTree::TreePtr csoGTree(new DCMTree::Tree()); @@ -538,7 +543,7 @@ double z = sp->worldPosition[2]; string refUID = getRefUID(z); if (refUID.empty()){ - ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "There are no matching slices for a CSO." + cso->getId()); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "There are no matching slices for a CSO." + cso->getId()); return false; } DCMTree::TreePtr csoCTree(new DCMTree::Tree()); @@ -567,7 +572,7 @@ } childGTag->addSequenceItem(csoCTree); }else { - ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "CSO must be in one plane to proceed."); + ML_PRINT_ERROR("mlCSOToRTStructure::addCSOTags",ML_BAD_PARAMETER, "CSO must be in one plane to proceed."); return false; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-07-21 22:49:35
|
Revision: 289 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=289&view=rev Author: linaliu Date: 2010-07-21 22:49:29 +0000 (Wed, 21 Jul 2010) Log Message: ----------- replace openimage to LocalImage module and set MevisLab local data directory in this example Modified Paths: -------------- trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab Modified: trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab =================================================================== --- trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab 2010-07-21 18:10:41 UTC (rev 288) +++ trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab 2010-07-21 22:49:29 UTC (rev 289) @@ -2,6 +2,28 @@ network { watchlist = "" } +module LocalImage { + internal { + frame = "-95 357 96 56" + moduleGroupName = "" + windows { + window _default { + geometry = "356 562 458 242" + sizeHint = "458 242" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = LocalImage + name = $(DemoDataPath)/Liver1_CT_venous.small.dcm + trueName = "C:/Program Files (x86)/MeVisLab2.0rcVC8/Packages/MeVisLab/Resources/DemoData/Liver1_CT_venous.small.dcm" + autoLoad = TRUE + status = "File open" + } + internalFields = "" +} module SoCSO3DVis { internal { frame = "-51 -67 104 56" @@ -144,44 +166,6 @@ clip.rotation5 = "0.9999999403953552 0 0 1.570799946784973" } } -module OpenImage { - internal { - frame = "-251 345 120 64" - moduleGroupName = "" - windows { - window _default { - geometry = "367 249 937 737" - sizeHint = "937 737" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = ReferenceImage - previewName = "" - imageName = "" - browserRootPath = "C:/Program Files (x86)/MeVisLab2.0VC8/data" - ok = TRUE - progress = 0 - stdViewerExtOn = TRUE - hideImport = FALSE - hidePreferences = FALSE - hideCloseButtons = FALSE - settingsFile = "" - autoReload = SmartByDuration - reloadDurationLimit = 3 - useInclude = FALSE - include = datasets,results - useExclude = TRUE - exclude = slices,html,autoimg - suffix = dcm - recursive = TRUE - sortBy = Patient - sortValues = Patient,Modality,Institution,Date,FlatDatasets,Device - } - internalFields = "" -} module CSOFreehandProcessor { internal { frame = "5 245 168 56" @@ -300,7 +284,7 @@ mouseOverLineWidthLineWidth = 1 useIconFile = FALSE iconFile = $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/markerIcons.tif - internalIconFile = "C:/Program Files (x86)/MeVisLab2.0VC8/Packages/MeVisLab/Standard/Modules/Resources/Images/markerIcons.tif" + internalIconFile = "C:/Program Files (x86)/MeVisLab2.0rcVC8/Packages/MeVisLab/Standard/Modules/Resources/Images/markerIcons.tif" cutCopyKeyModifier = EDIT_OP_KEY_MOD_CONTROL copyKeyModifier = EDIT_OP_KEY_MOD_CONTROL pasteKeyModifier = EDIT_OP_KEY_MOD_CONTROL @@ -328,7 +312,7 @@ moduleGroupName = "" windows { window _default { - geometry = "281 437 1176 457" + geometry = "584 381 1173 457" sizeHint = "695 457" wasOpen = no wasActive = no @@ -379,7 +363,7 @@ groupDefaultRemoveFromGroupHandling = RemoveIfInNoGroup listSingleRemoveEmptyGroupHandling = RemoveAlways listDefaultRemoveEmptyGroupHandling = RemoveAlways - numUndos = 0 + numUndos = 16 numRedos = 0 undoStackLimit = 16 useSelectionCSONotification = FALSE @@ -396,10 +380,10 @@ enableRepaintNotification = TRUE csoTreeView = "" groupTreeView = "" - numCSOs = 0 - numGroups = 0 + numCSOs = 2 + numGroups = 1 numSelectedCSOs = 0 - numSelectedGroups = 0 + numSelectedGroups = 1 selectedCSOsGroupIds = "" csoTabSelected = FALSE groupTabSelected = FALSE @@ -426,7 +410,7 @@ moduleGroupName = "" windows { window _default { - geometry = "-565 436 919 476" + geometry = "613 621 919 476" sizeHint = "400 400" wasOpen = no wasActive = no @@ -437,7 +421,7 @@ instanceName = View2D inventorInputOn = TRUE view2DExtensionsOn = TRUE - startSlice = -1 + startSlice = 21 numSlices = 1 numXSlices = 1 sliceStep = 1 @@ -459,8 +443,8 @@ baseColor = "1 1 1" margin = "2 2" sliceOrigin = "41.05004119873047 -8.941691398620605" - lutCenter = 1 - lutWidth = 1 + lutCenter = 2047.5 + lutWidth = 3837 lutUseTraceColors = FALSE annotationOn = TRUE annotationMode = ANNO_MODE_AUTO @@ -472,7 +456,7 @@ borderOn = TRUE borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" valueHighPrecision = FALSE - plane = "0 0 1 -90.60578918457031" + plane = "0 0 1 -164.2982482910156" } internalFields = "" } @@ -490,21 +474,21 @@ addStudyUIDDIR = FALSE addSeriesUIDDIR = FALSE allSlices = TRUE - minSlice = 0 - maxSlice = 1 + minSlice = 1 + maxSlice = 61 minUsedSlice = 0 - maxUsedSlice = 0 + maxUsedSlice = 61 allTimepoints = TRUE - minTime = 0 + minTime = 1 maxTime = 1 minUsedTime = 0 - maxUsedTime = 0 + maxUsedTime = 1 displayMode1 = Input displayMode2 = All newStudyUID = FALSE newSeriesUID = TRUE - hasStudyUID = FALSE - hasSeriesUID = FALSE + hasStudyUID = TRUE + hasSeriesUID = TRUE restoreFrameSpecific = FALSE saveEnabled = TRUE storeTimeInfo = None @@ -551,10 +535,10 @@ zPos = 0 tPos = 0 uPos = 0 - zMax = 0 + zMax = 60 tMax = 0 uMax = 0 - valid = FALSE + valid = TRUE } } module DicomTagViewer { @@ -593,7 +577,7 @@ maxValueLen = 80 showPrivateTags = FALSE tagListSubset = AllTags - dicomFile = "" + dicomFile = "C:/Program Files (x86)/MeVisLab2.0rcVC8/Packages/MeVisLab/Resources/DemoData/Liver1_CT_venous.small.dcm" trimSpaces = FALSE } } @@ -601,11 +585,19 @@ internal { frame = "53 93 136 56" moduleGroupName = "" + windows { + window _default { + geometry = "870 385 619 215" + sizeHint = "255 98" + wasOpen = no + wasActive = no + } + } } fields { instanceName = CSOToRTStructure - rtStructFile = "" - valid = FALSE + rtStructFile = "c:\\testMine1.dcm" + valid = TRUE } } connections { @@ -617,7 +609,7 @@ DicomTool.inImage = CSOToRTStructure.output0 DicomFrameSelect.input0 = CSOToRTStructure.output0 DicomTagViewer.input0 = DicomFrameSelect.output0 - CSOToRTStructure.input0 = ReferenceImage.outImage + CSOToRTStructure.input0 = LocalImage.outImage CSOToRTStructure.inCSOList = CSOManager.outCSOList } networkModel = "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-07-21 18:10:47
|
Revision: 288 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=288&view=rev Author: linaliu Date: 2010-07-21 18:10:41 +0000 (Wed, 21 Jul 2010) Log Message: ----------- fix the lunix compile error on 07/21/2010 Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h Modified: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h 2010-07-21 04:35:13 UTC (rev 287) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h 2010-07-21 18:10:41 UTC (rev 288) @@ -29,9 +29,6 @@ #include "DCMTree_Value.h" #include "DCMTree_Unicode.h" #include "DCMTree_Writer.h" -#include <dcmtree_dicomtags.h> -#include <dcmtree_exception.h> -#include <dcmtree_message.h> #include "RTStructure.h" @@ -60,13 +57,13 @@ //! Configures (in)validation handling of inputs which are not connected or up to date. static std::map<std::string, std::string> _modalitySOPClassUIDMap; void activateAttachments (); - void setValidFld(bool valid) {_validFld->setToggleValue(valid);} + void setValidFld(bool valid) {_validFld->setToggleValue(valid);} static void setValid(CSOToRTStructure* obj); //! Locking variable... bool _isInNotificationCB; //! update generated Tree void updateGenTreeHeader(PagedImg *img); - + private: BaseField *_inListFld; @@ -80,11 +77,11 @@ //map of SOPInstUIDs and position std::map< float, std::string> _mSOPInstUIDs; - + //! input DCM File name StringField *_rtStructFileFld; float _voxelSizeZ; - + //! private functions //! combine general headers bool combineHeader(); @@ -110,9 +107,9 @@ void addRTROIObTags(DCMTree::TagPtr RTROIObTag, DCMTree::TreePtr RTROIObSeq); //! set valid Field void setValidField(); - - + + //! Can be notified from anywhere in the network. static void CSOListNotifyObserverCB(void* userData, int notificationFlag); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <awa...@us...> - 2010-07-21 04:35:20
|
Revision: 287 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=287&view=rev Author: awakeideas Date: 2010-07-21 04:35:13 +0000 (Wed, 21 Jul 2010) Log Message: ----------- removed temporary files Removed Paths: ------------- trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/~$OToRTStructure.html trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto Deleted: trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/~$OToRTStructure.html =================================================================== (Binary files differ) Deleted: trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto =================================================================== --- trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto 2010-07-20 23:14:25 UTC (rev 286) +++ trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto 2010-07-21 04:35:13 UTC (rev 287) @@ -1,623 +0,0 @@ -// MDL v1 utf8 -network { - watchlist = "" -} -module SoCSO3DVis { - internal { - frame = "-51 -67 104 56" - moduleGroupName = "" - } - fields { - instanceName = SoCSO3DVis - renderCaching = AUTO - boundingBoxCaching = AUTO - renderCulling = AUTO - pickCulling = AUTO - autoApply = TRUE - lineWidthOffset = 0 - markerSizeScaling = 1 - highlightSelectedGroups = TRUE - useRenderTimeDelay = FALSE - timerDelayMilliSeconds = 100 - useStylePalette = FALSE - stylePaletteUseIndexAs = USE_INDEX_FOR_CSO - listenToRepaintNotifications = FALSE - listenToFinishingNotifications = TRUE - listenToSelectionChangedNotifications = TRUE - } -} -module View3D { - internal { - frame = "-159 -179 144 56" - moduleGroupName = "" - windows { - window _default { - geometry = "457 371 959 635" - sizeHint = "959 635" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = View3D - inventorInputOn = TRUE - lutType = Ramp - currentTimePoint = 0 - lutEditorColorPoints = "[ 0 0 0 0, 4095 1 1 1 ]" - lutEditorAlphaPoints = "[ 0 0, 4095 1 ]" - lutEditorRelativeLut = FALSE - lutEditorColorInterpolation = InterpolateRGB - lutEditorAlphaFactor = 1 - orientationProjectionType = PERSPECTIVE - orientationLocation = LOWER_RIGHT - orientationOn = TRUE - orientationModel = CUBE - greyCenter = 0.162499994 - greyWidth = 0.4424997866 - camType = TRUE - camPosition = "0.8314898014068604 -0.9133433699607849 -2.074333429336548" - camOrientation = "-0.04693968221545219 -0.9805020689964294 0.19082011282444 3.519406318664551" - initialCameraOrientation = CAMERA_KEEP_AS_IS - camFar = 3.414214134 - camNear = 1.414214134 - camFocal = 2.414214134 - camHeight = 0.7853980064 - autoViewAll = TRUE - annotations = TRUE - background = TRUE - mode = VolumeRendering - interactiveQuality = Medium - quality = 1 - useTraceColors = FALSE - decoration = FALSE - staticSamplingRate = 1 - alphaFactor = 1 - colorFactor = "1 1 1" - } - internalFields { - renderer.gradientQuality = GradientQualityAutomatic - renderer.enhancementAlphaMix = 0.25 - renderer.boundaryEnhancement = FALSE - renderer.boundaryEnhancementFactor = 1 - renderer.boundaryEnhancementExponent = 1 - renderer.boundaryEnhancementGradientBias = 0 - renderer.silhouetteEnhancement = FALSE - renderer.silhouetteEnhancementExponent = 1 - renderer.silhouetteEnhancementFactor = 1 - renderer.toneShading = FALSE - renderer.toneShadingWarmColor = "0.6745100021362305 0.5333330035209656 0.1411760002374649" - renderer.toneShadingColdColor = "0 0 0.4000000059604645" - renderer.toneShadingWarmDiffuse = 0.6000000238 - renderer.toneShadingColdDiffuse = 0.200000003 - renderer.toneShadingAngle = 45 - renderer.materialAmbient = 0.6000000238 - renderer.materialDiffuse = 1 - renderer.materialSpecular = 1 - renderer.materialSpecularity = 32 - renderer.light1Enabled = TRUE - renderer.light1DiffuseIntensity = 1 - renderer.light1SpecularIntensity = 1 - renderer.light1Color = "1 1 1" - renderer.light1PolarPhi = 45 - renderer.light1PolarRho = 0 - renderer.light2Enabled = FALSE - renderer.light2DiffuseIntensity = 1 - renderer.light2SpecularIntensity = 1 - renderer.light2Color = "1 1 1" - renderer.light2PolarPhi = 0 - renderer.light2PolarRho = 0 - renderer.light3Enabled = FALSE - renderer.light3DiffuseIntensity = 1 - renderer.light3SpecularIntensity = 1 - renderer.light3Color = "1 1 1" - renderer.light3PolarPhi = -45 - renderer.light3PolarRho = 0 - renderer.sizeOutputX = 512 - renderer.sizeOutputY = 512 - renderer.sizeOutputZ = 29 - renderer.subVolumeStartX = 0 - renderer.subVolumeStartY = 0 - renderer.subVolumeStartZ = 0 - renderer.subVolumeEndX = 512 - renderer.subVolumeEndY = 512 - renderer.subVolumeEndZ = 29 - clip.hideGeometry = FALSE - clip.on = FALSE - clip.left = FALSE - clip.right = FALSE - clip.top = FALSE - clip.bottom = FALSE - clip.rear = FALSE - clip.front = FALSE - clip.translation0 = "1 0 0" - clip.translation1 = "-1 0 0" - clip.translation2 = "0 1 0" - clip.translation3 = "0 -1 0" - clip.translation4 = "0 0 1" - clip.translation5 = "0 0 -1" - clip.rotation0 = "0 0 0.9999999403953552 1.570799946784973" - clip.rotation1 = "0 0 -0.9999999403953552 1.570799946784973" - clip.rotation2 = "0 0 -1 3.141590118408203" - clip.rotation3 = "0 0 1 0" - clip.rotation4 = "-0.9999999403953552 0 0 1.570799946784973" - clip.rotation5 = "0.9999999403953552 0 0 1.570799946784973" - } -} -module OpenImage { - internal { - frame = "-251 345 120 64" - moduleGroupName = "" - windows { - window _default { - geometry = "367 249 937 737" - sizeHint = "937 737" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = ReferenceImage - previewName = "" - imageName = "" - browserRootPath = "C:/Program Files (x86)/MeVisLab2.0VC8/data" - ok = TRUE - progress = 0 - stdViewerExtOn = TRUE - hideImport = FALSE - hidePreferences = FALSE - hideCloseButtons = FALSE - settingsFile = "" - autoReload = SmartByDuration - reloadDurationLimit = 3 - useInclude = FALSE - include = datasets,results - useExclude = TRUE - exclude = slices,html,autoimg - suffix = dcm - recursive = TRUE - sortBy = Patient - sortValues = Patient,Modality,Institution,Date,FlatDatasets,Device - } - internalFields = "" -} -module CSOFreehandProcessor { - internal { - frame = "5 245 168 56" - moduleGroupName = "" - } - fields { - instanceName = CSOFreehandProcessor - addCSOToGroupWithLabel = "" - id = 0 - pathPointLineStyle = LineStyleSolid - pathPointLineWidth = 1 - pathPointColor = "1 1 0" - pathPointAlpha = 1 - markerMode = MarkerModeNone - markerSize = 2 - markerColor = "0 1 0" - markerAlpha = 1 - voxelWriteMode = VoxelWriteModeModule - voxelWriteValue = 1024 - creationMode = CreationModeClosedFreehand - interpolationMode = InterpolationModeSplineApproximation - seedPlacementPolicy = PlaceSeedPointWhileDragging - finishingMode = FinishOnRelease - minNumSeedPoints = 0 - minSeedPointDistance = 8 - shouldCloseOnFinish = TRUE - useFinishingDistance = TRUE - finishingDistance = 24 - numInterpolationSteps = 1 - } -} -module SoView2DCSOEditor { - internal { - frame = "-179 13 152 56" - moduleGroupName = "" - windows { - window _default { - geometry = "572 414 558 465" - sizeHint = "558 465" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = SoView2DCSOEditor - drawingOn = TRUE - editingOn = TRUE - maskValid = FALSE - fixZOn = TRUE - color = "1 1 1" - selectionTolerance = 24 - needsValidVoxel = TRUE - button1 = PRESSED - button2 = IGNORED - button3 = IGNORED - shift = IGNORED - control = IGNORED - alt = IGNORED - wantsAllEvents = TRUE - wantsKeyEvents = TRUE - wantsMouseWheelEvents = FALSE - setEventHandled = FALSE - ignoreHandledEvents = FALSE - createNewMode = FALSE - renderOnSlab = FALSE - clipToSlice = FALSE - cursorShape = UNDEFINED_CURSOR - shouldListenToRepaintEvents = TRUE - shouldListenToSelectionChangedEvents = TRUE - shouldListenToFinishedEvents = TRUE - generalInteractionMode = INTERACTION_MODE_EDIT - generalInteractionModeToggleKey = TOGGLE_MODE_ALT - useAntiAliasing = TRUE - useInterpolationTargetColor = TRUE - interpolationTargetColor = "1 0 0" - showBoundingBox = FALSE - boundingBoxAlpha = 0.5 - boundingBoxColor = "1 1 1" - showOnlyParallelCSOs = FALSE - showParallelDotProductLimitRadian = 0.9998999834 - shouldLevelCSO = FALSE - useStylePalette = FALSE - stylePaletteUseIndexAs = USE_INDEX_FOR_CSO - labelShowMode = LABEL_SHOW_NONE - labelAlignmentMode = LABEL_ALIGN_CENTER - labelUnitScale = LABEL_UNIT_SCALE_MM - showLabelUnits = TRUE - labelFontSize = 12 - labelUseTextShadow = TRUE - labelMarginX = 2 - labelMarginY = 2 - ghostMode = GHOST_NONE - ghostUnitMode = GHOST_UNIT_SLICE - ghostStyleAlpha = TRUE - ghostStyleStipple = TRUE - ghostStyleLineWidth = FALSE - ghostStyleBrighten = FALSE - ghostDepth = 5 - generalLabelColor = "1 1 1" - generalLabelAlpha = 1 - labelColorMode = COLOR_GENERAL - useTesselation = FALSE - tesselationColorMode = COLOR_AS_CSO - tesselationColor = "0.8999999761581421 0.5 0.8999999761581421" - tesselationAlpha = 0.200000003 - tesselationWindingRule = WR_ODD - selectGroupsParsProToto = TRUE - highlightSelectedGroups = FALSE - enableMouseOverHighlighting = TRUE - mouseOverColorMode = HIGHLIGHT_COLOR_MODE_FIXED - mouseOverColorBrightenValue = 0.8000000119 - mouseOverColorColor = "1 1 1" - mouseOverLineWidthMode = HIGHLIGHT_LINE_WIDEN - mouseOverLineWidthWidenValue = 0 - mouseOverLineWidthLineWidth = 1 - useIconFile = FALSE - iconFile = $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/markerIcons.tif - internalIconFile = "C:/Program Files (x86)/MeVisLab2.0VC8/Packages/MeVisLab/Standard/Modules/Resources/Images/markerIcons.tif" - cutCopyKeyModifier = EDIT_OP_KEY_MOD_CONTROL - copyKeyModifier = EDIT_OP_KEY_MOD_CONTROL - pasteKeyModifier = EDIT_OP_KEY_MOD_CONTROL - undoKeyModifier = EDIT_OP_KEY_MOD_CONTROL - redoKeyModifier = EDIT_OP_KEY_MOD_CONTROL - deleteSeedPointKeyModifier = EDIT_OP_KEY_MOD_NONE - deleteCSOKeyModifier = EDIT_OP_KEY_MOD_SHIFT - multiSelectionKeyModifier = EDIT_OP_KEY_MOD_CONTROL - enableMultiSelection = TRUE - cutCopyKey = EDIT_OP_KEY_X - copyKey = EDIT_OP_KEY_C - pasteKey = EDIT_OP_KEY_V - undoKey = EDIT_OP_KEY_Z - redoKey = EDIT_OP_KEY_Y - deleteSeedPointKey = EDIT_OP_KEY_DELETE - deleteCSOKey = EDIT_OP_KEY_DELETE - nextInteractionStatus = INTERACTIVE_MODE_START_CSO - forceStartNewCSOKeyModifier = EDIT_OP_KEY_MOD_NONE - forceStartNewCSOKey = EDIT_OP_KEY_F - } -} -module CSOManager { - internal { - frame = "-199 197 112 56" - moduleGroupName = "" - windows { - window _default { - geometry = "281 437 1176 457" - sizeHint = "695 457" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = CSOManager - workDirectlyOnInputCSOList = FALSE - selectLastCreatedGroup = TRUE - selectionColoringMode = SelectionColorModeFixed - selectionLineWidthMode = SelectionLineWidthWiden - selectionBrightenColor = 0.200000003 - selectionFixedColor = "1 1 0.6000000238418579" - selectionWidenLineWidth = 1 - selectionFixedLineWidth = 2 - csoDefaultLabel = "" - csoDefaultDescription = "" - csoDefaultShowState = TRUE - csoDefaultVoxelizeState = TRUE - csoDefaultEditableState = TRUE - groupSingleDeleteGroupCSOHandling = RemoveIfInNoGroup - groupDefaultLabel = "" - groupDefaultDescription = "" - groupDefaultLineStyle = LineStyleSolid - groupDefaultColor = "1 1 1" - groupDefaultAlpha = 1 - groupDefaultLineWidth = 1 - groupDefaultShowState = TRUE - groupDefaultVoxelizeState = TRUE - groupDefaultEditableState = TRUE - groupDefaultTimePointIndex = 0 - groupDefaultUseVisuals = FALSE - groupDefaultUseShowState = FALSE - groupDefaultUseVoxelizeState = FALSE - groupDefaultUseEditableState = FALSE - groupDefaultUseTimePointIndex = FALSE - groupDefaultUseVoxelWrite = FALSE - groupDefaultVoxelWriteMode = VoxelWriteModeModule - groupDefaultVoxelWriteValue = 1024 - groupDefaultUseMarkerSettings = FALSE - groupDefaultMarkerMode = MarkerModeRect - groupDefaultMarkerColor = "0 1 0" - groupDefaultMarkerAlpha = 1 - groupDefaultMarkerSize = 3 - groupDefaultNumMaximumCSOs = 0 - groupDefaultOverflowHandling = RemoveFirst - groupDefaultRemoveFromGroupHandling = RemoveIfInNoGroup - listSingleRemoveEmptyGroupHandling = RemoveAlways - listDefaultRemoveEmptyGroupHandling = RemoveAlways - numUndos = 0 - numRedos = 0 - undoStackLimit = 16 - useSelectionCSONotification = FALSE - useSelectionGroupNotification = FALSE - useFinishedCSONotification = TRUE - useFinishedGroupNotification = TRUE - useCSOMovedNotification = FALSE - useRepaintNotification = FALSE - useInteractionInitNotification = FALSE - useStartNewCSONotification = FALSE - enableSelectionNotification = TRUE - enableFinishedNotification = TRUE - enableCSOMovedNotification = TRUE - enableRepaintNotification = TRUE - csoTreeView = "" - groupTreeView = "" - numCSOs = 0 - numGroups = 0 - numSelectedCSOs = 0 - numSelectedGroups = 0 - selectedCSOsGroupIds = "" - csoTabSelected = FALSE - groupTabSelected = FALSE - selectionTabSelected = FALSE - notificationTabSelected = TRUE - defaultTabSelected = FALSE - csoCommonTabSelected = FALSE - csoVisualsTabSelected = TRUE - groupCommonTabSelected = FALSE - groupVisualsTabSelected = TRUE - groupMiscTabSelected = FALSE - notificationControlTabSelected = FALSE - notificationOutputCSOTabSelected = FALSE - notificationOutputGroupTabSelected = TRUE - defaultCSOCommonTabSelected = FALSE - defaultGroupCommonTabSelected = FALSE - defaultGroupVisualsTabSelected = FALSE - defaultGroupMiscTabSelected = FALSE - } -} -module View2D { - internal { - frame = "-331 -155 120 56" - moduleGroupName = "" - windows { - window _default { - geometry = "-565 436 919 476" - sizeHint = "400 400" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = View2D - inventorInputOn = TRUE - view2DExtensionsOn = TRUE - startSlice = 0 - numSlices = 1 - numXSlices = 1 - sliceStep = 1 - slab = 1 - blendMode = BLEND_REPLACE - timePoint = 0 - maxTimePoint = 0 - filterMode = FILTER_LINEAR - standardKeys = TRUE - cineMode = CINE_Z - cineDirection = CINE_PINGPONG - cineRepeat = CINE_ONCE - cineSpeed = 0.1000000015 - snapToCenter = FALSE - zoomMode = VIEW2D_AUTO_ZOOM - unzoomOnImageChange = FALSE - sliceZoom = 1 - sliceZoomSynced = 1 - baseColor = "1 1 1" - margin = "2 2" - sliceOrigin = "41.05004119873047 -8.941691398620605" - lutCenter = 1 - lutWidth = 1 - lutUseTraceColors = FALSE - annotationOn = TRUE - annotationMode = ANNO_MODE_AUTO - annotationSizeMode = ANNO_SHOW_DETAILED - annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" - annotationFontSize = ANNO_SIZE_AUTO - annoCoords = Voxel - annoCTValue = AsIs - borderOn = TRUE - borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" - valueHighPrecision = FALSE - plane = "0 0 1 -90.60578918457031" - } - internalFields = "" -} -module DicomTool { - internal { - frame = "21 -267 88 56" - moduleGroupName = "" - } - fields { - instanceName = DicomTool - exportDir = "" - exportBaseDir = "" - exportNameTemplate = $S/export$T.dcm - addPatNameDir = FALSE - addStudyUIDDIR = FALSE - addSeriesUIDDIR = FALSE - allSlices = TRUE - minSlice = 0 - maxSlice = 1 - minUsedSlice = 0 - maxUsedSlice = 0 - allTimepoints = TRUE - minTime = 0 - maxTime = 1 - minUsedTime = 0 - maxUsedTime = 0 - displayMode1 = Input - displayMode2 = All - newStudyUID = FALSE - newSeriesUID = TRUE - hasStudyUID = FALSE - hasSeriesUID = FALSE - restoreFrameSpecific = FALSE - saveEnabled = TRUE - storeTimeInfo = None - dicomComment = MeVisLab - canCancel = TRUE - progress = 0 - status = "" - dicomConsole = "" - consoleAutoClear = TRUE - dicomOutput = "" - echoVerbose = TRUE - echoDebug = FALSE - storeVerbose = TRUE - storeDebug = FALSE - dicomConfigList = LinaTest - currentConfigSet = LinaTest - dicomName = LinaTest - dicomType = PACS - dicomCalledAET = "" - dicomCallingAET = "" - dicomHostname = localhost - dicomPort = 104 - autoLoadConfig = TRUE - exportAsDerived = TRUE - } - internalFields = "" -} -module DicomFrameSelect { - internal { - frame = "197 -43 136 56" - moduleGroupName = "" - windows { - window _default { - geometry = "807 540 312 164" - sizeHint = "312 164" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = DicomFrameSelect - selectTagScope = SharedAndSpecificTags - zPos = 0 - tPos = 0 - uPos = 0 - zMax = 0 - tMax = 0 - uMax = 0 - valid = FALSE - } -} -module DicomTagViewer { - internal { - frame = "193 -203 128 56" - moduleGroupName = "" - windows { - window _default { - geometry = "741 425 445 394" - sizeHint = "445 394" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = DicomTagViewer - tagName0 = "" - tagValue0 = "" - tagName1 = "" - tagValue1 = "" - tagName2 = "" - tagValue2 = "" - tagName3 = "" - tagValue3 = "" - tagName4 = "" - tagValue4 = "" - tagName5 = "" - tagValue5 = "" - tagName6 = "" - tagValue6 = "" - tagName7 = "" - tagValue7 = "" - tagName8 = "" - tagValue8 = "" - maxValueLen = 80 - showPrivateTags = FALSE - tagListSubset = AllTags - dicomFile = "" - trimSpaces = FALSE - } -} -module CSOToRTStructure { - internal { - frame = "53 93 136 56" - moduleGroupName = "" - } - fields { - instanceName = CSOToRTStructure - rtStructFile = "" - valid = FALSE - } -} -connections { - View3D.inInvPreLUT = SoCSO3DVis.self - SoView2DCSOEditor.inCSOList = CSOManager.outCSOList - SoView2DCSOEditor.inProcessor = CSOFreehandProcessor.outProcessorData - View2D.inImage = CSOToRTStructure.output0 - View2D.inInvPreLUT = SoView2DCSOEditor.self - DicomTool.inImage = CSOToRTStructure.output0 - DicomFrameSelect.input0 = CSOToRTStructure.output0 - DicomTagViewer.input0 = DicomFrameSelect.output0 - CSOToRTStructure.input0 = ReferenceImage.outImage - CSOToRTStructure.inCSOList = CSOManager.outCSOList -} -networkModel = "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-07-20 23:14:32
|
Revision: 286 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=286&view=rev Author: linaliu Date: 2010-07-20 23:14:25 +0000 (Tue, 20 Jul 2010) Log Message: ----------- add CSOToRTStructure module Added Paths: ----------- trunk/Community/General/Modules/ML/MLCSOToRTStructure/ trunk/Community/General/Modules/ML/MLCSOToRTStructure/MLCSOToRTStructure.def trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/ trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/CSOToRTStructure.html trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/~$OToRTStructure.html trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/ trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto Added: trunk/Community/General/Modules/ML/MLCSOToRTStructure/MLCSOToRTStructure.def =================================================================== --- trunk/Community/General/Modules/ML/MLCSOToRTStructure/MLCSOToRTStructure.def (rev 0) +++ trunk/Community/General/Modules/ML/MLCSOToRTStructure/MLCSOToRTStructure.def 2010-07-20 23:14:25 UTC (rev 286) @@ -0,0 +1,49 @@ +//---------------------------------------------------------------------------------- +//! MLCSOToRTStructure module definitions. +/*! +// \file MLCSOToRTStructure.def +// \author linal +// \date 2010-01-20 +*/ +//---------------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------------- +// MLModule CSOToRTStructure +//---------------------------------------------------------------------------------- +MLModule CSOToRTStructure { + DLL = "MLCSOToRTStructure" + + genre = "" + author = "linal" + status = "work-in-progress" + comment = "Generte a RT Structure and save it in a file with input ReferenceImage and CSOList on the image" + keywords = "" + seeAlso = "" + documentation = "$(LOCAL)/html/CSOToRTStructure.html" + exampleNetwork = "$(LOCAL)/networks/CSOToRTStructureExample.mlab" + + + +Window { + Category "Main" { + Vertical { + Box "DCM file" { + Field rtStructFile { + title = "DCM File Name: " + expandX = YES + browseButton = yes + browseMode = save + } + Horizontal { + Checkbox valid { edit = no } + Button "apply" { + } // apply + } // Horizontal + } //Box +} //Vertical +} //Catgegory +} // Window + +} // MLModule CSOToRTStructure + Added: trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/CSOToRTStructure.html =================================================================== --- trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/CSOToRTStructure.html (rev 0) +++ trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/CSOToRTStructure.html 2010-07-20 23:14:25 UTC (rev 286) @@ -0,0 +1,255 @@ +<html xmlns:v="urn:schemas-microsoft-com:vml" +xmlns:o="urn:schemas-microsoft-com:office:office" +xmlns:w="urn:schemas-microsoft-com:office:word" +xmlns="http://www.w3.org/TR/REC-html40"> + +<head> +<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> +<meta name=ProgId content=Word.Document> +<meta name=Generator content="Microsoft Word 11"> +<meta name=Originator content="Microsoft Word 11"> +<link rel=File-List href="CSOToRTStructure_files/filelist.xml"> +<link rel=Edit-Time-Data href="CSOToRTStructure_files/editdata.mso"> +<!--[if !mso]> +<style> +v\:* {behavior:url(#default#VML);} +o\:* {behavior:url(#default#VML);} +w\:* {behavior:url(#default#VML);} +.shape {behavior:url(#default#VML);} +</style> +<![endif]--> +<title>Module Help Page</title> +<!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Author>lina Liu</o:Author> + <o:Template>Normal</o:Template> + <o:LastAuthor>lina Liu</o:LastAuthor> + <o:Revision>4</o:Revision> + <o:TotalTime>7</o:TotalTime> + <o:Created>2010-07-20T22:12:00Z</o:Created> + <o:LastSaved>2010-07-20T22:19:00Z</o:LastSaved> + <o:Pages>1</o:Pages> + <o:Words>265</o:Words> + <o:Characters>1517</o:Characters> + <o:Company>Stanford University </o:Company> + <o:Lines>12</o:Lines> + <o:Paragraphs>3</o:Paragraphs> + <o:CharactersWithSpaces>1779</o:CharactersWithSpaces> + <o:Version>11.9999</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:Zoom>150</w:Zoom> + <w:GrammarState>Clean</w:GrammarState> + <w:ValidateAgainstSchemas/> + <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> + <w:IgnoreMixedContent>false</w:IgnoreMixedContent> + <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> + <w:Compatibility> + <w:UseFELayout/> + </w:Compatibility> + <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> + </w:WordDocument> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> + </w:LatentStyles> +</xml><![endif]--> +<style> +<!-- + /* Font Definitions */ + @font-face + {font-family:SimSun; + panose-1:2 1 6 0 3 1 1 1 1 1; + mso-font-alt:\5B8B\4F53; + mso-font-charset:134; + mso-generic-font-family:auto; + mso-font-pitch:variable; + mso-font-signature:3 135135232 16 0 262145 0;} +@font-face + {font-family:"\@SimSun"; + panose-1:2 1 6 0 3 1 1 1 1 1; + mso-font-charset:134; + mso-generic-font-family:auto; + mso-font-pitch:variable; + mso-font-signature:3 135135232 16 0 262145 0;} + /* Style Definitions */ + p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:SimSun;} +span.GramE + {mso-style-name:""; + mso-gram-e:yes;} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style> +<!--[if gte mso 10]> +<style> + /* Style Definitions */ + table.MsoNormalTable + {mso-style-name:"Table Normal"; + mso-tstyle-rowband-size:0; + mso-tstyle-colband-size:0; + mso-style-noshow:yes; + mso-style-parent:""; + mso-padding-alt:0in 5.4pt 0in 5.4pt; + mso-para-margin:0in; + mso-para-margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:10.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman"; + mso-ansi-language:#0400; + mso-fareast-language:#0400; + mso-bidi-language:#0400;} +</style> +<![endif]--> +<meta name=Description content="MeVisLab module help page template"> +</head> + +<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'> + +<div class=Section1> + +<p class=MsoNormal align=center style='text-align:center'><a href="#Purpose">Purpose</a> +<a href="#Usage">Usage</a> <a href="#Details">Details</a> +<a href="#Inputs">Inputs</a> <a href="#Outputs">Outputs</a> +<a href="#Parameters">Parameters</a> <a href="#EventInteract">Events&Interaction</a> +<a href="#Example">Example</a> <a href="#Tips&Tricks">Tips&Tricks</a> +<a href="#KnownBugs">Known Bugs</a> </p> + +<div class=MsoNormal align=center style='text-align:center'> + +<hr size=2 width="100%" align=center> + +</div> + +<h2>TestFilter</h2> + +<h3><a name=Purpose></a>Purpose</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>Create RT structure and save it to a DCM file with input image +and CSOList on it.</p> + +</blockquote> + +<h3><a name=Usage></a>Usage</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal><span class=GramE>provide</span> input image and a CSOList, open +the panel, make sure "Valid" is checked, specify the DCM file in the +panel, hit "Apply" to save it. </p> + +</blockquote> + +<h3><a name=Details></a>Details</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>Here a detailed description about use cases, special +features and advanced algorithm information.</p> + +</blockquote> + +<h3><a name=Inputs></a>Inputs</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal><span class=GramE>reference</span> image and CSOList</p> + +</blockquote> + +<h3><a name=Outputs></a>Outputs</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>Describe the number, content, properties, validity etc. of +the available output images and <b>Base</b> objects.</p> + +</blockquote> + +<h3><a name=Parameters></a>Parameters</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<h4>Main Panel</h4> + +<p class=MsoNormal>Describe all parameters and defaults of the main panel here:</p> + +<p class=MsoNormal><span style='mso-spacerun:yes'>\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0 </span><b>DCM file</b></p> + +<p class=MsoNormal><span style='mso-spacerun:yes'>\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0 </span>specify the +DCM file name to save</p> + +<div style='margin-left:30.0pt'> + +<p class=MsoNormal><br> +<span class=GramE><b>Browse</b><br> +open</span> the file browser and specify a directory and a dcm file to save </p> + +<p class=MsoNormal><br> +<b>Apply</b><br> +save the RT structure to a file</p> + +</div> + +<p class=MsoNormal><o:p> </o:p></p> + +</blockquote> + +<h3><a name=EventInteract></a>Events & Interaction</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>Describe which mouse clicks or movements, or keystrokes are +needed for proper operation or how they are influenced by certain parameters. +Also the usage of other or untypical devices should be discussed here. </p> + +</blockquote> + +<h3><a name=Example></a>Example</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>Describe functionality, usage, important modules and other +properties of the example network. </p> + +</blockquote> + +<h3><a name="Tips&Tricks"></a>Tips & Tricks</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>In this section other usage contexts, tips and tricks, or +specific and useful parameter combination should be discussed.</p> + +</blockquote> + +<h3><a name=KnownBugs></a>Known Bugs</h3> + +<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'> + +<p class=MsoNormal>Limitations, problems, bugs, and other untypical module +behaviours should be documented here.</p> + +</blockquote> + +</div> + +</body> + +</html> Added: trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/~$OToRTStructure.html =================================================================== (Binary files differ) Property changes on: trunk/Community/General/Modules/ML/MLCSOToRTStructure/html/~$OToRTStructure.html ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab =================================================================== --- trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab (rev 0) +++ trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab 2010-07-20 23:14:25 UTC (rev 286) @@ -0,0 +1,623 @@ +// MDL v1 utf8 +network { + watchlist = "" +} +module SoCSO3DVis { + internal { + frame = "-51 -67 104 56" + moduleGroupName = "" + } + fields { + instanceName = SoCSO3DVis + renderCaching = AUTO + boundingBoxCaching = AUTO + renderCulling = AUTO + pickCulling = AUTO + autoApply = TRUE + lineWidthOffset = 0 + markerSizeScaling = 1 + highlightSelectedGroups = TRUE + useRenderTimeDelay = FALSE + timerDelayMilliSeconds = 100 + useStylePalette = FALSE + stylePaletteUseIndexAs = USE_INDEX_FOR_CSO + listenToRepaintNotifications = FALSE + listenToFinishingNotifications = TRUE + listenToSelectionChangedNotifications = TRUE + } +} +module View3D { + internal { + frame = "-159 -179 144 56" + moduleGroupName = "" + windows { + window _default { + geometry = "457 371 959 635" + sizeHint = "959 635" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = View3D + inventorInputOn = TRUE + lutType = Ramp + currentTimePoint = 0 + lutEditorColorPoints = "[ 0 0 0 0, 4095 1 1 1 ]" + lutEditorAlphaPoints = "[ 0 0, 4095 1 ]" + lutEditorRelativeLut = FALSE + lutEditorColorInterpolation = InterpolateRGB + lutEditorAlphaFactor = 1 + orientationProjectionType = PERSPECTIVE + orientationLocation = LOWER_RIGHT + orientationOn = TRUE + orientationModel = CUBE + greyCenter = 0.162499994 + greyWidth = 0.4424997866 + camType = TRUE + camPosition = "0.8314898014068604 -0.9133433699607849 -2.074333429336548" + camOrientation = "-0.04693968594074249 -0.9805021286010742 0.1908201277256012 3.519406318664551" + initialCameraOrientation = CAMERA_KEEP_AS_IS + camFar = 3.414214134 + camNear = 1.414214134 + camFocal = 2.414214134 + camHeight = 0.7853980064 + autoViewAll = TRUE + annotations = TRUE + background = TRUE + mode = VolumeRendering + interactiveQuality = Medium + quality = 1 + useTraceColors = FALSE + decoration = FALSE + staticSamplingRate = 1 + alphaFactor = 1 + colorFactor = "1 1 1" + } + internalFields { + renderer.gradientQuality = GradientQualityAutomatic + renderer.enhancementAlphaMix = 0.25 + renderer.boundaryEnhancement = FALSE + renderer.boundaryEnhancementFactor = 1 + renderer.boundaryEnhancementExponent = 1 + renderer.boundaryEnhancementGradientBias = 0 + renderer.silhouetteEnhancement = FALSE + renderer.silhouetteEnhancementExponent = 1 + renderer.silhouetteEnhancementFactor = 1 + renderer.toneShading = FALSE + renderer.toneShadingWarmColor = "0.6745100021362305 0.5333330035209656 0.1411760002374649" + renderer.toneShadingColdColor = "0 0 0.4000000059604645" + renderer.toneShadingWarmDiffuse = 0.6000000238 + renderer.toneShadingColdDiffuse = 0.200000003 + renderer.toneShadingAngle = 45 + renderer.materialAmbient = 0.6000000238 + renderer.materialDiffuse = 1 + renderer.materialSpecular = 1 + renderer.materialSpecularity = 32 + renderer.light1Enabled = TRUE + renderer.light1DiffuseIntensity = 1 + renderer.light1SpecularIntensity = 1 + renderer.light1Color = "1 1 1" + renderer.light1PolarPhi = 45 + renderer.light1PolarRho = 0 + renderer.light2Enabled = FALSE + renderer.light2DiffuseIntensity = 1 + renderer.light2SpecularIntensity = 1 + renderer.light2Color = "1 1 1" + renderer.light2PolarPhi = 0 + renderer.light2PolarRho = 0 + renderer.light3Enabled = FALSE + renderer.light3DiffuseIntensity = 1 + renderer.light3SpecularIntensity = 1 + renderer.light3Color = "1 1 1" + renderer.light3PolarPhi = -45 + renderer.light3PolarRho = 0 + renderer.sizeOutputX = 512 + renderer.sizeOutputY = 512 + renderer.sizeOutputZ = 29 + renderer.subVolumeStartX = 0 + renderer.subVolumeStartY = 0 + renderer.subVolumeStartZ = 0 + renderer.subVolumeEndX = 512 + renderer.subVolumeEndY = 512 + renderer.subVolumeEndZ = 29 + clip.hideGeometry = FALSE + clip.on = FALSE + clip.left = FALSE + clip.right = FALSE + clip.top = FALSE + clip.bottom = FALSE + clip.rear = FALSE + clip.front = FALSE + clip.translation0 = "1 0 0" + clip.translation1 = "-1 0 0" + clip.translation2 = "0 1 0" + clip.translation3 = "0 -1 0" + clip.translation4 = "0 0 1" + clip.translation5 = "0 0 -1" + clip.rotation0 = "0 0 0.9999999403953552 1.570799946784973" + clip.rotation1 = "0 0 -0.9999999403953552 1.570799946784973" + clip.rotation2 = "0 0 -1 3.141590118408203" + clip.rotation3 = "0 0 1 0" + clip.rotation4 = "-0.9999999403953552 0 0 1.570799946784973" + clip.rotation5 = "0.9999999403953552 0 0 1.570799946784973" + } +} +module OpenImage { + internal { + frame = "-251 345 120 64" + moduleGroupName = "" + windows { + window _default { + geometry = "367 249 937 737" + sizeHint = "937 737" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = ReferenceImage + previewName = "" + imageName = "" + browserRootPath = "C:/Program Files (x86)/MeVisLab2.0VC8/data" + ok = TRUE + progress = 0 + stdViewerExtOn = TRUE + hideImport = FALSE + hidePreferences = FALSE + hideCloseButtons = FALSE + settingsFile = "" + autoReload = SmartByDuration + reloadDurationLimit = 3 + useInclude = FALSE + include = datasets,results + useExclude = TRUE + exclude = slices,html,autoimg + suffix = dcm + recursive = TRUE + sortBy = Patient + sortValues = Patient,Modality,Institution,Date,FlatDatasets,Device + } + internalFields = "" +} +module CSOFreehandProcessor { + internal { + frame = "5 245 168 56" + moduleGroupName = "" + } + fields { + instanceName = CSOFreehandProcessor + addCSOToGroupWithLabel = "" + id = 0 + pathPointLineStyle = LineStyleSolid + pathPointLineWidth = 1 + pathPointColor = "1 1 0" + pathPointAlpha = 1 + markerMode = MarkerModeNone + markerSize = 2 + markerColor = "0 1 0" + markerAlpha = 1 + voxelWriteMode = VoxelWriteModeModule + voxelWriteValue = 1024 + creationMode = CreationModeClosedFreehand + interpolationMode = InterpolationModeSplineApproximation + seedPlacementPolicy = PlaceSeedPointWhileDragging + finishingMode = FinishOnRelease + minNumSeedPoints = 0 + minSeedPointDistance = 8 + shouldCloseOnFinish = TRUE + useFinishingDistance = TRUE + finishingDistance = 24 + numInterpolationSteps = 1 + } +} +module SoView2DCSOEditor { + internal { + frame = "-179 13 152 56" + moduleGroupName = "" + windows { + window _default { + geometry = "572 414 558 465" + sizeHint = "558 465" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SoView2DCSOEditor + drawingOn = TRUE + editingOn = TRUE + maskValid = FALSE + fixZOn = TRUE + color = "1 1 1" + selectionTolerance = 24 + needsValidVoxel = TRUE + button1 = PRESSED + button2 = IGNORED + button3 = IGNORED + shift = IGNORED + control = IGNORED + alt = IGNORED + wantsAllEvents = TRUE + wantsKeyEvents = TRUE + wantsMouseWheelEvents = FALSE + setEventHandled = FALSE + ignoreHandledEvents = FALSE + createNewMode = FALSE + renderOnSlab = FALSE + clipToSlice = FALSE + cursorShape = UNDEFINED_CURSOR + shouldListenToRepaintEvents = TRUE + shouldListenToSelectionChangedEvents = TRUE + shouldListenToFinishedEvents = TRUE + generalInteractionMode = INTERACTION_MODE_EDIT + generalInteractionModeToggleKey = TOGGLE_MODE_ALT + useAntiAliasing = TRUE + useInterpolationTargetColor = TRUE + interpolationTargetColor = "1 0 0" + showBoundingBox = FALSE + boundingBoxAlpha = 0.5 + boundingBoxColor = "1 1 1" + showOnlyParallelCSOs = FALSE + showParallelDotProductLimitRadian = 0.9998999834 + shouldLevelCSO = FALSE + useStylePalette = FALSE + stylePaletteUseIndexAs = USE_INDEX_FOR_CSO + labelShowMode = LABEL_SHOW_NONE + labelAlignmentMode = LABEL_ALIGN_CENTER + labelUnitScale = LABEL_UNIT_SCALE_MM + showLabelUnits = TRUE + labelFontSize = 12 + labelUseTextShadow = TRUE + labelMarginX = 2 + labelMarginY = 2 + ghostMode = GHOST_NONE + ghostUnitMode = GHOST_UNIT_SLICE + ghostStyleAlpha = TRUE + ghostStyleStipple = TRUE + ghostStyleLineWidth = FALSE + ghostStyleBrighten = FALSE + ghostDepth = 5 + generalLabelColor = "1 1 1" + generalLabelAlpha = 1 + labelColorMode = COLOR_GENERAL + useTesselation = FALSE + tesselationColorMode = COLOR_AS_CSO + tesselationColor = "0.8999999761581421 0.5 0.8999999761581421" + tesselationAlpha = 0.200000003 + tesselationWindingRule = WR_ODD + selectGroupsParsProToto = TRUE + highlightSelectedGroups = FALSE + enableMouseOverHighlighting = TRUE + mouseOverColorMode = HIGHLIGHT_COLOR_MODE_FIXED + mouseOverColorBrightenValue = 0.8000000119 + mouseOverColorColor = "1 1 1" + mouseOverLineWidthMode = HIGHLIGHT_LINE_WIDEN + mouseOverLineWidthWidenValue = 0 + mouseOverLineWidthLineWidth = 1 + useIconFile = FALSE + iconFile = $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/markerIcons.tif + internalIconFile = "C:/Program Files (x86)/MeVisLab2.0VC8/Packages/MeVisLab/Standard/Modules/Resources/Images/markerIcons.tif" + cutCopyKeyModifier = EDIT_OP_KEY_MOD_CONTROL + copyKeyModifier = EDIT_OP_KEY_MOD_CONTROL + pasteKeyModifier = EDIT_OP_KEY_MOD_CONTROL + undoKeyModifier = EDIT_OP_KEY_MOD_CONTROL + redoKeyModifier = EDIT_OP_KEY_MOD_CONTROL + deleteSeedPointKeyModifier = EDIT_OP_KEY_MOD_NONE + deleteCSOKeyModifier = EDIT_OP_KEY_MOD_SHIFT + multiSelectionKeyModifier = EDIT_OP_KEY_MOD_CONTROL + enableMultiSelection = TRUE + cutCopyKey = EDIT_OP_KEY_X + copyKey = EDIT_OP_KEY_C + pasteKey = EDIT_OP_KEY_V + undoKey = EDIT_OP_KEY_Z + redoKey = EDIT_OP_KEY_Y + deleteSeedPointKey = EDIT_OP_KEY_DELETE + deleteCSOKey = EDIT_OP_KEY_DELETE + nextInteractionStatus = INTERACTIVE_MODE_START_CSO + forceStartNewCSOKeyModifier = EDIT_OP_KEY_MOD_NONE + forceStartNewCSOKey = EDIT_OP_KEY_F + } +} +module CSOManager { + internal { + frame = "-199 197 112 56" + moduleGroupName = "" + windows { + window _default { + geometry = "281 437 1176 457" + sizeHint = "695 457" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = CSOManager + workDirectlyOnInputCSOList = FALSE + selectLastCreatedGroup = TRUE + selectionColoringMode = SelectionColorModeFixed + selectionLineWidthMode = SelectionLineWidthWiden + selectionBrightenColor = 0.200000003 + selectionFixedColor = "1 1 0.6000000238418579" + selectionWidenLineWidth = 1 + selectionFixedLineWidth = 2 + csoDefaultLabel = "" + csoDefaultDescription = "" + csoDefaultShowState = TRUE + csoDefaultVoxelizeState = TRUE + csoDefaultEditableState = TRUE + groupSingleDeleteGroupCSOHandling = RemoveIfInNoGroup + groupDefaultLabel = "" + groupDefaultDescription = "" + groupDefaultLineStyle = LineStyleSolid + groupDefaultColor = "1 1 1" + groupDefaultAlpha = 1 + groupDefaultLineWidth = 1 + groupDefaultShowState = TRUE + groupDefaultVoxelizeState = TRUE + groupDefaultEditableState = TRUE + groupDefaultTimePointIndex = 0 + groupDefaultUseVisuals = FALSE + groupDefaultUseShowState = FALSE + groupDefaultUseVoxelizeState = FALSE + groupDefaultUseEditableState = FALSE + groupDefaultUseTimePointIndex = FALSE + groupDefaultUseVoxelWrite = FALSE + groupDefaultVoxelWriteMode = VoxelWriteModeModule + groupDefaultVoxelWriteValue = 1024 + groupDefaultUseMarkerSettings = FALSE + groupDefaultMarkerMode = MarkerModeRect + groupDefaultMarkerColor = "0 1 0" + groupDefaultMarkerAlpha = 1 + groupDefaultMarkerSize = 3 + groupDefaultNumMaximumCSOs = 0 + groupDefaultOverflowHandling = RemoveFirst + groupDefaultRemoveFromGroupHandling = RemoveIfInNoGroup + listSingleRemoveEmptyGroupHandling = RemoveAlways + listDefaultRemoveEmptyGroupHandling = RemoveAlways + numUndos = 0 + numRedos = 0 + undoStackLimit = 16 + useSelectionCSONotification = FALSE + useSelectionGroupNotification = FALSE + useFinishedCSONotification = TRUE + useFinishedGroupNotification = TRUE + useCSOMovedNotification = FALSE + useRepaintNotification = FALSE + useInteractionInitNotification = FALSE + useStartNewCSONotification = FALSE + enableSelectionNotification = TRUE + enableFinishedNotification = TRUE + enableCSOMovedNotification = TRUE + enableRepaintNotification = TRUE + csoTreeView = "" + groupTreeView = "" + numCSOs = 0 + numGroups = 0 + numSelectedCSOs = 0 + numSelectedGroups = 0 + selectedCSOsGroupIds = "" + csoTabSelected = FALSE + groupTabSelected = FALSE + selectionTabSelected = FALSE + notificationTabSelected = TRUE + defaultTabSelected = FALSE + csoCommonTabSelected = FALSE + csoVisualsTabSelected = TRUE + groupCommonTabSelected = FALSE + groupVisualsTabSelected = TRUE + groupMiscTabSelected = FALSE + notificationControlTabSelected = FALSE + notificationOutputCSOTabSelected = FALSE + notificationOutputGroupTabSelected = TRUE + defaultCSOCommonTabSelected = FALSE + defaultGroupCommonTabSelected = FALSE + defaultGroupVisualsTabSelected = FALSE + defaultGroupMiscTabSelected = FALSE + } +} +module View2D { + internal { + frame = "-331 -155 120 56" + moduleGroupName = "" + windows { + window _default { + geometry = "-565 436 919 476" + sizeHint = "400 400" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = View2D + inventorInputOn = TRUE + view2DExtensionsOn = TRUE + startSlice = -1 + numSlices = 1 + numXSlices = 1 + sliceStep = 1 + slab = 1 + blendMode = BLEND_REPLACE + timePoint = 0 + maxTimePoint = 0 + filterMode = FILTER_LINEAR + standardKeys = TRUE + cineMode = CINE_Z + cineDirection = CINE_PINGPONG + cineRepeat = CINE_ONCE + cineSpeed = 0.1000000015 + snapToCenter = FALSE + zoomMode = VIEW2D_AUTO_ZOOM + unzoomOnImageChange = FALSE + sliceZoom = 1 + sliceZoomSynced = 1 + baseColor = "1 1 1" + margin = "2 2" + sliceOrigin = "41.05004119873047 -8.941691398620605" + lutCenter = 1 + lutWidth = 1 + lutUseTraceColors = FALSE + annotationOn = TRUE + annotationMode = ANNO_MODE_AUTO + annotationSizeMode = ANNO_SHOW_DETAILED + annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + annotationFontSize = ANNO_SIZE_AUTO + annoCoords = Voxel + annoCTValue = AsIs + borderOn = TRUE + borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + valueHighPrecision = FALSE + plane = "0 0 1 -90.60578918457031" + } + internalFields = "" +} +module DicomTool { + internal { + frame = "21 -267 88 56" + moduleGroupName = "" + } + fields { + instanceName = DicomTool + exportDir = "" + exportBaseDir = "" + exportNameTemplate = $S/export$T.dcm + addPatNameDir = FALSE + addStudyUIDDIR = FALSE + addSeriesUIDDIR = FALSE + allSlices = TRUE + minSlice = 0 + maxSlice = 1 + minUsedSlice = 0 + maxUsedSlice = 0 + allTimepoints = TRUE + minTime = 0 + maxTime = 1 + minUsedTime = 0 + maxUsedTime = 0 + displayMode1 = Input + displayMode2 = All + newStudyUID = FALSE + newSeriesUID = TRUE + hasStudyUID = FALSE + hasSeriesUID = FALSE + restoreFrameSpecific = FALSE + saveEnabled = TRUE + storeTimeInfo = None + dicomComment = MeVisLab + canCancel = TRUE + progress = 0 + status = "" + dicomConsole = "" + consoleAutoClear = TRUE + dicomOutput = "" + echoVerbose = TRUE + echoDebug = FALSE + storeVerbose = TRUE + storeDebug = FALSE + dicomConfigList = LinaTest + currentConfigSet = LinaTest + dicomName = LinaTest + dicomType = PACS + dicomCalledAET = "" + dicomCallingAET = "" + dicomHostname = localhost + dicomPort = 104 + autoLoadConfig = TRUE + exportAsDerived = TRUE + } + internalFields = "" +} +module DicomFrameSelect { + internal { + frame = "197 -43 136 56" + moduleGroupName = "" + windows { + window _default { + geometry = "807 540 312 164" + sizeHint = "312 164" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = DicomFrameSelect + selectTagScope = SharedAndSpecificTags + zPos = 0 + tPos = 0 + uPos = 0 + zMax = 0 + tMax = 0 + uMax = 0 + valid = FALSE + } +} +module DicomTagViewer { + internal { + frame = "193 -203 128 56" + moduleGroupName = "" + windows { + window _default { + geometry = "741 425 445 394" + sizeHint = "445 394" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = DicomTagViewer + tagName0 = "" + tagValue0 = "" + tagName1 = "" + tagValue1 = "" + tagName2 = "" + tagValue2 = "" + tagName3 = "" + tagValue3 = "" + tagName4 = "" + tagValue4 = "" + tagName5 = "" + tagValue5 = "" + tagName6 = "" + tagValue6 = "" + tagName7 = "" + tagValue7 = "" + tagName8 = "" + tagValue8 = "" + maxValueLen = 80 + showPrivateTags = FALSE + tagListSubset = AllTags + dicomFile = "" + trimSpaces = FALSE + } +} +module CSOToRTStructure { + internal { + frame = "53 93 136 56" + moduleGroupName = "" + } + fields { + instanceName = CSOToRTStructure + rtStructFile = "" + valid = FALSE + } +} +connections { + View3D.inInvPreLUT = SoCSO3DVis.self + SoView2DCSOEditor.inCSOList = CSOManager.outCSOList + SoView2DCSOEditor.inProcessor = CSOFreehandProcessor.outProcessorData + View2D.inImage = CSOToRTStructure.output0 + View2D.inInvPreLUT = SoView2DCSOEditor.self + DicomTool.inImage = CSOToRTStructure.output0 + DicomFrameSelect.input0 = CSOToRTStructure.output0 + DicomTagViewer.input0 = DicomFrameSelect.output0 + CSOToRTStructure.input0 = ReferenceImage.outImage + CSOToRTStructure.inCSOList = CSOManager.outCSOList +} +networkModel = "" Added: trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto =================================================================== --- trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto (rev 0) +++ trunk/Community/General/Modules/ML/MLCSOToRTStructure/networks/CSOToRTStructureExample.mlab.auto 2010-07-20 23:14:25 UTC (rev 286) @@ -0,0 +1,623 @@ +// MDL v1 utf8 +network { + watchlist = "" +} +module SoCSO3DVis { + internal { + frame = "-51 -67 104 56" + moduleGroupName = "" + } + fields { + instanceName = SoCSO3DVis + renderCaching = AUTO + boundingBoxCaching = AUTO + renderCulling = AUTO + pickCulling = AUTO + autoApply = TRUE + lineWidthOffset = 0 + markerSizeScaling = 1 + highlightSelectedGroups = TRUE + useRenderTimeDelay = FALSE + timerDelayMilliSeconds = 100 + useStylePalette = FALSE + stylePaletteUseIndexAs = USE_INDEX_FOR_CSO + listenToRepaintNotifications = FALSE + listenToFinishingNotifications = TRUE + listenToSelectionChangedNotifications = TRUE + } +} +module View3D { + internal { + frame = "-159 -179 144 56" + moduleGroupName = "" + windows { + window _default { + geometry = "457 371 959 635" + sizeHint = "959 635" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = View3D + inventorInputOn = TRUE + lutType = Ramp + currentTimePoint = 0 + lutEditorColorPoints = "[ 0 0 0 0, 4095 1 1 1 ]" + lutEditorAlphaPoints = "[ 0 0, 4095 1 ]" + lutEditorRelativeLut = FALSE + lutEditorColorInterpolation = InterpolateRGB + lutEditorAlphaFactor = 1 + orientationProjectionType = PERSPECTIVE + orientationLocation = LOWER_RIGHT + orientationOn = TRUE + orientationModel = CUBE + greyCenter = 0.162499994 + greyWidth = 0.4424997866 + camType = TRUE + camPosition = "0.8314898014068604 -0.9133433699607849 -2.074333429336548" + camOrientation = "-0.04693968221545219 -0.9805020689964294 0.19082011282444 3.519406318664551" + initialCameraOrientation = CAMERA_KEEP_AS_IS + camFar = 3.414214134 + camNear = 1.414214134 + camFocal = 2.414214134 + camHeight = 0.7853980064 + autoViewAll = TRUE + annotations = TRUE + background = TRUE + mode = VolumeRendering + interactiveQuality = Medium + quality = 1 + useTraceColors = FALSE + decoration = FALSE + staticSamplingRate = 1 + alphaFactor = 1 + colorFactor = "1 1 1" + } + internalFields { + renderer.gradientQuality = GradientQualityAutomatic + renderer.enhancementAlphaMix = 0.25 + renderer.boundaryEnhancement = FALSE + renderer.boundaryEnhancementFactor = 1 + renderer.boundaryEnhancementExponent = 1 + renderer.boundaryEnhancementGradientBias = 0 + renderer.silhouetteEnhancement = FALSE + renderer.silhouetteEnhancementExponent = 1 + renderer.silhouetteEnhancementFactor = 1 + renderer.toneShading = FALSE + renderer.toneShadingWarmColor = "0.6745100021362305 0.5333330035209656 0.1411760002374649" + renderer.toneShadingColdColor = "0 0 0.4000000059604645" + renderer.toneShadingWarmDiffuse = 0.6000000238 + renderer.toneShadingColdDiffuse = 0.200000003 + renderer.toneShadingAngle = 45 + renderer.materialAmbient = 0.6000000238 + renderer.materialDiffuse = 1 + renderer.materialSpecular = 1 + renderer.materialSpecularity = 32 + renderer.light1Enabled = TRUE + renderer.light1DiffuseIntensity = 1 + renderer.light1SpecularIntensity = 1 + renderer.light1Color = "1 1 1" + renderer.light1PolarPhi = 45 + renderer.light1PolarRho = 0 + renderer.light2Enabled = FALSE + renderer.light2DiffuseIntensity = 1 + renderer.light2SpecularIntensity = 1 + renderer.light2Color = "1 1 1" + renderer.light2PolarPhi = 0 + renderer.light2PolarRho = 0 + renderer.light3Enabled = FALSE + renderer.light3DiffuseIntensity = 1 + renderer.light3SpecularIntensity = 1 + renderer.light3Color = "1 1 1" + renderer.light3PolarPhi = -45 + renderer.light3PolarRho = 0 + renderer.sizeOutputX = 512 + renderer.sizeOutputY = 512 + renderer.sizeOutputZ = 29 + renderer.subVolumeStartX = 0 + renderer.subVolumeStartY = 0 + renderer.subVolumeStartZ = 0 + renderer.subVolumeEndX = 512 + renderer.subVolumeEndY = 512 + renderer.subVolumeEndZ = 29 + clip.hideGeometry = FALSE + clip.on = FALSE + clip.left = FALSE + clip.right = FALSE + clip.top = FALSE + clip.bottom = FALSE + clip.rear = FALSE + clip.front = FALSE + clip.translation0 = "1 0 0" + clip.translation1 = "-1 0 0" + clip.translation2 = "0 1 0" + clip.translation3 = "0 -1 0" + clip.translation4 = "0 0 1" + clip.translation5 = "0 0 -1" + clip.rotation0 = "0 0 0.9999999403953552 1.570799946784973" + clip.rotation1 = "0 0 -0.9999999403953552 1.570799946784973" + clip.rotation2 = "0 0 -1 3.141590118408203" + clip.rotation3 = "0 0 1 0" + clip.rotation4 = "-0.9999999403953552 0 0 1.570799946784973" + clip.rotation5 = "0.9999999403953552 0 0 1.570799946784973" + } +} +module OpenImage { + internal { + frame = "-251 345 120 64" + moduleGroupName = "" + windows { + window _default { + geometry = "367 249 937 737" + sizeHint = "937 737" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = ReferenceImage + previewName = "" + imageName = "" + browserRootPath = "C:/Program Files (x86)/MeVisLab2.0VC8/data" + ok = TRUE + progress = 0 + stdViewerExtOn = TRUE + hideImport = FALSE + hidePreferences = FALSE + hideCloseButtons = FALSE + settingsFile = "" + autoReload = SmartByDuration + reloadDurationLimit = 3 + useInclude = FALSE + include = datasets,results + useExclude = TRUE + exclude = slices,html,autoimg + suffix = dcm + recursive = TRUE + sortBy = Patient + sortValues = Patient,Modality,Institution,Date,FlatDatasets,Device + } + internalFields = "" +} +module CSOFreehandProcessor { + internal { + frame = "5 245 168 56" + moduleGroupName = "" + } + fields { + instanceName = CSOFreehandProcessor + addCSOToGroupWithLabel = "" + id = 0 + pathPointLineStyle = LineStyleSolid + pathPointLineWidth = 1 + pathPointColor = "1 1 0" + pathPointAlpha = 1 + markerMode = MarkerModeNone + markerSize = 2 + markerColor = "0 1 0" + markerAlpha = 1 + voxelWriteMode = VoxelWriteModeModule + voxelWriteValue = 1024 + creationMode = CreationModeClosedFreehand + interpolationMode = InterpolationModeSplineApproximation + seedPlacementPolicy = PlaceSeedPointWhileDragging + finishingMode = FinishOnRelease + minNumSeedPoints = 0 + minSeedPointDistance = 8 + shouldCloseOnFinish = TRUE + useFinishingDistance = TRUE + finishingDistance = 24 + numInterpolationSteps = 1 + } +} +module SoView2DCSOEditor { + internal { + frame = "-179 13 152 56" + moduleGroupName = "" + windows { + window _default { + geometry = "572 414 558 465" + sizeHint = "558 465" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SoView2DCSOEditor + drawingOn = TRUE + editingOn = TRUE + maskValid = FALSE + fixZOn = TRUE + color = "1 1 1" + selectionTolerance = 24 + needsValidVoxel = TRUE + button1 = PRESSED + button2 = IGNORED + button3 = IGNORED + shift = IGNORED + control = IGNORED + alt = IGNORED + wantsAllEvents = TRUE + wantsKeyEvents = TRUE + wantsMouseWheelEvents = FALSE + setEventHandled = FALSE + ignoreHandledEvents = FALSE + createNewMode = FALSE + renderOnSlab = FALSE + clipToSlice = FALSE + cursorShape = UNDEFINED_CURSOR + shouldListenToRepaintEvents = TRUE + shouldListenToSelectionChangedEvents = TRUE + shouldListenToFinishedEvents = TRUE + generalInteractionMode = INTERACTION_MODE_EDIT + generalInteractionModeToggleKey = TOGGLE_MODE_ALT + useAntiAliasing = TRUE + useInterpolationTargetColor = TRUE + interpolationTargetColor = "1 0 0" + showBoundingBox = FALSE + boundingBoxAlpha = 0.5 + boundingBoxColor = "1 1 1" + showOnlyParallelCSOs = FALSE + showParallelDotProductLimitRadian = 0.9998999834 + shouldLevelCSO = FALSE + useStylePalette = FALSE + stylePaletteUseIndexAs = USE_INDEX_FOR_CSO + labelShowMode = LABEL_SHOW_NONE + labelAlignmentMode = LABEL_ALIGN_CENTER + labelUnitScale = LABEL_UNIT_SCALE_MM + showLabelUnits = TRUE + labelFontSize = 12 + labelUseTextShadow = TRUE + labelMarginX = 2 + labelMarginY = 2 + ghostMode = GHOST_NONE + ghostUnitMode = GHOST_UNIT_SLICE + ghostStyleAlpha = TRUE + ghostStyleStipple = TRUE + ghostStyleLineWidth = FALSE + ghostStyleBrighten = FALSE + ghostDepth = 5 + generalLabelColor = "1 1 1" + generalLabelAlpha = 1 + labelColorMode = COLOR_GENERAL + useTesselation = FALSE + tesselationColorMode = COLOR_AS_CSO + tesselationColor = "0.8999999761581421 0.5 0.8999999761581421" + tesselationAlpha = 0.200000003 + tesselationWindingRule = WR_ODD + selectGroupsParsProToto = TRUE + highlightSelectedGroups = FALSE + enableMouseOverHighlighting = TRUE + mouseOverColorMode = HIGHLIGHT_COLOR_MODE_FIXED + mouseOverColorBrightenValue = 0.8000000119 + mouseOverColorColor = "1 1 1" + mouseOverLineWidthMode = HIGHLIGHT_LINE_WIDEN + mouseOverLineWidthWidenValue = 0 + mouseOverLineWidthLineWidth = 1 + useIconFile = FALSE + iconFile = $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/markerIcons.tif + internalIconFile = "C:/Program Files (x86)/MeVisLab2.0VC8/Packages/MeVisLab/Standard/Modules/Resources/Images/markerIcons.tif" + cutCopyKeyModifier = EDIT_OP_KEY_MOD_CONTROL + copyKeyModifier = EDIT_OP_KEY_MOD_CONTROL + pasteKeyModifier = EDIT_OP_KEY_MOD_CONTROL + undoKeyModifier = EDIT_OP_KEY_MOD_CONTROL + redoKeyModifier = EDIT_OP_KEY_MOD_CONTROL + deleteSeedPointKeyModifier = EDIT_OP_KEY_MOD_NONE + deleteCSOKeyModifier = EDIT_OP_KEY_MOD_SHIFT + multiSelectionKeyModifier = EDIT_OP_KEY_MOD_CONTROL + enableMultiSelection = TRUE + cutCopyKey = EDIT_OP_KEY_X + copyKey = EDIT_OP_KEY_C + pasteKey = EDIT_OP_KEY_V + undoKey = EDIT_OP_KEY_Z + redoKey = EDIT_OP_KEY_Y + deleteSeedPointKey = EDIT_OP_KEY_DELETE + deleteCSOKey = EDIT_OP_KEY_DELETE + nextInteractionStatus = INTERACTIVE_MODE_START_CSO + forceStartNewCSOKeyModifier = EDIT_OP_KEY_MOD_NONE + forceStartNewCSOKey = EDIT_OP_KEY_F + } +} +module CSOManager { + internal { + frame = "-199 197 112 56" + moduleGroupName = "" + windows { + window _default { + geometry = "281 437 1176 457" + sizeHint = "695 457" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = CSOManager + workDirectlyOnInputCSOList = FALSE + selectLastCreatedGroup = TRUE + selectionColoringMode = SelectionColorModeFixed + selectionLineWidthMode = SelectionLineWidthWiden + selectionBrightenColor = 0.200000003 + selectionFixedColor = "1 1 0.6000000238418579" + selectionWidenLineWidth = 1 + selectionFixedLineWidth = 2 + csoDefaultLabel = "" + csoDefaultDescription = "" + csoDefaultShowState = TRUE + csoDefaultVoxelizeState = TRUE + csoDefaultEditableState = TRUE + groupSingleDeleteGroupCSOHandling = RemoveIfInNoGroup + groupDefaultLabel = "" + groupDefaultDescription = "" + groupDefaultLineStyle = LineStyleSolid + groupDefaultColor = "1 1 1" + groupDefaultAlpha = 1 + groupDefaultLineWidth = 1 + groupDefaultShowState = TRUE + groupDefaultVoxelizeState = TRUE + groupDefaultEditableState = TRUE + groupDefaultTimePointIndex = 0 + groupDefaultUseVisuals = FALSE + groupDefaultUseShowState = FALSE + groupDefaultUseVoxelizeState = FALSE + groupDefaultUseEditableState = FALSE + groupDefaultUseTimePointIndex = FALSE + groupDefaultUseVoxelWrite = FALSE + groupDefaultVoxelWriteMode = VoxelWriteModeModule + groupDefaultVoxelWriteValue = 1024 + groupDefaultUseMarkerSettings = FALSE + groupDefaultMarkerMode = MarkerModeRect + groupDefaultMarkerColor = "0 1 0" + groupDefaultMarkerAlpha = 1 + groupDefaultMarkerSize = 3 + groupDefaultNumMaximumCSOs = 0 + groupDefaultOverflowHandling = RemoveFirst + groupDefaultRemoveFromGroupHandling = RemoveIfInNoGroup + listSingleRemoveEmptyGroupHandling = RemoveAlways + listDefaultRemoveEmptyGroupHandling = RemoveAlways + numUndos = 0 + numRedos = 0 + undoStackLimit = 16 + useSelectionCSONotification = FALSE + useSelectionGroupNotification = FALSE + useFinishedCSONotification = TRUE + useFinishedGroupNotification = TRUE + useCSOMovedNotification = FALSE + useRepaintNotification = FALSE + useInteractionInitNotification = FALSE + useStartNewCSONotification = FALSE + enableSelectionNotification = TRUE + enableFinishedNotification = TRUE + enableCSOMovedNotification = TRUE + enableRepaintNotification = TRUE + csoTreeView = "" + groupTreeView = "" + numCSOs = 0 + numGroups = 0 + numSelectedCSOs = 0 + numSelectedGroups = 0 + selectedCSOsGroupIds = "" + csoTabSelected = FALSE + groupTabSelected = FALSE + selectionTabSelected = FALSE + notificationTabSelected = TRUE + defaultTabSelected = FALSE + csoCommonTabSelected = FALSE + csoVisualsTabSelected = TRUE + groupCommonTabSelected = FALSE + groupVisualsTabSelected = TRUE + groupMiscTabSelected = FALSE + notificationControlTabSelected = FALSE + notificationOutputCSOTabSelected = FALSE + notificationOutputGroupTabSelected = TRUE + defaultCSOCommonTabSelected = FALSE + defaultGroupCommonTabSelected = FALSE + defaultGroupVisualsTabSelected = FALSE + defaultGroupMiscTabSelected = FALSE + } +} +module View2D { + internal { + frame = "-331 -155 120 56" + moduleGroupName = "" + windows { + window _default { + geometry = "-565 436 919 476" + sizeHint = "400 400" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = View2D + inventorInputOn = TRUE + view2DExtensionsOn = TRUE + startSlice = 0 + numSlices = 1 + numXSlices = 1 + sliceStep = 1 + slab = 1 + blendMode = BLEND_REPLACE + timePoint = 0 + maxTimePoint = 0 + filterMode = FILTER_LINEAR + standardKeys = TRUE + cineMode = CINE_Z + cineDirection = CINE_PINGPONG + cineRepeat = CINE_ONCE + cineSpeed = 0.1000000015 + snapToCenter = FALSE + zoomMode = VIEW2D_AUTO_ZOOM + unzoomOnImageChange = FALSE + sliceZoom = 1 + sliceZoomSynced = 1 + baseColor = "1 1 1" + margin = "2 2" + sliceOrigin = "41.05004119873047 -8.941691398620605" + lutCenter = 1 + lutWidth = 1 + lutUseTraceColors = FALSE + annotationOn = TRUE + annotationMode = ANNO_MODE_AUTO + annotationSizeMode = ANNO_SHOW_DETAILED + annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + annotationFontSize = ANNO_SIZE_AUTO + annoCoords = Voxel + annoCTValue = AsIs + borderOn = TRUE + borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + valueHighPrecision = FALSE + plane = "0 0 1 -90.60578918457031" + } + internalFields = "" +} +module DicomTool { + internal { + frame = "21 -267 88 56" + moduleGroupName = "" + } + fields { + instanceName = DicomTool + exportDir = "" + exportBaseDir = "" + exportNameTemplate = $S/export$T.dcm + addPatNameDir = FALSE + addStudyUIDDIR = FALSE + addSeriesUIDDIR = FALSE + allSlices = TRUE + minSlice = 0 + maxSlice = 1 + minUsedSlice = 0 + maxUsedSlice = 0 + allTimepoints = TRUE + minTime = 0 + maxTime = 1 + minUsedTime = 0 + maxUsedTime = 0 + displayMode1 = Input + displayMode2 = All + newStudyUID = FALSE + newSeriesUID = TRUE + hasStudyUID = FALSE + hasSeriesUID = FALSE + restoreFrameSpecific = FALSE + saveEnabled = TRUE + storeTimeInfo = None + dicomComment = MeVisLab + canCancel = TRUE + progress = 0 + status = "" + dicomConsole = "" + consoleAutoClear = TRUE + dicomOutput = "" + echoVerbose = TRUE + echoDebug = FALSE + storeVerbose = TRUE + storeDebug = FALSE + dicomConfigList = LinaTest + currentConfigSet = LinaTest + dicomName = LinaTest + dicomType = PACS + dicomCalledAET = "" + dicomCallingAET = "" + dicomHostname = localhost + dicomPort = 104 + autoLoadConfig = TRUE + exportAsDerived = TRUE + } + internalFields = "" +} +module DicomFrameSelect { + internal { + frame = "197 -43 136 56" + moduleGroupName = "" + windows { + window _default { + geometry = "807 540 312 164" + sizeHint = "312 164" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = DicomFrameSelect + selectTagScope = SharedAndSpecificTags + zPos = 0 + tPos = 0 + uPos = 0 + zMax = 0 + tMax = 0 + uMax = 0 + valid = FALSE + } +} +module DicomTagViewer { + internal { + frame = "193 -203 128 56" + moduleGroupName = "" + windows { + window _default { + geometry = "741 425 445 394" + sizeHint = "445 394" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = DicomTagViewer + tagName0 = "" + tagValue0 = "" + tagName1 = "" + tagValue1 = "" + tagName2 = "" + tagValue2 = "" + tagName3 = "" + tagValue3 = "" + tagName4 = "" + tagValue4 = "" + tagName5 = "" + tagValue5 = "" + tagName6 = "" + tagValue6 = "" + tagName7 = "" + tagValue7 = "" + tagName8 = "" + tagValue8 = "" + maxValueLen = 80 + showPrivateTags = FALSE + tagListSubset = AllTags + dicomFile = "" + trimSpaces = FALSE + } +} +module CSOToRTStructure { + internal { + frame = "53 93 136 56" + moduleGroupName = "" + } + fields { + instanceName = CSOToRTStructure + rtStructFile = "" + valid = FALSE + } +} +connections { + View3D.inInvPreLUT = SoCSO3DVis.self + SoView2DCSOEditor.inCSOList = CSOManager.outCSOList + SoView2DCSOEditor.inProcessor = CSOFreehandProcessor.outProcessorData + View2D.inImage = CSOToRTStructure.output0 + View2D.inInvPreLUT = SoView2DCSOEditor.self + DicomTool.inImage = CSOToRTStructure.output0 + DicomFrameSelect.input0 = CSOToRTStructure.output0 + DicomTagViewer.input0 = DicomFrameSelect.output0 + CSOToRTStructure.input0 = ReferenceImage.outImage + CSOToRTStructure.inCSOList = CSOManager.outCSOList +} +networkModel = "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <li...@us...> - 2010-07-20 23:11:24
|
Revision: 285 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=285&view=rev Author: linaliu Date: 2010-07-20 23:11:18 +0000 (Tue, 20 Jul 2010) Log Message: ----------- Added Paths: ----------- trunk/Community/General/Sources/ML/MLCSOToRTStructure/ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.bat trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.sh trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.cpp trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.h trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureSystem.h trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.cpp trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.bat =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.bat (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.bat 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,3 @@ +"%MLAB_ROOT%\MeVis\Foundation\BuildTools\Scripts\createProject.bat" MLCSOToRTStructure + + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.pro 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,44 @@ +# ----------------------------------------------------------------------------- +# MLCSOToRTStructure project profile +# +# \file MLCSOToRTStructure.pro +# \author linal +# \date 2010-01-20 +# ----------------------------------------------------------------------------- + +TEMPLATE = lib + +TARGET = MLCSOToRTStructure + +DESTDIR = ../../../lib +DLLDESTDIR = ../../../lib + +# set high warn level (warn 4 on MSCV) +WARN = HIGH + +# add used projects here (see included pri files below for available projects) +CONFIG += dll ML MLCSO MLDicomTree_OFFIS MLDicomTreeImagePropertyExtension + +MLAB_PACKAGES += STUMevisApp_General \ + MeVisLab_Standard + +# make sure that this file is included after CONFIG and MLAB_PACKAGES +include ($(MLAB_MeVis_Foundation)/Configuration/IncludePackages.pri) + +DEFINES += MLCSOTORTSTRUCTURE_EXPORTS + +HEADERS += \ + MLCSOToRTStructureInit.h \ + MLCSOToRTStructureSystem.h \ + mlCSOToRTStructure.h \ + RTStructure.h + +SOURCES += \ + MLCSOToRTStructureInit.cpp \ + mlCSOToRTStructure.cpp \ + RTStructure.cpp + +# additional files that are NOT compiled +RELATEDFILES += \ + ../../../Modules/ML/MLCSOToRTStructure/MLCSOToRTStructure.def + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.sh =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.sh (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructure.sh 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,35 @@ +#! /bin/bash +#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------- +# +# Copyright (c) 2001-2009, MeVis Medical Solutions AG, Bremen, Germany +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of MeVis Medical Solutions AG nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY MEVIS MEDICAL SOLUTIONS AG ''AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL MEVIS MEDICAL SOLUTIONS AG BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#----------------------------------------------------------------------------- +if [ "`uname -s`" = "Darwin" && "$MLAB_ROOT" = "" ]; then + echo "Generate Xcode projects by double-clicking the file 'MLCSOToRTStructure.pro' in Finder or use the MeVisLabProjectGenerator.app from the command line to customize the project creation." +else + python $MLAB_ROOT/MeVis/Foundation/BuildTools/Scripts/createProject.py MLCSOToRTStructure +fi + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.cpp 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,41 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. +/*! +// \file MLCSOToRTStructureInit.cpp +// \author linal +// \date 2010-01-20 +*/ +//---------------------------------------------------------------------------------- + + +// Local includes +#include "MLCSOToRTStructureSystem.h" + +// Include definition of ML_INIT_LIBRARY. +#include "mlLibraryInitMacros.h" + +// Include all module headers ... +#include "mlCSOToRTStructure.h" + +ML_START_NAMESPACE + +//---------------------------------------------------------------------------------- +//! Calls init functions of all modules to add their types to the runtime type +//! system of the ML. +//---------------------------------------------------------------------------------- +int MLCSOToRTStructureInit () +{ + ML_TRACE_IN("MLCSOToRTStructureInit ()") + + CSOToRTStructure::initClass(); + // Add initClass calls from all other modules here... + + return 1; +} + +ML_END_NAMESPACE + + +//! Calls the init method implemented above during load of shared library. +ML_INIT_LIBRARY(MLCSOToRTStructureInit) + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureInit.h 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,25 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization. +/*! +// \file MLCSOToRTStructureInit.h +// \author linal +// \date 2010-01-20 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __MLCSOToRTStructureInit_H +#define __MLCSOToRTStructureInit_H + + +ML_START_NAMESPACE + +//! Calls init functions of all modules to add their types to the runtime type +//! system of the ML. +int MLCSOToRTStructureInit (); + +ML_END_NAMESPACE + +#endif // __STUCSOToRTStructureInit_H + + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureSystem.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureSystem.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/MLCSOToRTStructureSystem.h 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,33 @@ +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations. +/*! +// \file MLCSOToRTStructureSystem.h +// \author linal +// \date 2010-01-20 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __MLCSOToRTStructureSystem_H +#define __MLCSOToRTStructureSystem_H + + +// DLL export macro definition +#ifdef WIN32 +#ifdef MLCSOTORTSTRUCTURE_EXPORTS +// Use the MLCSOTORTSTRUCTURE_EXPORT macro to export classes and functions +#define MLCSOTORTSTRUCTURE_EXPORT __declspec(dllexport) +#else +// If included by external modules, exported symbols are declared as import symbols +#define MLCSOTORTSTRUCTURE_EXPORT __declspec(dllimport) +#endif + +#else +// No export declarations are necessary for non-Windows systems +#define MLCSOTORTSTRUCTURE_EXPORT +#endif + + +#endif // __MLCSOToRTStructureSystem_H + + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.cpp 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,23 @@ +//---------------------------------------------------------------------------------- +//! The ML module class ImportRTStructure. +/*! +// \file mlImportRTStructure.cpp +// \author Lina Liu, Dimitre Hristov +// \date 2010-01-15 +// +// Import RT structure from a DCM file and convert it into a CSO group +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "RTStructure.h" + +ML_START_NAMESPACE + + +//! Implements code for the runtime type system of the ML +ML_CLASS_SOURCE(RTStructure, Base); + + + +ML_END_NAMESPACE Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/RTStructure.h 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,56 @@ +//---------------------------------------------------------------------------------- +//! The ML module class RTStructure. +/*! +// \file RTStructure.h +// \author linal +// \date 2010-01-15 +// +// This is a class to hold RT Structure +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __mlRTStructure_H +#define __mlRTStructure_H +#include "MLCSOToRTStructureSystem.h" +#include <DCMTree_Lib.h> +#include "DCMTree_IOParameter.h" +#include "DCMTree_Reader.h" +#include "DCMTree_Dict.h" +#include "DCMTree_Tag.h" +#include "DCMTree_Value.h" +#include "DCMTree_Unicode.h" +#include "DCMTree_Writer.h" +#include <dcmtree_dicomtags.h> +#include <dcmtree_exception.h> +#include <dcmtree_message.h> +#include <CSOBase/CSOList.h> +#include "mlBase.h" + +ML_START_NAMESPACE + +class MLCSOTORTSTRUCTURE_EXPORT RTStructure : public Base +{ +public: + RTStructure(void) + { + + } + virtual ~RTStructure(void) + { + + } + + + std::stringstream stream; + +private: + + + ML_CLASS_HEADER(RTStructure) + +}; + +ML_END_NAMESPACE + +#endif \ No newline at end of file Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.cpp 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,631 @@ +//---------------------------------------------------------------------------------- +//! The ML module class CSOToRTStructure. +/*! +// \file mlCSOToRTStructure.cpp +// \author linal +// \date 2010-01-20 +// +// convert CSOs to RT Structure +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "mlCSOToRTStructure.h" +#include <boost/filesystem/operations.hpp> +#include <boost/filesystem/fstream.hpp> +#include "mlDicomTreeImagePropertyExtension.h" +#include "mlDicomTreeAccess.h" +#include "DCMTree_StructuredMF.h" + +#include <iostream> +#include <time.h> + +using namespace boost::filesystem; +using namespace std; + +ML_START_NAMESPACE + +//! Implements code for the runtime type system of the ML +ML_BASEOP_CLASS_SOURCE(CSOToRTStructure, BaseOp); + +std::map<std::string, std::string> CSOToRTStructure::_modalitySOPClassUIDMap; +bool CSOToRTStructure::isInitialized = false; + +//---------------------------------------------------------------------------------- +//! Constructor +//---------------------------------------------------------------------------------- +CSOToRTStructure::CSOToRTStructure () + : BaseOp(1, 1) +{ + ML_TRACE_IN("CSOToRTStructure::CSOToRTStructure ()"); + + // Suppress calls of handleNotification on field changes to + // avoid side effects during initialization phase. + handleNotificationOff(); + //! Get reference to the container for parameters/fields. + FieldContainer &fields = *getFieldContainer(); + getInField(0)->attachField(getOutField(0)); + _inputCSOs = NULL; + + ML_CHECK(&fields); + + (_inListFld = fields.addBase("inCSOList"))->setBaseValue(NULL); + + _rtStructFileFld = fields.addString("rtStructFile"); + _applyFld = fields.addNotify("apply"); + _validFld = fields.addToggle("valid"); + _validFld->setIntValue(false); + //_inListFld->attachField(_validFld); + // Reactivate calls of handleNotification on field changes. + handleNotificationOn(); +} + +//---------------------------------------------------------------------------------- +//! Handle field changes of the field field. +//---------------------------------------------------------------------------------- +void CSOToRTStructure::handleNotification (Field *field) { + ML_TRACE_IN("CSOToRTStructure::handleNotification ()"); + + // Handle changes of module parameters and connectors here. + // check input values + if (field == _inListFld) { + if ( !_isInNotificationCB ) { + CSOList::removeNotificationObserverFromAllCSOLists( CSOListNotifyObserverCB, + this); + } + Base *csoListB = _inListFld->getBaseValue(); + _inputCSOs = mlbase_cast<CSOList*>(csoListB); + if (_inputCSOs == NULL) { + return; + } + if (!_isInNotificationCB) { + _inputCSOs->addNotificationObserver(CSOListNotifyObserverCB, this); + } + }else if (field == _applyFld){ + if (_treeHeaderPtr != NULL) { + DCMTree::TreePtr myNewTree(new DCMTree::Tree()); + _genTreePtr = myNewTree; + if (combineHeader() == true) { + writeToDCMFile(_genTreePtr, _rtStructFileFld->getStringValue()); + } + } + } + setValid(this); +} + +//---------------------------------------------------------------------------------- +//! Callback function for CSOList input field. +//---------------------------------------------------------------------------------- +void CSOToRTStructure::CSOListNotifyObserverCB(void* userData, int notificationFlag) +{ + CSOToRTStructure* myInst = static_cast<CSOToRTStructure*>(userData); + myInst->_isInNotificationCB = true; + if ( (notificationFlag & CSOList::NOTIFICATION_CSO_FINISHED ) || + (notificationFlag & CSOList::NOTIFICATION_GROUP_FINISHED ) || + (notificationFlag & CSOList::NOTIFICATION_CSO_SELECTION ) || + (notificationFlag & CSOList::NOTIFICATION_GROUP_SELECTION) ){ + // Do your notification handling here + setValid(myInst); + } + myInst->_isInNotificationCB = false; +} + +//---------------------------------------------------------------------------------- +//! Set Valid field in UI. If TreeHeader and inputCSO are not NULL, valid is checked +//---------------------------------------------------------------------------------- +void CSOToRTStructure::setValid(CSOToRTStructure* obj) +{ + if (obj->getTreeHeaderPtr() == NULL && obj->getUpdatedInImg(0) != NULL) { + PagedImg *img = obj->getUpdatedInImg(0); + obj->updateGenTreeHeader(img); + } + if (obj->getUpdatedInImg(0) == NULL || obj->getInputCSOs() == NULL) { + obj->setValidFld(false); + + }else { + obj->setValidFld(true); + } +} + +//---------------------------------------------------------------------------------- +//! ActiveAttachments +//---------------------------------------------------------------------------------- +void CSOToRTStructure::activateAttachments () +{ + ML_TRACE_IN("test::activateAttachments ()"); + + // Update members to new field state here. + // Call super class functionality to enable notification handling again. + // For details see section "Module Persistence and Overloading activateAttachments()" + // in ML Programming Guide. + BaseOp::activateAttachments (); +} + +//---------------------------------------------------------------------------------- +//! Handle Input +//---------------------------------------------------------------------------------- +BaseOp::INPUT_HANDLE CSOToRTStructure::handleInput(int /*inIndex*/, INPUT_STATE /*state*/) const +{ + ML_TRACE_IN("ChamferMatching::handleInput ()") + + return INVALIDATE; +} + +//---------------------------------------------------------------------------------- +//! Combine SOPInstance UID +//---------------------------------------------------------------------------------- +bool CSOToRTStructure::combineSOPInstUID(DCMTree::TagPtr conImageTag, std::string SOPCUID){ + if (_mSOPInstUIDs.size() == 0) { + return false; + } + for(std::map<float,std::string>::const_iterator it = _mSOPInstUIDs.begin(); it != _mSOPInstUIDs.end(); ++it) { + DCMTree::TreePtr childTree(new DCMTree::Tree()); + conImageTag->addSequenceItem(childTree); + addTag(childTree, DCMTree::TagId(0x0008,0x1150), SOPCUID, DCMTree::UI); + addTag(childTree, DCMTree::TagId(0x0008,0x1155),it->second, DCMTree::UI); + + } + return true; +} + +//---------------------------------------------------------------------------------- +//! update Generated Tree +//---------------------------------------------------------------------------------- +void CSOToRTStructure::updateGenTreeHeader(PagedImg *img) { + if (!isInitialized) { + // Add initClass calls from all other modules here... + DCMTree_Utils::UIDGenerator::initialize("1.2.276.0.28","3","42"); + // init the modality and SOPClassUID map + CSOToRTStructure::_modalitySOPClassUIDMap.insert(std::pair<std::string,std::string>("RTSTRUCT","1.2.840.10008.5.1.4.1.1.481.3")); + isInitialized = true; + } + + const RuntimeType* runtimeType = DicomTreeImagePropertyExtension::getClassTypeId(); + ImagePropertyExtensionContainer& propertyContainer = img->getImagePropertyContainer(); + + if ( propertyContainer.getNumEntries() > 0 ){ + DicomTreeImagePropertyExtension* propertyExtension = reinterpret_cast<DicomTreeImagePropertyExtension*> + (propertyContainer.getFirstEntryOfType(runtimeType)); + DCMTree::Const_TreePtr dicomTreePtr = getDicomTreeFromImagePropertyExtension(propertyExtension); + ml::Vector ext = img->getImgExt(); + DCMTree::TreePtr childTreePtr(new DCMTree::Tree()); + childTreePtr = dicomTreePtr->copy(); + DCMTree::StructuredMF structuredMF( childTreePtr, ext[2], ext[4], ext[5]); + // Get the extent of the dicom tree. + const DCMTree::StructuredMF::IndexVector& indices = structuredMF.getGridExtent(); + if ( indices.size() > 0 ) { + unsigned int num = indices[0]; + DCMTree::TagPtr tagTPtr = structuredMF.tagForGridPosition_rw( DCMTree::TagId(0x0008,0x0033), 0, 0); + std::string tagTS=tagTPtr->toString(); + for (unsigned int z=0; z< num; ++z) { + // Get the tag at slice z. + DCMTree::TagInfo info(DCMTree::TagId(0x0008,0x0018), DCMTree::UI, DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagPtr newTag(new DCMTree::Tag(info)); + structuredMF.setTagForGridPosition(newTag, z, 0); + string SOPInstUID = DCMTree_Utils::UIDGenerator::uid(); + newTag->addValue(SOPInstUID); + img->getVoxelSize(NULL, NULL, &_voxelSizeZ); + ml::vec3 vec(0,0,z); + ml::vec3 vecWorld; + img->transformToWorldCoord(vec,vecWorld); + float worldPosZ = vecWorld[2]; + _mSOPInstUIDs.insert(pair<float,std::string>(worldPosZ,SOPInstUID)); + } + } + _treeHeaderPtr = childTreePtr; + } +} + +//---------------------------------------------------------------------------------- +//! calculate image props +//---------------------------------------------------------------------------------- +void CSOToRTStructure::calcOutImageProps (int /*outIndex*/){ + ml::PagedImg* img = getOutImg(); + if (img == NULL) + return; + + updateGenTreeHeader(img); + if (_treeHeaderPtr == NULL) return; + const RuntimeType* runtimeType = DicomTreeImagePropertyExtension::getClassTypeId(); + ImagePropertyExtensionContainer& outPropertyContainer = getOutImg(0)->getImagePropertyContainer(); + DicomTreeImagePropertyExtension* outPropertyExtension = reinterpret_cast<DicomTreeImagePropertyExtension*> + (outPropertyContainer.getFirstEntryOfType(runtimeType)); + if (outPropertyExtension!= NULL) + outPropertyExtension->setDicomTagTree(_treeHeaderPtr); +} + +CALC_OUTSUBIMAGE1(CSOToRTStructure); +//---------------------------------------------------------------------------------- +//! Get Reference image SOP UID. +//---------------------------------------------------------------------------------- +std::string CSOToRTStructure::getRefUID(double z) +{ + float key = 0; + float minDist = _voxelSizeZ/2 + 0.0002; + for(std::map<float,std::string>::const_iterator it = _mSOPInstUIDs.begin(); it != _mSOPInstUIDs.end(); ++it) { + if (minDist > abs(it->first - z)) { + minDist = abs(it->first - z); + key = it->first; + } + } + if (key != 0) { + std::map<float,std::string>::const_iterator rt = _mSOPInstUIDs.find(key); + return rt->second; + } else + return ""; +} + +//---------------------------------------------------------------------------------- +//! add a Sequence tree +//---------------------------------------------------------------------------------- +void CSOToRTStructure::addSequence(DCMTree::TreePtr parentTree, DCMTree::TreePtr childTree, DCMTree::TagId tagId) +{ + addSequenceTag(parentTree, tagId); + DCMTree::TagPtr childSeq = parentTree->getTag_rw(tagId); + childSeq->addSequenceItem(childTree); +} + +//---------------------------------------------------------------------------------- +//! add Sequence Tag with a tagId +//---------------------------------------------------------------------------------- +void CSOToRTStructure::addSequenceTag(DCMTree::TreePtr &parent, DCMTree::TagId tagId) +{ + DCMTree::TagInfo info(tagId, DCMTree::SQ, DCMTree::TagValueMultiplicity(1,0xffff)); + DCMTree::TagPtr newTag(new DCMTree::Tag(info)); + parent->addTag(tagId, newTag); +} + + +//---------------------------------------------------------------------------------- +//! add a Tag with tagId and value into a tree +//---------------------------------------------------------------------------------- +void CSOToRTStructure::addTag(DCMTree::TreePtr &parent, DCMTree::TagId tagId, std::string value, DCMTree::Vr vr) +{ + DCMTree::TagInfo info(tagId, vr, DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagPtr newTag(new DCMTree::Tag(info)); + newTag->addValue(value); + parent->addTag(tagId, newTag); +} + +//---------------------------------------------------------------------------------- +//! generates the RT structure file. It combine some common headers from Input Image file and from input CSO +//---------------------------------------------------------------------------------- +bool CSOToRTStructure::combineHeader() +{ + _genTreePtr->addTag(DCMTree::TagId(0x0002,0x0000), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0000))); + _genTreePtr->addTag(DCMTree::TagId(0x0002,0x0001), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0001))); + _genTreePtr->addTag(DCMTree::TagId(0x0002,0x0002), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0002))); + addTag(_genTreePtr, DCMTree::TagId(0x0002,0x0002), _modalitySOPClassUIDMap["RTSTRUCT"], DCMTree::UI); + _genTreePtr->addTag(DCMTree::TagId(0x0002,0x0003), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0003))); + _genTreePtr->addTag(DCMTree::TagId(0x0002,0x0010), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0010))); + _genTreePtr->addTag(DCMTree::TagId(0x0002,0x0012), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0012))); + + time_t now; + struct tm *timeinfo; + char buffer[10]; + char buffer1[10]; + time(&now); + timeinfo = localtime(&now); + strftime(buffer, 10, "%H%M%S",timeinfo); + strftime(buffer1, 10, "%Y%m%d",timeinfo); + addTag(_genTreePtr, DCMTree::TagId(0x0008, 0x0012), buffer1, DCMTree::DA); + addTag(_genTreePtr, DCMTree::TagId(0x0008, 0x0013), buffer, DCMTree::TM); + + string transferSUID = _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0010))->toString(); + addTag(_genTreePtr, DCMTree::TagId(0x0008,0x0016), _modalitySOPClassUIDMap["RTSTRUCT"], DCMTree::UI); + //generate the SOP Instance UID for the RT structure file + addTag(_genTreePtr, DCMTree::TagId(0x0008,0x0018),DCMTree_Utils::UIDGenerator::uid(), DCMTree::UI); + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x0020), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x0020))); + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x0030), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x0030))); + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x0050), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x0050))); + + DCMTree::TagPtr modTagPtr = _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x0060)); + string modality = modTagPtr->toString(); + addTag(_genTreePtr, DCMTree::TagId(0x0008,0x0060),"RTSTRUCT", DCMTree::CS); + + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x0070), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x0070))); + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x0090), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x0090))); + //hard code "Mevis" here, need to find how to get machine name + addTag(_genTreePtr, DCMTree::TagId(0x0008,0x1010), "MevisLab", DCMTree::SH); + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x103e), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x103e))); + addTag(_genTreePtr, DCMTree::TagId(0x0008,0x103e), "Structure Set", DCMTree::LO); + _genTreePtr->addTag(DCMTree::TagId(0x0008,0x1090), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0008,0x1090))); + _genTreePtr->addTag(DCMTree::TagId(0x0010,0x0010), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0010,0x0010))); + _genTreePtr->addTag(DCMTree::TagId(0x0010,0x0020), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0010,0x0020))); + _genTreePtr->addTag(DCMTree::TagId(0x0010,0x0030), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0010,0x0030))); + _genTreePtr->addTag(DCMTree::TagId(0x0010,0x0040), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0010,0x0040))); + + _genTreePtr->addTag(DCMTree::TagId(0x0020,0x000d), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x000d))); + _genTreePtr->addTag(DCMTree::TagId(0x0020,0x000e), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x000e))); + std::string seriesInstUID = _treeHeaderPtr->getTag(DCMTree::TagId(DCMTree::TagId(0x0020,0x000e)))->toString(); + + _genTreePtr->addTag(DCMTree::TagId(0x0010,0x0040), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0010,0x0040))); + addTag(_genTreePtr,DCMTree::TagId(0x0018,0x1020), "OS 8.1.18", DCMTree::LO); + _genTreePtr->addTag(DCMTree::TagId(0x0020,0x000d), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x000d))); + _genTreePtr->addTag(DCMTree::TagId(0x0020,0x000e), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x000e))); + _genTreePtr->addTag(DCMTree::TagId(0x0020,0x0010), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x0010))); + _genTreePtr->addTag(DCMTree::TagId(0x0020,0x0011), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x0011))); + _genTreePtr->getTag_rw(DCMTree::TagId(0x0020,0x0011))->setValue("1"); + string label = _genTreePtr->getTag_rw(DCMTree::TagId(0x0008,0x0060))->toString(); + label.append("_1"); + addTag(_genTreePtr, DCMTree::TagId(0x3006,0x0002), label, DCMTree::SH); + addTag(_genTreePtr, DCMTree::TagId(0x3006,0x0008),"",DCMTree::DA); + addTag(_genTreePtr,DCMTree::TagId(0x3006,0x0009),"",DCMTree::TM); + + DCMTree::TreePtr embeddedTree(new DCMTree::Tree()); + addSequence(_genTreePtr, embeddedTree, DCMTree::TagId(0x3006,0x0010)); + + + embeddedTree->addTag(DCMTree::TagId(0x0020,0x0052), _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x0052))); + std::string frameofReferencedFrameUID = embeddedTree->getTag(DCMTree::TagId(0x0020,0x0052))->toString(); + + DCMTree::TreePtr refStudySeq(new DCMTree::Tree()); + addSequence(embeddedTree, refStudySeq, DCMTree::TagId(0x3006,0x0012)); + + _refSopClassUID = _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0002,0x0002))->toString(); + addTag(refStudySeq,DCMTree::TagId(0x0008,0x1150), _refSopClassUID, DCMTree::UI); + + string SOPInsUID = _treeHeaderPtr->getTag_rw(DCMTree::TagId(0x0020,0x0052))->toString(); + addTag(refStudySeq,DCMTree::TagId(0x0008,0x1155),SOPInsUID.substr(0, SOPInsUID.find_last_of(".")), DCMTree::UI); + + DCMTree::TreePtr refSeriesSeq(new DCMTree::Tree()); + addSequence(refStudySeq, refSeriesSeq, DCMTree::TagId(0x3006,0x0014)); + + addTag(refSeriesSeq,DCMTree::TagId(0x0020,0x000e),seriesInstUID,DCMTree::UI); + addSequenceTag(refSeriesSeq,DCMTree::TagId(0x3006, 0x0016)); + DCMTree::TagPtr conImageTag = refSeriesSeq->getTag_rw(DCMTree::TagId(0x3006, 0x0016)); + + std::string refSOPClassUID = _treeHeaderPtr->getTag(DCMTree::TagId(0x0008,0x0016))->toString(); + if (combineSOPInstUID(conImageTag, refSOPClassUID) == false) { + return false; + } + addSequenceTag(_genTreePtr, DCMTree::TagId(0x3006,0x0020)); + DCMTree::TagPtr csoGroupTag = _genTreePtr->getTag_rw(DCMTree::TagId(0x3006, 0x0020)); + std::string studyID = (_genTreePtr->getTag(DCMTree::TagId(0x0020,0x000d)))->toString(); + if (addCSOGroupTags(csoGroupTag, frameofReferencedFrameUID) == false) { + return false; + } + DCMTree::TreePtr ROIContourSeq(new DCMTree::Tree()); + addSequence(_genTreePtr, ROIContourSeq, DCMTree::TagId(0x3006,0x0039)); + + DCMTree::TagPtr csoTag = _genTreePtr->getTag_rw(DCMTree::TagId(0x3006, 0x0039)); + if (addCSOTags(csoTag, ROIContourSeq) == false) { + return false; + } + + // The following tags are not necessary in RT structure file + DCMTree::TreePtr RTROIObSeq(new DCMTree::Tree()); + addSequence(_genTreePtr, RTROIObSeq, DCMTree::TagId(0x3006,0x0080)); + + DCMTree::TagPtr RTROIObTag = _genTreePtr->getTag_rw(DCMTree::TagId(0x3006, 0x0080)); + addRTROIObTags(RTROIObTag, RTROIObSeq); + return true; +} + +//---------------------------------------------------------------------------------- +//! Add the RTR IOB Tags in RT structure +//---------------------------------------------------------------------------------- +void CSOToRTStructure::addRTROIObTags(DCMTree::TagPtr RTROIObTag, DCMTree::TreePtr RTROIObSeq) +{ + unsigned int seqSize = RTROIObTag->sequenceItems().size(); + if (seqSize != 0) { + RTROIObTag->sequenceItems().erase(RTROIObTag->sequenceItems().begin(), + RTROIObTag->sequenceItems().end()); + } + unsigned int groups = _inputCSOs->numGroups(); + for (unsigned int i = 0; i < groups; i ++) { + CSOGroup* group = _inputCSOs->getGroupAt(i); + DCMTree::TreePtr childTree(new DCMTree::Tree()); + RTROIObTag->addSequenceItem(childTree); + std::stringstream s; + s << int(i+1); + std::stringstream sId; + sId << int(group->getId()); + addTag(childTree, DCMTree::TagId(0x3006,0x0082),s.str(), DCMTree::IS); + addTag(childTree, DCMTree::TagId(0x3006,0x0084),sId.str(), DCMTree::IS); + addTag(childTree, DCMTree::TagId(0x3006,0x0085), group->getLabel(), DCMTree::SH); + // hard code here + addTag(childTree, DCMTree::TagId(0x3006,0x00a4), "ORGAN", DCMTree::CS); + addTag(childTree, DCMTree::TagId(0x3006,0x00a6), "", DCMTree::PN); + } +} + +//---------------------------------------------------------------------------------- +//! add CSO group Tags in RT structure +//---------------------------------------------------------------------------------- +bool CSOToRTStructure::addCSOGroupTags(DCMTree::TagPtr csoGroupTag, std::string refFOfRef) { + if (_inputCSOs== NULL){ + ML_PRINT_ERROR("mlRefImgCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); + return false; + } + unsigned int groupNum = _inputCSOs->numGroups(); + if (groupNum == 0) { + ML_PRINT_ERROR("mlRefImgCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); + return false; + } + for (unsigned int i=0; i < _inputCSOs->numGroups(); i++) { + CSOGroup* group = _inputCSOs->getGroupAt(i); + DCMTree::TreePtr childTree(new DCMTree::Tree()); + DCMTree::TagInfo childInfo1(DCMTree::TagId(0x3006,0x0022),DCMTree::IS,DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagInfo childInfo2(DCMTree::TagId(0x3006,0x0024),DCMTree::UI,DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagInfo childInfo3(DCMTree::TagId(0x3006,0x0026),DCMTree::LO,DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagInfo childInfo4(DCMTree::TagId(0x3006,0x0036),DCMTree::CS,DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagPtr itemTag1(new DCMTree::Tag(childInfo1)); + DCMTree::TagPtr itemTag2(new DCMTree::Tag(childInfo2)); + DCMTree::TagPtr itemTag3(new DCMTree::Tag(childInfo3)); + DCMTree::TagPtr itemTag4(new DCMTree::Tag(childInfo4)); + std::stringstream s; + s << int(group->getId()); + itemTag1->addValue(s.str()); + itemTag2->addValue(refFOfRef); + std::string label = group->getLabel(); + if (label.empty()) { + label.assign("Group "); + std::stringstream s; + s << int(group->getId()); + label.append(s.str()); + + ML_PRINT_WARNING("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "There is no CSO group label.Add default as group [number]"); + } + itemTag3->addValue(label); + childTree->addTag(childInfo1.id(), itemTag1); + childTree->addTag(childInfo2.id(), itemTag2); + childTree->addTag(childInfo3.id(), itemTag3); + childTree->addTag(childInfo4.id(), itemTag4); + csoGroupTag->addSequenceItem(childTree); + } + return true; +} + +//---------------------------------------------------------------------------------- +//! add CSO Tags into RT structure +//---------------------------------------------------------------------------------- +bool CSOToRTStructure::addCSOTags(DCMTree::TagPtr csoTag, DCMTree::TreePtr contourTree) { + if (_inputCSOs== NULL){ + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); + return false; + } + unsigned int num = _inputCSOs->numCSO(); + if (num == 0) { + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there is no input CSOs."); + return false; + } + unsigned int groupNum = _inputCSOs->numGroups(); + if (groupNum == 0) { + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because there are no CSO groups."); + return false; + } + unsigned int seqSize = csoTag->sequenceItems().size(); + if (seqSize != 0) { + csoTag->sequenceItems().erase(csoTag->sequenceItems().begin(), + csoTag->sequenceItems().end()); + } + for (unsigned int gInd = 0; gInd < groupNum; gInd ++) { + CSOGroup* group = _inputCSOs->getGroupAt(gInd); + if (group == NULL || group->numCSO() == 0){ + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "RT structure file cannot be generated because some groups donot contain any CSOs."); + return false; + } + DCMTree::TreePtr csoGTree(new DCMTree::Tree()); + + ml::vec3 color = group->getColor(); + string strColor[3]; + DCMTree::TagInfo info(DCMTree::TagId(0x3006,0x002a), DCMTree::IS,DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagPtr newTag(new DCMTree::Tag(info)); + csoGTree->addTag(DCMTree::TagId(0x3006,0x002a), newTag); + for (int i = 0; i < 3; i++) { + std::stringstream s; + s << int(color[i]*255); + strColor[i].assign(s.str()); + newTag->addValue(strColor[i]); + } + DCMTree::TreePtr childGTree(new DCMTree::Tree()); + addSequence(csoGTree, childGTree, DCMTree::TagId(0x3006,0x0040)); + DCMTree::TagPtr childGTag = csoGTree->getTag_rw(DCMTree::TagId(0x3006, 0x0040)); + unsigned int seqGSize = childGTag->sequenceItems().size(); + if (seqGSize != 0) { + childGTag->sequenceItems().erase(childGTag->sequenceItems().begin(), + childGTag->sequenceItems().end()); + } + + unsigned int csoNum = group->numCSO(); + bool colorAdded = false; + for (unsigned int in = 0; in < csoNum; in++) { + CSO* cso = group->getCSOAt(in); + //std::cout << cso->getId(); + if (cso->isInPlane()) { + CSOSeedPoint *sp = cso->getFirstSeedPoint(); + double z = sp->worldPosition[2]; + string refUID = getRefUID(z); + if (refUID.empty()){ + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "There are no matching slices for a CSO." + cso->getId()); + return false; + } + DCMTree::TreePtr csoCTree(new DCMTree::Tree()); + DCMTree::TreePtr seqTree(new DCMTree::Tree()); + + addSequence(csoCTree, seqTree, DCMTree::TagId(0x3006,0x0016)); + DCMTree::TagPtr UIDs = csoCTree->getTag_rw(DCMTree::TagId(0x3006,0x0016)); + + addTag(seqTree, DCMTree::TagId(0x0008,0x1150),_refSopClassUID, DCMTree::UI); + addTag(seqTree, DCMTree::TagId(0x0008,0x1155),refUID, DCMTree::UI); + addTag(csoCTree, DCMTree::TagId(0x3006,0x0042),"CLOSED_PLANAR", DCMTree::CS); + unsigned int ptNum = 0; + for (unsigned int i = 0; i < cso->numPathPointLists(); i ++){ + ml::CSOPathPoints* pt = cso->getPathPointsAt(i); + std::vector<vec3> vec; + pt->getWorldPositions(vec); + ptNum = ptNum + vec.size() + 1; + } + std::stringstream s; + s << int(ptNum); + addTag(csoCTree, DCMTree::TagId(0x3006,0x0046), s.str(), DCMTree::IS); + addCSOPathPoint(csoCTree, DCMTree::TagId(0x3006,0x0050), DCMTree::DS, cso); + if (colorAdded == false) { + csoTag->addSequenceItem(csoGTree); + colorAdded = true; + } + childGTag->addSequenceItem(csoCTree); + }else { + ML_PRINT_ERROR("mlCSOToRTStructure::_HandleNotification",ML_BAD_PARAMETER, "CSO must be in one plane to proceed."); + return false; + } + } + if(colorAdded == true) { + std::stringstream sg; + sg << int(group->getId()); + addTag(csoGTree, DCMTree::TagId(0x3006,0x0084), sg.str(), DCMTree::IS); + } + } + return true; +} + +//---------------------------------------------------------------------------------- +//! Add CSO Path points +//---------------------------------------------------------------------------------- +void CSOToRTStructure::addCSOPathPoint(DCMTree::TreePtr childTree, DCMTree::TagId tagId, DCMTree::Vr vr, ml::CSO* cso){ + DCMTree::TagInfo info(tagId, vr, DCMTree::TagValueMultiplicity(1,1)); + DCMTree::TagPtr newTag(new DCMTree::Tag(info)); + for (unsigned int i = 0; i < cso->numPathPointLists(); i ++){ + ml::CSOPathPoints* pt = cso->getPathPointsAt(i); + std::vector<vec3> vec; + pt->getWorldPositions(vec); + ml::CSOSeedPoint *tailPt = pt->tailSeedPoint; + ml::vec3 vecT = tailPt->worldPosition; + for (int i = 0; i < 3; i++){ + std::stringstream s; + s << vecT[i]; + std::string m = s.str(); + newTag->addValue(s.str()); + } + for (unsigned int j = 0; j < vec.size(); j ++){ + for (int coordInd = 0; coordInd < 3; coordInd++) { + std::stringstream s; + s << vec[j][coordInd]; + std::string m = s.str(); + newTag->addValue(s.str()); + } + } + } + childTree->addTag(tagId, newTag); +} + +//---------------------------------------------------------------------------------- +//! write to a DCMTree to a RT structure file +//---------------------------------------------------------------------------------- +void CSOToRTStructure::writeToDCMFile(DCMTree::TreePtr tree, std::string dest) { + + DCMTree::MessagePtr messagePtr = DCMTree::MessagePtr( + new DCMTree::Message(DCMTree_Unicode::UTF8CharacterSet(), DCMTree::IMPLICIT_LITTLE_ENDIAN)); + messagePtr->setTags(tree); + + // Create writer object + DCMTree::WriterPtr writer = DCMTree::Writer::create(DCMTree::Dict::singleton()); + + // Write message + DCMTree::IOParameterPtr param(DCMTree::IOParameter::create(dest)); + writer->write(param, messagePtr); +} + +ML_END_NAMESPACE + Added: trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOToRTStructure/mlCSOToRTStructure.h 2010-07-20 23:11:18 UTC (rev 285) @@ -0,0 +1,127 @@ +//---------------------------------------------------------------------------------- +//! The ML module class CSOToRTStructure. +/*! +// \file mlCSOToRTStructure.h +// \author linal +// \date 2010-01-20 +// +// convert CSOs to RT Structure +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __mlCSOToRTStructure_H +#define __mlCSOToRTStructure_H + + +// Local includes +#include <DCMTree_UIDGenerator.h> +#include "MLCSOToRTStructureSystem.h" +#include <CSOBase/CSOList.h> + +// ML includes +#include "mlOperatorIncludes.h" +#include <DCMTree_Lib.h> +#include "DCMTree_IOParameter.h" +#include "DCMTree_Reader.h" +#include "DCMTree_Dict.h" +#include "DCMTree_Tag.h" +#include "DCMTree_Value.h" +#include "DCMTree_Unicode.h" +#include "DCMTree_Writer.h" +#include <dcmtree_dicomtags.h> +#include <dcmtree_exception.h> +#include <dcmtree_message.h> +#include "RTStructure.h" + + + +ML_START_NAMESPACE + + +//! convert CSOs to RT Structure +class MLCSOTORTSTRUCTURE_EXPORT CSOToRTStructure : public BaseOp +{ +public: + + //! Constructor. + CSOToRTStructure (); + + //! D'structor. + ~CSOToRTStructure () {} + + + //! Handle field changes of the field field. + virtual void handleNotification (Field *field); + virtual void calcOutImageProps (int outIndex); + DCMTree::TreePtr getTreeHeaderPtr() {return _treeHeaderPtr;} + CSOList* getInputCSOs() {return _inputCSOs;} + BaseOp::INPUT_HANDLE handleInput(int /*inIndex*/, INPUT_STATE /*state*/) const; + //! Configures (in)validation handling of inputs which are not connected or up to date. + static std::map<std::string, std::string> _modalitySOPClassUIDMap; + void activateAttachments (); + void setValidFld(bool valid) {_validFld->setToggleValue(valid);} + static void setValid(CSOToRTStructure* obj); + //! Locking variable... + bool _isInNotificationCB; + //! update generated Tree + void updateGenTreeHeader(PagedImg *img); + +private: + + BaseField *_inListFld; + DCMTree::TreePtr _treeHeaderPtr; + DCMTree::TreePtr _genTreePtr; + CSOList *_inputCSOs; + NotifyField *_applyFld; + ToggleField *_validFld; + std::string _refSopClassUID; + static bool isInitialized; + + //map of SOPInstUIDs and position + std::map< float, std::string> _mSOPInstUIDs; + + //! input DCM File name + StringField *_rtStructFileFld; + float _voxelSizeZ; + + //! private functions + //! combine general headers + bool combineHeader(); + //! get ReferenceImage SOPUID from a z cooridate + std::string getRefUID(double z); + //! add a Tag + void addTag(DCMTree::TreePtr &parent, DCMTree::TagId tagId, std::string value, DCMTree::Vr vr); + //! add a sequence + void addSequence(DCMTree::TreePtr parentTree, DCMTree::TreePtr childTree, DCMTree::TagId tagId); + //! add a sequence Tag + void addSequenceTag(DCMTree::TreePtr &parent, DCMTree::TagId tagId); + //! write RT Structure in DICOM tree to a file + void writeToDCMFile(DCMTree::TreePtr tree, std::string dest); + //! Combine SOPINstUID and contourImage Tag + bool combineSOPInstUID(DCMTree::TagPtr conImageTag, std::string UID); + //! add CSO Group Tags + bool addCSOGroupTags(DCMTree::TagPtr csoGroupTag, std::string refFOfRef); + //! add CSO Tags + bool addCSOTags(DCMTree::TagPtr csoTag,DCMTree::TreePtr contourTree); + //! add CSO Path points to RT Structure + void addCSOPathPoint(DCMTree::TreePtr childTree, DCMTree::TagId tagId, DCMTree::Vr vr, ml::CSO* cso); + //! add RTROIOB Tags + void addRTROIObTags(DCMTree::TagPtr RTROIObTag, DCMTree::TreePtr RTROIObSeq); + //! set valid Field + void setValidField(); + + + + //! Can be notified from anywhere in the network. + static void CSOListNotifyObserverCB(void* userData, int notificationFlag); + + //! Implements interface for the runtime type system of the ML. + ML_BASEOP_CLASS_HEADER(CSOToRTStructure) +}; + + +ML_END_NAMESPACE + +#endif // __mlCSOToRTStructure_H + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gn...@us...> - 2010-07-15 08:39:31
|
Revision: 284 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=284&view=rev Author: gnubeu Date: 2010-07-15 08:39:23 +0000 (Thu, 15 Jul 2010) Log Message: ----------- + Added derivative version of the SPLINE library and an exclusive installer for it Modified Paths: -------------- trunk/Community/ThirdParty/Configuration/Installers/MasterBuilderInstallers_Nightly.txt Added Paths: ----------- trunk/Community/ThirdParty/Configuration/Installers/SPLINE.mlinstall trunk/Community/ThirdParty/Configuration/Installers/exclude.mli trunk/Community/ThirdParty/Sources/SPLINE/ trunk/Community/ThirdParty/Sources/SPLINE/COPYING trunk/Community/ThirdParty/Sources/SPLINE/COPYING.LESSER trunk/Community/ThirdParty/Sources/SPLINE/INSTALL trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.bat trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.sh trunk/Community/ThirdParty/Sources/SPLINE/spline.cpp trunk/Community/ThirdParty/Sources/SPLINE/spline.h trunk/Community/ThirdParty/Sources/SPLINE/spline.pro Modified: trunk/Community/ThirdParty/Configuration/Installers/MasterBuilderInstallers_Nightly.txt =================================================================== --- trunk/Community/ThirdParty/Configuration/Installers/MasterBuilderInstallers_Nightly.txt 2010-06-23 12:56:57 UTC (rev 283) +++ trunk/Community/ThirdParty/Configuration/Installers/MasterBuilderInstallers_Nightly.txt 2010-07-15 08:39:23 UTC (rev 284) @@ -3,7 +3,7 @@ # lines starting with "#" are ignored - please use this to comment # your changes!): # -# What: What should be build. This must be either the directory +# What: What should be built. This must be either the directory # containing the "config.txt"-file or the configuration file # itself. The path names must be relative to # $(PACKAGE_DIR)/Configuration/Installers. @@ -66,4 +66,4 @@ # The YourInstaller installer (this comment is used as title for the html installer pages) # YourInstaller/YourInstaller.mlinstall always whoever * - +SPLINE.mlinstall always rub...@me... * Added: trunk/Community/ThirdParty/Configuration/Installers/SPLINE.mlinstall =================================================================== --- trunk/Community/ThirdParty/Configuration/Installers/SPLINE.mlinstall (rev 0) +++ trunk/Community/ThirdParty/Configuration/Installers/SPLINE.mlinstall 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,63 @@ +INCLUDE $(MLAB_MeVis_Foundation)/Configuration/Installers/Shared/Core/setup.mli +INCLUDE $(MLAB_Community_ThirdParty)/Configuration/Installers/exclude.mli + +$LIBRARY_NAME SPLINE + +$ROOT_OUT $(OUTPUT) +$TMP_OUT $(OUTPUT)/$(LIBRARY_NAME) + +<MKDIR $(OUTPUT) +<MKDIR $(TMP_OUT) + +$INPUT $(MLAB_Community_ThirdParty)/Sources/$(LIBRARY_NAME) +$OUTPUT $(TMP_OUT)/$(LIBRARY_NAME) + +########################################################## +# SPLINE +########################################################## + ++ * + +########################################################## +# Libraries and DLLs +########################################################## + +$INPUT $(MLAB_Community_ThirdParty) +$OUTPUT $(TMP_OUT)/$(LIBRARY_NAME) + +MKDIR $(TMP_OUT)/$(LIBRARY_NAME)/lib + +IFDEF WIN32 + ++ lib/*$(LIBRARY_NAME)*.(lib|dll|pdb) + +ELIFDEF MACX + ++ lib/*$(LIBRARY_NAME)*.(dylib|a|framework) + +ELIFDEF LINUX + ++ lib/*$(LIBRARY_NAME)*.(so|a) + +ENDIF + +########################################################## +# Build installer +########################################################## + +$INPUT $(MLAB_Community_ThirdParty) +$OUTPUT $(TMP_OUT) + +$INSTALLER_FILENAME $(LIBRARY_NAME).zip + +>EXECUTE pwd +>CD "$(ROOT_OUT)" +IFDEF WIN32 +>EXECUTE zip "$(INSTALLER_TARGET_DIR)\$(INSTALLER_FILENAME)" -r $(LIBRARY_NAME) +ELSE +>EXECUTE zip -y $(INSTALLER_TARGET_DIR)/$(INSTALLER_FILENAME) -r $(LIBRARY_NAME) +ENDIF +>EXECUTE pwd + +# print the result file, so that other tools can find out about the created installer +PRINT **ResultFile**: $(INSTALLER_TARGET_DIR)/$(INSTALLER_FILENAME) \ No newline at end of file Property changes on: trunk/Community/ThirdParty/Configuration/Installers/SPLINE.mlinstall ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/Community/ThirdParty/Configuration/Installers/exclude.mli =================================================================== --- trunk/Community/ThirdParty/Configuration/Installers/exclude.mli (rev 0) +++ trunk/Community/ThirdParty/Configuration/Installers/exclude.mli 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,29 @@ +>- *.bak +>- *.bck +>- *.auto +>- *.d +>- */.* +>- *<CVS>* +>- *<.svn>* +>- *<private>* +>- *<tmp>* +>- *<build>* +>- *.pyc +>- *.dsw +>- *.dsp +>- *.vcproj +>- *.sln +>- *.opt +>- *.plg +>- *.ncb +>- *.stt +>- *.WW +>- *.o +>- */*.vcproj.*.user +>- *.xcodeproj +>- *<.DS_STORE>* + +# moc files might be interesting for debugging Qt, so we keep them +#>- */moc_* +#>- */moc_*.* +#>- */qrc_*.cpp Property changes on: trunk/Community/ThirdParty/Configuration/Installers/exclude.mli ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/Community/ThirdParty/Sources/SPLINE/COPYING =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/COPYING (rev 0) +++ trunk/Community/ThirdParty/Sources/SPLINE/COPYING 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. Added: trunk/Community/ThirdParty/Sources/SPLINE/COPYING.LESSER =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/COPYING.LESSER (rev 0) +++ trunk/Community/ThirdParty/Sources/SPLINE/COPYING.LESSER 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. Added: trunk/Community/ThirdParty/Sources/SPLINE/INSTALL =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/INSTALL (rev 0) +++ trunk/Community/ThirdParty/Sources/SPLINE/INSTALL 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,29 @@ +Ruben Stein (rub...@me...) - 2010-07-01 +Fraunhofer MEVIS + +This library provides the functionality of John Burkhardt's SPLINE library, modified to be linkable as shared library. + +Original SPLINE Sources: +http://people.sc.fsu.edu/~jburkardt/cpp_src/spline/spline.html + +License: LGPLv3 (see COPYING and COPYING.LESSER) + +----------------------------------------------------------------------------- + +To code downloaded on 2010-06-28 was modified to make the library dynamically linkable. For this to work, some import/export macros had to be defined for windows interfaces. Furthermore some small compilation warnings were removed. See spline.h for a modification list. + +----------------------------------------------------------------------------- + +To build the library you may use the provided qmake-file "spline.pro". In order to set some special target settings for the library, a file called "IncludePackages.pri" is included. This file is available via the public MeVisLab installer found here: http://www.mevislab.de/download/ + +Anyways, this line may not be necessary for your operating system. In that case, simply run: + +qmake spline.pro + +qmake is available via Qt (See http://qt.nokia.com) + +In case you installed the above mentioned MeVisLab installer, you may run: + +On Windows: spline.bat +On Linux: spline.sh +On Mac: simply double-click spline.pro Added: trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.bat =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.bat (rev 0) +++ trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.bat 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1 @@ +"%MLAB_ROOT%\MeVis\Foundation\BuildTools\Scripts\createProject.bat" SPLINE \ No newline at end of file Property changes on: trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.bat ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.sh =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.sh (rev 0) +++ trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.sh 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,2 @@ +#!/bin/bash +python $MLAB_ROOT/MeVis/Foundation/BuildTools/Scripts/createProject.py SPLINE \ No newline at end of file Property changes on: trunk/Community/ThirdParty/Sources/SPLINE/SPLINE.sh ___________________________________________________________________ Added: svn:executable + * Added: svn:eol-style + native Added: trunk/Community/ThirdParty/Sources/SPLINE/spline.cpp =================================================================== --- trunk/Community/ThirdParty/Sources/SPLINE/spline.cpp (rev 0) +++ trunk/Community/ThirdParty/Sources/SPLINE/spline.cpp 2010-07-15 08:39:23 UTC (rev 284) @@ -0,0 +1,6544 @@ +# include "spline.h" + +# include <cstdlib> +# include <iostream> +# include <iomanip> +# include <cmath> +# include <ctime> + +namespace spline +{ + +//****************************************************************************80 + +double basis_function_b_val ( double tdata[], double tval ) + +//****************************************************************************80 +// +// Purpose: +// +// BASIS_FUNCTION_B_VAL evaluates the B spline basis function. +// +// Discussion: +// +// The B spline basis function is a piecewise cubic which +// has the properties that: +// +// * it equals 2/3 at TDATA(3), 1/6 at TDATA(2) and TDATA(4); +// * it is 0 for TVAL <= TDATA(1) or TDATA(5) <= TVAL; +// * it is strictly increasing from TDATA(1) to TDATA(3), +// and strictly decreasing from TDATA(3) to TDATA(5); +// * the function and its first two derivatives are continuous +// at each node TDATA(I). +// +// Licensing: +// +// This code is distributed under the GNU LGPL license. +// +// Modified: +// +// 24 February 2004 +// +// Author: +// +// John Burkardt +// +// Reference: +// +// Alan Davies, Philip Samuels, +// An Introduction to Computational Geometry for Curves and Surfaces, +// Clarendon Press, 1996, +// ISBN: 0-19-851478-6, +// LC: QA448.D38. +// +// Parameters: +// +// Input, double TDATA(5), the nodes associated with the basis function. +// The entries of TDATA are assumed to be distinct and increasing. +// +// Input, double TVAL, a point at which the B spline basis function is +// to be evaluated. +// +// Output, double BASIS_FUNCTION_B_VAL, the value of the function at TVAL. +// +{ +# define NDATA 5 + + int left; + int right; + double u; + double yval(0.); + + if ( tval <= tdata[0] || tdata[NDATA-1] <= tval ) + { + yval = 0.0; + return yval; + } +// +// Find the interval [ TDATA(LEFT), TDATA(RIGHT) ] containing TVAL. +// + r8vec_bracket ( NDATA, tdata, tval, &left, &right ); +// +// U is the normalized coordinate of TVAL in this interval. +// + u = ( tval - tdata[left-1] ) / ( tdata[right-1] - tdata[left-1] ); +// +// Now evaluate the function. +// + if ( tval < tdata[1] ) + { + yval = pow ( u, 3 ) / 6.0; + } + else if ( tval < tdata[2] ) + { + yval = ( ( ( - 3.0 + * u + 3.0 ) + * u + 3.0 ) + * u + 1.0 ) / 6.0; + } + else if ( tval < tdata[3]) + { + yval = ( ( ( + 3.0 + * u - 6.0 ) + * u + 0.0 ) + * u + 4.0 ) / 6.0; + } + else if ( tval < tdata[4] ) + { + yval = pow ( ( 1.0 - u ), 3 ) / 6.0; + } + + return yval; + +# undef NDATA +} +//****************************************************************************80 + +double basis_function_beta_val ( double beta1, double beta2, double tdata[], + double tval ) + +//****************************************************************************80 +// +// Purpose: +// +// BASIS_FUNCTION_BETA_VAL evaluates the beta spline basis function. +// +// Discussion: +// +// With BETA1 = 1 and BETA2 = 0, the beta spline basis function +// equals the B spline basis function. +// +// With BETA1 large, and BETA2 = 0, the beta spline basis function +// skews to the right, that is, its maximum increases, and occurs +// to the right of the center. +// +// With BETA1 = 1 and BETA2 large, the beta spline becomes more like +// a linear basis function; that is, its value in the outer two intervals +// goes to zero, and its behavior in the inner two intervals approaches +// a piecewise linear function that is 0 at the second node, 1 at the +// third, and 0 at the fourth. +// +// Licensing: +// +// This code is distributed under the GNU LGPL license. +// +// Modified: +// +// 24 February 2004 +// +// Author: +// +// John Burkardt +// +// Reference: +// +// Alan Davies, Philip Samuels, +// An Introduction to Computational Geometry for Curves and Surfaces, +// Clarendon Press, 1996, +// ISBN: 0-19-851478-6, +// LC: QA448.D38. +// +// Parameters: +// +// Input, double BETA1, the skew or bias parameter. +// BETA1 = 1 for no skew or bias. +// +// Input, double BETA2, the tension parameter. +// BETA2 = 0 for no tension. +// +// Input, double TDATA[5], the nodes associated with the basis function. +// The entries of TDATA are assumed to be distinct and increasing. +// +// Input, double TVAL, a point at which the B spline basis function is +// to be evaluated. +// +// Output, double BASIS_FUNCTION_BETA_VAL, the value of the function at TVAL. +// +{ +# define NDATA 5 + + double a; + double b; + double c; + double d; + int left; + int right; + double u; + double yval(0.); + + if ( tval <= tdata[0] || tdata[NDATA-1] <= tval ) + { + yval = 0.0; + return yval; + } +// +// Find the interval [ TDATA(LEFT), TDATA(RIGHT) ] containing TVAL. +// + r8vec_bracket ( NDATA, tdata, tval, &left, &right ); +// +// U is the normalized coordinate of TVAL in this interval. +// + u = ( tval - tdata[left-1] ) / ( tdata[right-1] - tdata[left-1] ); +// +// Now evaluate the function. +// + if ( tval < tdata[1] ) + { + yval = 2.0 * u * u * u; + } + else if ( tval < tdata[2] ) + { + a = beta2 + 4.0 * beta1 + 4.0 * beta1 * beta1 + + 6.0 * ( 1.0 - beta1 * beta1 ) + - 3.0 * ( 2.0 + beta2 + 2.0 * beta1 ) + + 2.0 * ( 1.0 + beta2 + beta1 + beta1 * beta1 ); + + b = - 6.0 * ( 1.0 - beta1 * beta1 ) + + 6.0 * ( 2.0 + beta2 + 2.0 * beta1 ) + - 6.0 * ( 1.0 + beta2 + beta1 + beta1 * beta1 ); + + c = - 3.0 * ( 2.0 + beta2 + 2.0 * beta1 ) + + 6.0 * ( 1.0 + beta2 + beta1 + beta1 * beta1 ); + + d = - 2.0 * ( 1.0 + beta2 + beta1 + beta1 * beta1 ); + + yval = a + b * u + c * u * u + d * u * u * u; + } + else if ( tval < tdata[3] ) + { + a = beta2 + 4.0 * beta1 + 4.0 * beta1 * beta1; + + b = - 6.0 * beta1 * ( 1.0 - beta1 * beta1 ); + + c = - 3.0 * ( beta2 + 2.0 * beta1 * beta1 + + 2.0 * beta1 * beta1 * beta1 ); + + d = 2.0 * ( beta2 + beta1 + beta1 * beta1 + beta1 * beta1 * beta1 ); + + yval = a + b * u + c * u * u + d * u * u * u; + } + else if ( tval < tdata[4] ) + { + yval = 2.0 * pow ( beta1 * ( 1.0 - u ), 3 ); + } + + yval = yval / ( 2.0 + beta2 + 4.0 * beta1 + 4.0 * beta1 * beta1 + + 2.0 * beta1 * beta1 * beta1 ); + + return yval; +# undef NDATA +} +//****************************************************************************80 + +double *basis_matrix_b_uni ( ) + +//****************************************************************************80 +// +// Purpose: +// +// BASIS_MATRIX_B_UNI sets up the uniform B spline basis matrix. +// +// Licensing: +// +// This code is distributed under the GNU LGPL license. +// +// Modified: +// +// 11 February 2004 +// +// Author: +// +// John Burkardt +// +// Reference: +// +// James Foley, Andries vanDam, Steven Feiner, John Hughes, +// Computer Graphics, Principles and Practice, +// Second Edition, +// Addison Wesley, 1995, +// ISBN: 0201848406, +// LC: T385.C5735. +// +// Parameters: +// +// Output, double BASIS_MATRIX_B_UNI[4*4], the basis matrix. +// +{ + int i; + int j; + double *mbasis; + double mbasis_save[4*4] = { + -1.0 / 6.0, + 3.0 / 6.0, + -3.0 / 6.0, + 1.0 / 6.0, + 3.0 / 6.0, + -6.0 / 6.0, + 0.0, + 4.0 / 6.0, + -3.0 / 6.0, + 3.0 / 6.0, + 3.0 / 6.0, + 1.0 / 6.0, + 1.0 / 6.0, + 0.0, + 0.0, + 0.0 }; + + mbasis = new double[4*4]; + + for ( j = 0; j < 4; j++ ) + { + for ( i = 0; i < 4; i++ ) + { + mbasis[i+j*4] = mbasis_save[i+j*4]; + } + } + + return mbasis; +} +//***************************... [truncated message content] |
From: <bro...@us...> - 2010-06-23 12:57:03
|
Revision: 283 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=283&view=rev Author: broersen Date: 2010-06-23 12:56:57 +0000 (Wed, 23 Jun 2010) Log Message: ----------- - Added different WEM in- and output type to the example network Modified Paths: -------------- trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab Modified: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab =================================================================== --- trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab 2010-06-23 12:50:30 UTC (rev 282) +++ trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab 2010-06-23 12:56:57 UTC (rev 283) @@ -2,115 +2,9 @@ network { watchlist = "" } -module Comment { - internal { - frame = "1081 277 96 56" - moduleGroupName = "" - windows { - window _default { - geometry = "912 589 256 208" - sizeHint = "256 208" - wasOpen = no - wasActive = yes - } - } - } - fields { - instanceName = Comment4 - comment = "This example creates a cube in Matlab and outputs it to MeVisLab as a WEM. Press the Update button in the MatlabScriptWrapper and see the result in the SoExaminerViewer." - } - internalFields = "" -} -module SoExaminerViewer { - internal { - frame = "1205 213 152 56" - moduleGroupName = "" - windows { - window _default { - geometry = "26 59 489 362" - sizeHint = "489 362" - wasOpen = no - wasActive = no - } - window _viewer { - geometry = "1175 433 490 468" - sizeHint = "400 400" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = SoExaminerViewer2 - renderCaching = AUTO - boundingBoxCaching = AUTO - renderCulling = AUTO - pickCulling = AUTO - border = FALSE - background = "0 0 0" - transparency = DELAYED_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 - inputDevicesList = "" - 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.78539801 - position = "-1.55051124095917 1.04046010971069 1.21177983283997" - orientation = "0.635775923728943 0.228879645466805 -0.737158834934235 4.71452140808105" - nearDistance = 1.370454 - farDistance = 3.0832441 - focalDistance = 2.2259948 - 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 = "1213 285 136 56" + frame = "885 173 136 56" moduleGroupName = "" windows { window _default { @@ -172,134 +66,14 @@ selectedTab = 0 } } -module MatlabScriptWrapper { - internal { - frame = "1153 365 160 56" - moduleGroupName = "" - windows { - window _default { - geometry = "659 306 600 619" - sizeHint = "616 619" - wasOpen = no - wasActive = no - } - } - } - fields { - instanceName = MatlabScriptWrapper4 - matlabScript = "outWEM.nodes = [ - -.5 .5 .5; - .5 .5 .5; - .5 -.5 .5; - -.5 -.5 .5; - -.5 .5 -.5; - .5 .5 -.5; - .5 -.5 -.5; - -.5 -.5 -.5 - ] -outWEM.faces = [ - 1 5 4; - 1 4 0; - 2 6 5; - 2 5 1; - 3 7 6; - 3 6 2; - 4 7 3; - 4 3 0; - 3 2 1; - 3 1 0; - 5 6 7; - 5 7 4 - ]" - useExternalScript = FALSE - matlabScriptPath = "" - inDataName0 = Input0 - inDataName1 = Input1 - inDataName2 = Input2 - outDataName0 = Output0 - outDataName1 = Output1 - outDataName2 = Output2 - inXMarkerName = inXMarker - outXMarkerName = outXMarker - inWEMName = inWEM - outWEMName = outWEM - autoUpdate = FALSE - autoApply = FALSE - status = "Execution successful!" - 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 = string0 - string0 = "" - stringName1 = string1 - string1 = "" - stringName2 = string2 - string2 = "" - stringName3 = string3 - 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 = "<PRE>>> -outWEM = - - nodes: [8x3 double] - ->> -outWEM = - - nodes: [8x3 double] - faces: [12x3 double] - -" - showSessionWindow = TRUE - } -} module Comment { internal { - frame = "953 589 96 56" + frame = "969 253 96 56" moduleGroupName = "" windows { window _default { - geometry = "625 584 256 208" - sizeHint = "256 208" + geometry = "625 584 232 209" + sizeHint = "256 209" wasOpen = no wasActive = no } @@ -307,13 +81,14 @@ } fields { instanceName = Comment3 - comment = "This example creates and implict representation of a torus in Matlab and visualizes it in MeVisLab as an isosurface. Press the Update button in the MatlabScriptWrapper and see the result in the SoExaminerViewer." + comment = "This example creates and implict representation of a torus in Matlab and visualizes it in MeVisLab as an isosurface. +It also creates a cube in Matlab and outputs it to MeVisLab as a WEM. Press the Update button in the MatlabScriptWrapper and see the result in the SoExaminerViewer." } internalFields = "" } module SoWEMRenderer { internal { - frame = "801 513 128 64" + frame = "753 169 128 64" moduleGroupName = "" windows { window _default { @@ -377,7 +152,7 @@ } module SoExaminerViewer { internal { - frame = "789 445 152 56" + frame = "809 101 144 56" moduleGroupName = "" windows { window _default { @@ -418,7 +193,6 @@ autoUpdateML = FALSE showSnapshotWithShell = FALSE snapCount = 0 - inputDevicesList = "" headlight = TRUE decoration = TRUE popupMenuEnabled = FALSE @@ -440,12 +214,12 @@ perspective = TRUE stereoViewing = FALSE stereoOffset = 3 - height = 0.78539801 - position = "48.9234848022461 94.9647216796875 145.518615722656" - orientation = "0.343631237745285 -0.276928246021271 -0.897345185279846 5.13705348968506" - nearDistance = 96.226913 - farDistance = 141.02026 - focalDistance = 118.60152 + height = 0.7853980064 + position = "48.92348480224609 94.9647216796875 145.5186157226562" + orientation = "0.343631237745285 -0.2769282460212708 -0.8973451852798462 5.137053489685059" + nearDistance = 96.22691345 + farDistance = 141.0202637 + focalDistance = 118.6015167 forceRedrawOnInteraction = FALSE button1events = TO_VIEWER button2events = TO_VIEWER @@ -464,7 +238,7 @@ } module WEMIsoSurface { internal { - frame = "797 589 120 56" + frame = "749 245 120 56" moduleGroupName = "" windows { window _default { @@ -530,7 +304,7 @@ } module Comment { internal { - frame = "1289 605 96 56" + frame = "905 549 96 56" moduleGroupName = "" windows { window _default { @@ -549,7 +323,7 @@ } module View2D { internal { - frame = "1093 541 88 56" + frame = "713 485 80 56" moduleGroupName = "" windows { window _default { @@ -592,21 +366,20 @@ annotationOn = TRUE annotationMode = ANNO_MODE_AUTO annotationSizeMode = ANNO_SHOW_DETAILED - annotationCol = "0.899999976158142 0.899999976158142 0.899999976158142" + annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" annotationFontSize = ANNO_SIZE_AUTO annoCoords = Voxel annoCTValue = AsIs borderOn = TRUE - borderColor = "0.899999976158142 0.899999976158142 0.899999976158142" + borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" valueHighPrecision = FALSE - maxPrecision = 4 plane = "0 0 1 5.5" } internalFields = "" } module LocalImage { internal { - frame = "1157 685 104 56" + frame = "777 629 96 56" moduleGroupName = "" } fields { @@ -619,7 +392,7 @@ } module SubImage { internal { - frame = "1189 605 88 56" + frame = "805 549 88 56" moduleGroupName = "" windows { window _default { @@ -659,7 +432,7 @@ } module MatlabScriptWrapper { internal { - frame = "1185 533 160 56" + frame = "805 477 152 56" moduleGroupName = "" windows { window _default { @@ -760,7 +533,7 @@ } module StylePalette { internal { - frame = "45 621 104 56" + frame = "457 293 96 56" moduleGroupName = "" } fields { @@ -862,12 +635,12 @@ } module MatlabScriptWrapper { internal { - frame = "809 661 160 56" + frame = "765 317 152 56" moduleGroupName = "" windows { window _default { - geometry = "257 300 400 657" - sizeHint = "400 657" + geometry = "714 332 600 621" + sizeHint = "600 621" wasOpen = no wasActive = no } @@ -875,10 +648,37 @@ } fields { instanceName = MatlabScriptWrapper2 - matlabScript = "% The script lines below sets the output image to an implicit % function representation of a torus. + matlabScript = "% The script lines below sets the output image to an implicit +% function representation of a torus. [x,y,z] = meshgrid(-10:0.25:10,-10:0.25:10,-10:0.25:10); R = 6; -Output0 = (R-sqrt(x.^2+y.^2)).^2 + z.^2;" +Output0 = (R-sqrt(x.^2+y.^2)).^2 + z.^2; + +% And constructs a WEM representation of a cube +outWEM{1}.Vertices = [ + 30 50 50; + 50 50 50; + 50 30 50; + 30 30 50; + 30 50 30; + 50 50 30; + 50 30 30; + 30 30 30 + ] +outWEM{1}.Faces = [ + 2 6 5; + 2 5 1; + 3 7 6; + 3 6 2; + 4 8 7; + 4 7 3; + 5 8 4; + 5 4 1; + 4 3 2; + 4 2 1; + 6 7 8; + 6 8 5 + ]" useExternalScript = FALSE matlabScriptPath = "" inDataName0 = Input0 @@ -1065,21 +865,20 @@ annotationOn = TRUE annotationMode = ANNO_MODE_AUTO annotationSizeMode = ANNO_SHOW_DETAILED - annotationCol = "0.899999976158142 0.899999976158142 0.899999976158142" + annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" annotationFontSize = ANNO_SIZE_AUTO annoCoords = Voxel annoCTValue = AsIs borderOn = TRUE - borderColor = "0.899999976158142 0.899999976158142 0.899999976158142" + borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" valueHighPrecision = FALSE - maxPrecision = 4 plane = "0 0 1 0.5" } internalFields = "" } module TestPattern { internal { - frame = "437 653 104 56" + frame = "441 653 96 56" moduleGroupName = "" windows { window _default { @@ -1102,10 +901,6 @@ fillValue = 1 autoApply = TRUE pattern = FilledMaxEllipsoid - voxelSize = "1 1 1" - gradient = "0 0 0" - eigenValues = "1 0 -1" - offDiagonalElements = "0 0 0" fillValue2 = 0 pageSizeX = 32 pageSizeY = 32 @@ -1117,7 +912,7 @@ } module MatlabScriptWrapper { internal { - frame = "529 549 160 56" + frame = "533 549 152 56" moduleGroupName = "" windows { window _default { @@ -1219,7 +1014,7 @@ } module Comment { internal { - frame = "-11 501 88 56" + frame = "397 173 88 56" moduleGroupName = "" windows { window _default { @@ -1239,7 +1034,7 @@ } module SoExaminerViewer { internal { - frame = "81 429 144 56" + frame = "493 101 136 56" moduleGroupName = "" windows { window _viewer { @@ -1274,7 +1069,6 @@ autoUpdateML = FALSE showSnapshotWithShell = FALSE snapCount = 0 - inputDevicesList = "" headlight = TRUE decoration = TRUE popupMenuEnabled = FALSE @@ -1296,12 +1090,12 @@ perspective = TRUE stereoViewing = FALSE stereoOffset = 3 - height = 0.78539819 - position = "1.46615374088287 -34.2523536682129 -22.5416316986084" - orientation = "-0.188540622591972 0.862696647644043 -0.469262212514877 3.30506730079651" - nearDistance = 31.739943 - farDistance = 50.337395 - focalDistance = 41.045261 + height = 0.7853981853 + position = "1.466153740882874 -34.25235366821289 -22.5416316986084" + orientation = "-0.1885405629873276 0.862696647644043 -0.4692620933055878 3.305067300796509" + nearDistance = 31.73994255 + farDistance = 50.33739471 + focalDistance = 41.04526138 forceRedrawOnInteraction = FALSE button1events = TO_VIEWER button2events = TO_VIEWER @@ -1320,7 +1114,7 @@ } module So3DXMarker { internal { - frame = "101 501 120 56" + frame = "509 173 120 56" moduleGroupName = "" windows { window _default { @@ -1392,7 +1186,7 @@ } module MatlabScriptWrapper { internal { - frame = "141 621 152 56" + frame = "553 293 144 56" moduleGroupName = "" windows { window _default { @@ -1488,10 +1282,9 @@ } } connections { - SoExaminerViewer2.children = SoWEMRenderer1.self - SoWEMRenderer1.inWEM = MatlabScriptWrapper4.outputWEM + SoWEMRenderer1.inWEM = MatlabScriptWrapper2.outputWEM TorusRenderer.inWEM = WEMIsoSurface.outWEM - SoExaminerViewer1.children = TorusRenderer.self + SoExaminerViewer1.children = "TorusRenderer.self SoWEMRenderer1.self" WEMIsoSurface.input0 = MatlabScriptWrapper2.output0 View2D1.inImage = SubImage.output0 SubImage.input0 = LocalImage.outImage This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bro...@us...> - 2010-06-23 12:50:36
|
Revision: 282 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=282&view=rev Author: broersen Date: 2010-06-23 12:50:30 +0000 (Wed, 23 Jun 2010) Log Message: ----------- - Changed WEM in- and output type for compatibility with the Matlab structure for its patch-type Modified Paths: -------------- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp Modified: trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2010-06-17 07:29:38 UTC (rev 281) +++ trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2010-06-23 12:50:30 UTC (rev 282) @@ -826,7 +826,7 @@ // Copy data to Matlab array. memcpy((void*)mxGetPr(m_pImage), data, inDataSize*elementSize); - // Get input names from gui. + // Get input names from GUI. std::string inputName = _inDataNameFld[i]->getStringValue(); // Write data to Matlab. engPutVariable(m_pEngine, inputName.c_str(), m_pImage); @@ -993,7 +993,7 @@ return; } - // Get input list. + // Get input WEM. WEM *inputWEM = mlbase_cast<WEM*>(_inputWEMFld->getBaseValue()); // Internal loop. @@ -1010,31 +1010,31 @@ // Strings to evaluate. std::ostringstream setNodes, setFaces, setNormals; - setNodes << inWEMStr.c_str() << ".nodes=["; - setFaces << inWEMStr.c_str() << ".faces=["; - setNormals << inWEMStr.c_str() << ".normals=["; + setNodes << inWEMStr.c_str() << "{1}.Vertices=["; + setFaces << inWEMStr.c_str() << "{1}.Faces=["; + setNormals << inWEMStr.c_str() << "{1}.VertexNormals=["; // Loop over all patches -> flatten WEM for (i = 0; i < inputWEM->getNumWEMPatches(); i ++) { - WEMPatch *wemPatch = inputWEM->getWEMPatchAt(i); + WEMPatch *patch = inputWEM->getWEMPatchAt(i); // Loop over all nodes - const unsigned int numNodes = wemPatch->getNumNodes(); + const unsigned int numNodes = patch->getNumNodes(); for (j = 0; j < numNodes; j ++) { - node = wemPatch->getNodeAt(j); + node = patch->getNodeAt(j); position = node->getPosition(); setNodes << std::dec << position[0] << "," << std::dec << position[1] << "," << std::dec << position[2] << ";"; } numTriangulatedNodes = 0; // Loop over all faces - const unsigned int numFaces = wemPatch->getNumFaces(); + const unsigned int numFaces = patch->getNumFaces(); for (j = 0; j < numFaces; j ++) { - face = wemPatch->getFaceAt(j); + face = patch->getFaceAt(j); const unsigned int numFaceNodes = face->getNumNodes(); if (numFaceNodes == 3) { for (k = 0; k < 3; k ++) { - entryNumber = totalNumNodes + face->getNodeAt(k)->getEntryNumber(); + entryNumber = totalNumNodes + face->getNodeAt(k)->getEntryNumber(); setFaces << entryNumber << ","; } setFaces << ";"; @@ -1045,7 +1045,7 @@ for (k = 0; k < numFaceNodes; k ++) { for (m = 0; m < 2; m ++) { - entryNumber = totalNumNodes + face->getNodeAt((m + k) % numFaceNodes)->getEntryNumber(); + entryNumber = totalNumNodes + face->getNodeAt((m + k) % numFaceNodes)->getEntryNumber(); setFaces << entryNumber << ","; } setFaces << totalNumNodes + node->getEntryNumber(); @@ -1053,7 +1053,7 @@ } } - normal = face->getNormal(); + normal = node->getNormal(); setNormals << std::dec << normal[0] << "," << std::dec << normal[1] << "," << std::dec << normal[2] << ";"; } @@ -1061,7 +1061,7 @@ } setNodes << "]"; - setFaces << "]"; + setFaces << "]+1"; setNormals << "]"; // Put WEM into matlab structure. @@ -1070,7 +1070,7 @@ engEvalString(m_pEngine, setNormals.str().c_str()); } -//! Gets WEM from Matlab and copies results into output WEM. +//! Gets structure from Matlab and copies results into output WEM. void MatlabScriptWrapper::_getWEMBackFromMatlab() { // Clear _outWEM. @@ -1092,62 +1092,69 @@ WEMTriangle *triangle = NULL; unsigned int i = 0; - std::ostringstream executeStr; - - // Get nodes - executeStr << "tmpOutWEMNodes=" << outWEMStr << ".nodes"; - engEvalString(m_pEngine, executeStr.str().c_str()); - mxArray *m_nodes = engGetVariable(m_pEngine, "tmpOutWEMNodes"); - engEvalString(m_pEngine, "clear tmpOutWEMNodes"); - executeStr.str(""); - - // Get faces - executeStr << "tmpOutWEMFaces=" << outWEMStr << ".faces"; - engEvalString(m_pEngine, executeStr.str().c_str()); - mxArray *m_faces = engGetVariable(m_pEngine, "tmpOutWEMFaces"); - engEvalString(m_pEngine, "clear tmpOutWEMFaces"); - executeStr.str(""); - - // Get data from Matlab array. - if (m_nodes && !mxIsEmpty(m_nodes) && mxGetClassID(m_nodes) == mxDOUBLE_CLASS) - { - double *dataNodes = static_cast<double*>(mxGetPr(m_nodes)); - - if (dataNodes != NULL) { - const size_t node_rows = mxGetM(m_nodes); + // Internal temp variable with the number of patches in Matlab. + mxArray *m_patchList = engGetVariable(m_pEngine, outWEMStr.c_str()); + if(m_patchList!=NULL) { + const size_t patches = mxGetN(m_patchList); // Number of patches in Matlab variable + for(size_t j=1; j<=patches; j++) { + // Compose temp string to execute in Matlab. + std::ostringstream executeStr; + + // Get nodes + executeStr << "tmpOutWEMNodes=" << outWEMStr << "{" << j << "}" << ".Vertices"; + engEvalString(m_pEngine, executeStr.str().c_str()); + mxArray *m_nodes = engGetVariable(m_pEngine, "tmpOutWEMNodes"); + engEvalString(m_pEngine, "clear tmpOutWEMNodes"); + executeStr.str(""); - ML_CHECK_NEW(triPatch, WEMTrianglePatch()); + // Get faces + executeStr << "tmpOutWEMFaces=" << outWEMStr << "{" << j << "}" << ".Faces-1"; + engEvalString(m_pEngine, executeStr.str().c_str()); + mxArray *m_faces = engGetVariable(m_pEngine, "tmpOutWEMFaces"); + engEvalString(m_pEngine, "clear tmpOutWEMFaces"); + executeStr.str(""); - for (i = 0; i < node_rows; i ++) { - node = triPatch->addNode(); - node->setPosition(dataNodes[i], dataNodes[i + node_rows], dataNodes[i + 2 * node_rows]); - } - - if (m_faces && !mxIsEmpty(m_faces) && mxGetClassID(m_faces) == mxDOUBLE_CLASS) + // Get data from Matlab array. + if (m_nodes && !mxIsEmpty(m_nodes) && mxGetClassID(m_nodes) == mxDOUBLE_CLASS) { - double *dataFaces = static_cast<double*>(mxGetPr(m_faces)); + double *dataNodes = static_cast<double*>(mxGetPr(m_nodes)); - if (dataFaces != NULL) { - const size_t face_rows = mxGetM(m_faces); + if (dataNodes != NULL) { + const size_t node_rows = mxGetM(m_nodes); - for (i = 0; i < face_rows; i ++) { - triangle = triPatch->addTriangle(); - node = triPatch->getNodeAt(dataFaces[i]); triangle->setNode(0,node); node->addFace(triangle); - node = triPatch->getNodeAt(dataFaces[i + face_rows]); triangle->setNode(1,node); node->addFace(triangle); - node = triPatch->getNodeAt(dataFaces[i + 2 * face_rows]); triangle->setNode(2,node); node->addFace(triangle); - } - } + ML_CHECK_NEW(triPatch, WEMTrianglePatch()); + + for (i = 0; i < node_rows; i ++) { + node = triPatch->addNode(); + node->setPosition(dataNodes[i], dataNodes[i + node_rows], dataNodes[i + 2 * node_rows]); + } + + if (m_faces && !mxIsEmpty(m_faces) && mxGetClassID(m_faces) == mxDOUBLE_CLASS) + { + double *dataFaces = static_cast<double*>(mxGetPr(m_faces)); + + if (dataFaces != NULL) { + const size_t face_rows = mxGetM(m_faces); + + for (i = 0; i < face_rows; i ++) { + triangle = triPatch->addTriangle(); + node = triPatch->getNodeAt(dataFaces[i]); triangle->setNode(0,node); node->addFace(triangle); + node = triPatch->getNodeAt(dataFaces[i + face_rows]); triangle->setNode(1,node); node->addFace(triangle); + node = triPatch->getNodeAt(dataFaces[i + 2 * face_rows]); triangle->setNode(2,node); node->addFace(triangle); + } + } + } + + triPatch->buildEdgeConnectivity(); + triPatch->computeNormals(); + + _outWEM->addWEMPatch(triPatch); + } } - - triPatch->buildEdgeConnectivity(); - triPatch->computeNormals(); - - _outWEM->addWEMPatch(triPatch); - } + mxDestroyArray(m_nodes); + mxDestroyArray(m_faces); + } } - - mxDestroyArray(m_nodes); - mxDestroyArray(m_faces); } //! Copies scalar values to matlab. @@ -1197,8 +1204,7 @@ } } } - mxDestroyArray(temp); - temp = NULL; + mxDestroyArray(temp); temp = NULL; } //! Copies string values to matlab. @@ -1250,8 +1256,7 @@ ML_DELETE(fieldVal); } } - mxDestroyArray(temp); - temp = NULL; + mxDestroyArray(temp); temp = NULL; } //! Copy input vectors to matlab. @@ -1309,8 +1314,7 @@ } } } - mxDestroyArray(temp); - temp = NULL; + mxDestroyArray(temp); temp = NULL; } //! Copy input matrices to matlab. @@ -1374,8 +1378,7 @@ } } } - mxDestroyArray(temp); - temp = NULL; + mxDestroyArray(temp); temp = NULL; } ML_END_NAMESPACE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2010-06-17 07:29:44
|
Revision: 281 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=281&view=rev Author: bartdedobbelaer Date: 2010-06-17 07:29:38 +0000 (Thu, 17 Jun 2010) Log Message: ----------- - Added camera orientation to parameters Modified Paths: -------------- trunk/Community/General/Modules/Macros/CombinedOrthoView/CombinedOrthoView3D.script Modified: trunk/Community/General/Modules/Macros/CombinedOrthoView/CombinedOrthoView3D.script =================================================================== --- trunk/Community/General/Modules/Macros/CombinedOrthoView/CombinedOrthoView3D.script 2010-06-17 07:28:34 UTC (rev 280) +++ trunk/Community/General/Modules/Macros/CombinedOrthoView/CombinedOrthoView3D.script 2010-06-17 07:29:38 UTC (rev 281) @@ -1,70 +1,72 @@ -Interface { - Inputs { - Field child0 { internalName = SoExaminerViewer.child } - Field child1 { internalName = SoRenderArea.child } - } - Outputs {} - Parameters { - Field automaticViewAll { internalName = SoExaminerViewer.automaticViewAll } - Field viewAll { internalName = SoExaminerViewer.viewAll } - - Field position { type = enum items { item = TopLeft item = BottomRight } value = TopLeft } - Field margin { type = int value = 2 } - } -} - -Description { - Field child0 { comment = "SoExaminerViewer" } - Field child1 { comment = "SoRenderArea" } -} - -Commands { - source = $(LOCAL)/CombinedOrthoView3D.py -} - -Window { - Vertical { - name = mainFrame - expandX = Yes - expandY = Yes - - FreeFloat { - name = freeFloatFrame - - Vertical { - name = soRenderAreaFrame - expandX = Yes - expandY = Yes - Viewer SoRenderArea.self { - expandX = Yes - expandY = Yes - viewing = Yes - } - } - - Vertical { - expandX = yes - expandY = yes - name = soExaminerViewerFrame - Viewer SoExaminerViewer.self { - expandX = Yes - expandY = Yes - viewing = Yes - } - } - } - - FieldListener { - listenField = position - listenField = margin - command = update - } - } - - EventFilter { - filter = Resize - control = mainFrame - command = mainFrameResizeEventSlot - } -} - +Interface { + Inputs { + Field child0 { internalName = SoExaminerViewer.child } + Field child1 { internalName = SoRenderArea.child } + } + Outputs {} + Parameters { + Field automaticViewAll { internalName = SoExaminerViewer.automaticViewAll } + Field viewAll { internalName = SoExaminerViewer.viewAll } + Field initialCameraOrientation { internalName = SoExaminerViewer.initialCameraOrientation } + Field userCameraOrientation { internalName = SoExaminerViewer.userSettingOrientation } + + Field position { type = enum items { item = TopLeft item = BottomRight } value = TopLeft } + Field margin { type = int value = 2 } + } +} + +Description { + Field child0 { comment = "SoExaminerViewer" } + Field child1 { comment = "SoRenderArea" } +} + +Commands { + source = $(LOCAL)/CombinedOrthoView3D.py +} + +Window { + Vertical { + name = mainFrame + expandX = Yes + expandY = Yes + + FreeFloat { + name = freeFloatFrame + + Vertical { + name = soRenderAreaFrame + expandX = Yes + expandY = Yes + Viewer SoRenderArea.self { + expandX = Yes + expandY = Yes + viewing = Yes + } + } + + Vertical { + expandX = yes + expandY = yes + name = soExaminerViewerFrame + Viewer SoExaminerViewer.self { + expandX = Yes + expandY = Yes + viewing = Yes + } + } + } + + FieldListener { + listenField = position + listenField = margin + command = update + } + } + + EventFilter { + filter = Resize + control = mainFrame + command = mainFrameResizeEventSlot + } +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2010-06-17 07:28:41
|
Revision: 280 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=280&view=rev Author: bartdedobbelaer Date: 2010-06-17 07:28:34 +0000 (Thu, 17 Jun 2010) Log Message: ----------- - Added WEM output generation to the example network - Relaxed requirement for presence of faces, this way point clouds also represent a valid output Modified Paths: -------------- trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp Modified: trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab =================================================================== --- trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab 2010-06-17 06:45:57 UTC (rev 279) +++ trunk/Community/General/Modules/ML/MLMatlabScriptWrapper/networks/MatlabScriptWrapperExample.mlab 2010-06-17 07:28:34 UTC (rev 280) @@ -4,12 +4,302 @@ } module Comment { internal { + frame = "1081 277 96 56" + moduleGroupName = "" + windows { + window _default { + geometry = "912 589 256 208" + sizeHint = "256 208" + wasOpen = no + wasActive = yes + } + } + } + fields { + instanceName = Comment4 + comment = "This example creates a cube in Matlab and outputs it to MeVisLab as a WEM. Press the Update button in the MatlabScriptWrapper and see the result in the SoExaminerViewer." + } + internalFields = "" +} +module SoExaminerViewer { + internal { + frame = "1205 213 152 56" + moduleGroupName = "" + windows { + window _default { + geometry = "26 59 489 362" + sizeHint = "489 362" + wasOpen = no + wasActive = no + } + window _viewer { + geometry = "1175 433 490 468" + sizeHint = "400 400" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SoExaminerViewer2 + renderCaching = AUTO + boundingBoxCaching = AUTO + renderCulling = AUTO + pickCulling = AUTO + border = FALSE + background = "0 0 0" + transparency = DELAYED_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 + inputDevicesList = "" + 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.78539801 + position = "-1.55051124095917 1.04046010971069 1.21177983283997" + orientation = "0.635775923728943 0.228879645466805 -0.737158834934235 4.71452140808105" + nearDistance = 1.370454 + farDistance = 3.0832441 + focalDistance = 2.2259948 + 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 = "1213 285 136 56" + moduleGroupName = "" + windows { + window _default { + geometry = "420 451 347 443" + sizeHint = "347 443" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = SoWEMRenderer1 + 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_LUT_VALUES + drawFaces = TRUE + faceDiffuseColor = "0.760784327983856 0.756862759590149 0.752941191196442" + useFaceAmbientColor = TRUE + faceAmbientColor = "0.803921580314636 0.796078443527222 0.800000011920929" + useFaceSpecularColor = TRUE + faceSpecularColor = "0 0 0" + 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 MatlabScriptWrapper { + internal { + frame = "1153 365 160 56" + moduleGroupName = "" + windows { + window _default { + geometry = "659 306 600 619" + sizeHint = "616 619" + wasOpen = no + wasActive = no + } + } + } + fields { + instanceName = MatlabScriptWrapper4 + matlabScript = "outWEM.nodes = [ + -.5 .5 .5; + .5 .5 .5; + .5 -.5 .5; + -.5 -.5 .5; + -.5 .5 -.5; + .5 .5 -.5; + .5 -.5 -.5; + -.5 -.5 -.5 + ] +outWEM.faces = [ + 1 5 4; + 1 4 0; + 2 6 5; + 2 5 1; + 3 7 6; + 3 6 2; + 4 7 3; + 4 3 0; + 3 2 1; + 3 1 0; + 5 6 7; + 5 7 4 + ]" + useExternalScript = FALSE + matlabScriptPath = "" + inDataName0 = Input0 + inDataName1 = Input1 + inDataName2 = Input2 + outDataName0 = Output0 + outDataName1 = Output1 + outDataName2 = Output2 + inXMarkerName = inXMarker + outXMarkerName = outXMarker + inWEMName = inWEM + outWEMName = outWEM + autoUpdate = FALSE + autoApply = FALSE + status = "Execution successful!" + 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 = string0 + string0 = "" + stringName1 = string1 + string1 = "" + stringName2 = string2 + string2 = "" + stringName3 = string3 + 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 = "<PRE>>> +outWEM = + + nodes: [8x3 double] + +>> +outWEM = + + nodes: [8x3 double] + faces: [12x3 double] + +" + showSessionWindow = TRUE + } +} +module Comment { + internal { frame = "953 589 96 56" moduleGroupName = "" windows { window _default { - geometry = "625 584 256 209" - sizeHint = "256 209" + geometry = "625 584 256 208" + sizeHint = "256 208" wasOpen = no wasActive = no } @@ -46,6 +336,7 @@ useHighlightSelected = FALSE usePolygonOffset = TRUE useShapeHints = TRUE + allowHits = TRUE parameterOverwriteMode = OVERWRITE_MODE_ALL overwriteColorMode = FALSE overwriteFaceParameters = FALSE @@ -56,7 +347,7 @@ drawFaces = TRUE faceDiffuseColor = "1 1 0" useFaceAmbientColor = TRUE - faceAmbientColor = "1 0.3333333432674408 0" + faceAmbientColor = "1 0.333333343267441 0" useFaceSpecularColor = TRUE faceSpecularColor = "0 0 0" drawEdges = FALSE @@ -78,7 +369,7 @@ useEdgeColoringMode = FALSE nodeRenderingMode = WEM_NODE_RENDERING_NORMAL boundingBoxMode = WEM_BOUNDING_BOX_AXIS_ALIGNED - primitiveValueLists = LUT + primitiveValueLists = "" selectedPrimitiveValueList = LUT primitiveValueListValid = TRUE selectedTab = 0 @@ -86,7 +377,7 @@ } module SoExaminerViewer { internal { - frame = "793 445 144 56" + frame = "789 445 152 56" moduleGroupName = "" windows { window _default { @@ -127,6 +418,7 @@ autoUpdateML = FALSE showSnapshotWithShell = FALSE snapCount = 0 + inputDevicesList = "" headlight = TRUE decoration = TRUE popupMenuEnabled = FALSE @@ -146,12 +438,14 @@ cursor = TRUE isCameraStored = TRUE perspective = TRUE - height = 0.7853980064 - position = "48.92348480224609 94.9647216796875 145.5186157226562" - orientation = "0.3436312079429626 -0.2769282162189484 -0.8973450660705566 5.137053489685059" - nearDistance = 96.22691345 - farDistance = 141.0202637 - focalDistance = 118.6015244 + stereoViewing = FALSE + stereoOffset = 3 + height = 0.78539801 + position = "48.9234848022461 94.9647216796875 145.518615722656" + orientation = "0.343631237745285 -0.276928246021271 -0.897345185279846 5.13705348968506" + nearDistance = 96.226913 + farDistance = 141.02026 + focalDistance = 118.60152 forceRedrawOnInteraction = FALSE button1events = TO_VIEWER button2events = TO_VIEWER @@ -183,8 +477,6 @@ } fields { instanceName = WEMIsoSurface - isProcessing = FALSE - elapsedTime = 0.123999998 id = 0 autoApply = TRUE autoUpdate = TRUE @@ -197,7 +489,7 @@ colorMode = "General " drawFaces = TRUE useFaceAmbientColor = TRUE - faceAmbientColor = "1 0 0.4980392156862745" + faceAmbientColor = "1 0 0.498039215686275" useFaceDiffuseColor = TRUE faceDiffuseColor = "1 0 0" useFaceSpecularColor = TRUE @@ -233,7 +525,6 @@ useFaceValueList = FALSE useValenceThreeRemoval = TRUE useZeroLengthEdgeRemoval = TRUE - progress = 1 selectedTab = 2 } } @@ -258,7 +549,7 @@ } module View2D { internal { - frame = "1097 541 80 56" + frame = "1093 541 88 56" moduleGroupName = "" windows { window _default { @@ -286,7 +577,7 @@ cineMode = CINE_Z cineDirection = CINE_PINGPONG cineRepeat = CINE_ONCE - cineSpeed = 0.1000000015 + cineSpeed = 0.1 snapToCenter = FALSE zoomMode = VIEW2D_AUTO_ZOOM unzoomOnImageChange = FALSE @@ -301,26 +592,26 @@ annotationOn = TRUE annotationMode = ANNO_MODE_AUTO annotationSizeMode = ANNO_SHOW_DETAILED - annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + annotationCol = "0.899999976158142 0.899999976158142 0.899999976158142" annotationFontSize = ANNO_SIZE_AUTO annoCoords = Voxel annoCTValue = AsIs borderOn = TRUE - borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + borderColor = "0.899999976158142 0.899999976158142 0.899999976158142" valueHighPrecision = FALSE + maxPrecision = 4 plane = "0 0 1 5.5" } internalFields = "" } module LocalImage { internal { - frame = "1161 685 96 56" + frame = "1157 685 104 56" moduleGroupName = "" } fields { instanceName = LocalImage name = $(DemoDataPath)/Bone.tiff - trueName = "" autoLoad = TRUE status = "File open" } @@ -368,7 +659,7 @@ } module MatlabScriptWrapper { internal { - frame = "1189 533 152 56" + frame = "1185 533 160 56" moduleGroupName = "" windows { window _default { @@ -381,7 +672,7 @@ } fields { instanceName = MatlabScriptWrapper3 - MatlabScript = "% This script illustrates the difference in coordinate + matlabScript = "% This script illustrates the difference in coordinate % systems in MeVisLab and Matlab. MeVisLab uses a % (x,y) system while Matlab uses a (y,x) system. Image % will therefore appear flipped. The Matlab command @@ -407,7 +698,10 @@ outDataName2 = Output2 inXMarkerName = inXMarker outXMarkerName = outXMarker + inWEMName = inWEM + outWEMName = outWEM autoUpdate = FALSE + autoApply = FALSE status = "Execution successful!" scalarName0 = scalar0 scalar0 = 0 @@ -421,11 +715,52 @@ scalar4 = 0 scalarName5 = scalar5 scalar5 = 0 + stringName0 = string0 + string0 = "" + stringName1 = string1 + string1 = "" + stringName2 = string2 + string2 = "" + stringName3 = string3 + 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 } } module StylePalette { internal { - frame = "49 621 96 56" + frame = "45 621 104 56" moduleGroupName = "" } fields { @@ -527,7 +862,7 @@ } module MatlabScriptWrapper { internal { - frame = "813 661 152 56" + frame = "809 661 160 56" moduleGroupName = "" windows { window _default { @@ -540,7 +875,7 @@ } fields { instanceName = MatlabScriptWrapper2 - MatlabScript = "% The script lines below sets the output image to an implicit % function representation of a torus. + matlabScript = "% The script lines below sets the output image to an implicit % function representation of a torus. [x,y,z] = meshgrid(-10:0.25:10,-10:0.25:10,-10:0.25:10); R = 6; Output0 = (R-sqrt(x.^2+y.^2)).^2 + z.^2;" @@ -554,7 +889,10 @@ outDataName2 = Output2 inXMarkerName = inXMarker outXMarkerName = outXMarker + inWEMName = inWEM + outWEMName = outWEM autoUpdate = FALSE + autoApply = FALSE status = "Execution successful!" scalarName0 = scalar0 scalar0 = 0 @@ -568,6 +906,47 @@ scalar4 = 0 scalarName5 = scalar5 scalar5 = 0 + stringName0 = string0 + string0 = "" + stringName1 = string1 + string1 = "" + stringName2 = string2 + string2 = "" + stringName3 = string3 + 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 } } module Comment { @@ -632,7 +1011,7 @@ maxTimePoint = 0 filterMode = FILTER_LINEAR inheritFilterMode = TRUE - alphaFactor = 0.5619999766 + alphaFactor = 0.56199998 baseColor = "1 1 0" useWorldCoords = FALSE applyLut = TRUE @@ -671,7 +1050,7 @@ cineMode = CINE_Z cineDirection = CINE_PINGPONG cineRepeat = CINE_ONCE - cineSpeed = 0.1000000015 + cineSpeed = 0.1 snapToCenter = FALSE zoomMode = VIEW2D_AUTO_ZOOM unzoomOnImageChange = FALSE @@ -686,20 +1065,21 @@ annotationOn = TRUE annotationMode = ANNO_MODE_AUTO annotationSizeMode = ANNO_SHOW_DETAILED - annotationCol = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + annotationCol = "0.899999976158142 0.899999976158142 0.899999976158142" annotationFontSize = ANNO_SIZE_AUTO annoCoords = Voxel annoCTValue = AsIs borderOn = TRUE - borderColor = "0.8999999761581421 0.8999999761581421 0.8999999761581421" + borderColor = "0.899999976158142 0.899999976158142 0.899999976158142" valueHighPrecision = FALSE + maxPrecision = 4 plane = "0 0 1 0.5" } internalFields = "" } module TestPattern { internal { - frame = "441 653 96 56" + frame = "437 653 104 56" moduleGroupName = "" windows { window _default { @@ -722,6 +1102,10 @@ fillValue = 1 autoApply = TRUE pattern = FilledMaxEllipsoid + voxelSize = "1 1 1" + gradient = "0 0 0" + eigenValues = "1 0 -1" + offDiagonalElements = "0 0 0" fillValue2 = 0 pageSizeX = 32 pageSizeY = 32 @@ -733,7 +1117,7 @@ } module MatlabScriptWrapper { internal { - frame = "533 549 152 56" + frame = "529 549 160 56" moduleGroupName = "" windows { window _default { @@ -746,7 +1130,7 @@ } fields { instanceName = MatlabScriptWrapper1 - MatlabScript = "% This script illustrates with a toy example how images can be + matlabScript = "% This script illustrates with a toy example how images can be % imported into Matlab, modified and exported back to MeVisLab. % In this particular example, the input image is divided with a % sinusoidal pattern. @@ -773,7 +1157,10 @@ outDataName2 = Output2 inXMarkerName = inXMarker outXMarkerName = outXMarker + inWEMName = inWEM + outWEMName = outWEM autoUpdate = FALSE + autoApply = FALSE status = "Execution successful!" scalarName0 = scalar0 scalar0 = 0 @@ -787,6 +1174,47 @@ scalar4 = 0 scalarName5 = scalar5 scalar5 = 0 + stringName0 = string0 + string0 = "" + stringName1 = string1 + string1 = "" + stringName2 = string2 + string2 = "" + stringName3 = string3 + 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 } } module Comment { @@ -811,7 +1239,7 @@ } module SoExaminerViewer { internal { - frame = "85 429 136 56" + frame = "81 429 144 56" moduleGroupName = "" windows { window _viewer { @@ -846,6 +1274,7 @@ autoUpdateML = FALSE showSnapshotWithShell = FALSE snapCount = 0 + inputDevicesList = "" headlight = TRUE decoration = TRUE popupMenuEnabled = FALSE @@ -865,12 +1294,14 @@ cursor = TRUE isCameraStored = TRUE perspective = TRUE - height = 0.7853981853 - position = "1.466153740882874 -34.25235366821289 -22.5416316986084" - orientation = "-0.1885406076908112 0.8626965284347534 -0.4692621827125549 3.305067300796509" - nearDistance = 31.73994255 - farDistance = 50.33739471 - focalDistance = 41.04526138 + stereoViewing = FALSE + stereoOffset = 3 + height = 0.78539819 + position = "1.46615374088287 -34.2523536682129 -22.5416316986084" + orientation = "-0.188540622591972 0.862696647644043 -0.469262212514877 3.30506730079651" + nearDistance = 31.739943 + farDistance = 50.337395 + focalDistance = 41.045261 forceRedrawOnInteraction = FALSE button1events = TO_VIEWER button2events = TO_VIEWER @@ -906,8 +1337,8 @@ renderCulling = AUTO pickCulling = AUTO scaleSize = 3 - scaleLength = 0.1000000015 - color = "0.3333333432674408 1 0" + scaleLength = 0.1 + color = "0.333333343267441 1 0" validStylePalette = TRUE enableVector = FALSE drawingOn = TRUE @@ -934,7 +1365,7 @@ listStringEnable = FALSE ownsList = FALSE applySelect = FALSE - id = 0 + id = -1 name = "" newName = "" actionClass = New @@ -945,12 +1376,12 @@ maxSize = 0 useInsertTemplate = FALSE upToDate = TRUE - posXYZ = "10 0 0" + posXYZ = "0 0 0" posC = 0 posT = 0 posU = 0 - vecXYZ = "0 10 0" - type = 1 + vecXYZ = "0 0 0" + type = 0 newPosXYZ = "0 0 0" newPosC = 0 newPosT = 0 @@ -961,7 +1392,7 @@ } module MatlabScriptWrapper { internal { - frame = "145 621 144 56" + frame = "141 621 152 56" moduleGroupName = "" windows { window _default { @@ -974,7 +1405,7 @@ } fields { instanceName = MatlabScriptWrapper - MatlabScript = "% This script illustrates how an XMarkerList is generated + matlabScript = "% This script illustrates how an XMarkerList is generated % in Matlab and exported to MeVisLab. % Generate 30 angles between 0 and 2*pi @@ -996,7 +1427,10 @@ outDataName2 = Output2 inXMarkerName = inXMarker outXMarkerName = OutputXMarkerList + inWEMName = inWEM + outWEMName = outWEM autoUpdate = FALSE + autoApply = FALSE status = "Execution successful!" scalarName0 = scalar0 scalar0 = 0 @@ -1010,9 +1444,52 @@ scalar4 = 0 scalarName5 = scalar5 scalar5 = 0 + stringName0 = string0 + string0 = "" + stringName1 = string1 + string1 = "" + stringName2 = string2 + string2 = "" + stringName3 = string3 + 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 { + SoExaminerViewer2.children = SoWEMRenderer1.self + SoWEMRenderer1.inWEM = MatlabScriptWrapper4.outputWEM TorusRenderer.inWEM = WEMIsoSurface.outWEM SoExaminerViewer1.children = TorusRenderer.self WEMIsoSurface.input0 = MatlabScriptWrapper2.output0 Modified: trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2010-06-17 06:45:57 UTC (rev 279) +++ trunk/Community/General/Sources/ML/MLMatlabScriptWrapper/mlMatlabScriptWrapper.cpp 2010-06-17 07:28:34 UTC (rev 280) @@ -1109,11 +1109,9 @@ executeStr.str(""); // Get data from Matlab array. - if ((m_nodes && !mxIsEmpty(m_nodes) && mxGetClassID(m_nodes) == mxDOUBLE_CLASS) && - (m_faces && !mxIsEmpty(m_faces) && mxGetClassID(m_faces) == mxDOUBLE_CLASS)) + if (m_nodes && !mxIsEmpty(m_nodes) && mxGetClassID(m_nodes) == mxDOUBLE_CLASS) { double *dataNodes = static_cast<double*>(mxGetPr(m_nodes)); - double *dataFaces = static_cast<double*>(mxGetPr(m_faces)); if (dataNodes != NULL) { const size_t node_rows = mxGetM(m_nodes); @@ -1125,22 +1123,27 @@ node->setPosition(dataNodes[i], dataNodes[i + node_rows], dataNodes[i + 2 * node_rows]); } - const size_t face_rows = mxGetM(m_faces); - - for (i = 0; i < face_rows; i ++) { - triangle = triPatch->addTriangle(); - node = triPatch->getNodeAt(dataFaces[i]); triangle->setNode(0,node); node->addFace(triangle); - node = triPatch->getNodeAt(dataFaces[i + face_rows]); triangle->setNode(1,node); node->addFace(triangle); - node = triPatch->getNodeAt(dataFaces[i + 2 * face_rows]); triangle->setNode(2,node); node->addFace(triangle); + if (m_faces && !mxIsEmpty(m_faces) && mxGetClassID(m_faces) == mxDOUBLE_CLASS) + { + double *dataFaces = static_cast<double*>(mxGetPr(m_faces)); + + if (dataFaces != NULL) { + const size_t face_rows = mxGetM(m_faces); + + for (i = 0; i < face_rows; i ++) { + triangle = triPatch->addTriangle(); + node = triPatch->getNodeAt(dataFaces[i]); triangle->setNode(0,node); node->addFace(triangle); + node = triPatch->getNodeAt(dataFaces[i + face_rows]); triangle->setNode(1,node); node->addFace(triangle); + node = triPatch->getNodeAt(dataFaces[i + 2 * face_rows]); triangle->setNode(2,node); node->addFace(triangle); + } + } } triPatch->buildEdgeConnectivity(); triPatch->computeNormals(); _outWEM->addWEMPatch(triPatch); - - } - + } } mxDestroyArray(m_nodes); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |