Skip to content

Commit 51b92d8

Browse files
author
allywarner
committed
Merge branch 'SCIInstitute/master'
2 parents 3590eb5 + b6e860c commit 51b92d8

File tree

222 files changed

+42852
-5296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+42852
-5296
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ install:
3535
script:
3636
cd bin
3737
&& cmake -DDOWNLOAD_TOOLKITS:BOOL=OFF -DRUN_BASIC_REGRESSION_TESTS:BOOL=OFF ../src
38-
&& make -j8
38+
&& make -j4
3939
&& make SCIRunTestData_external
4040
# && make test
4141

src/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ SET(APPLICATION_EXTENSION ".srn5" CACHE INTERNAL "Network file extension" FORCE)
144144
SET(APPLICATION_URL "www.scirun.org" CACHE INTERNAL "Project URL" FORCE)
145145
SET(APPLICATION_VENDOR "SCI" CACHE INTERNAL "Vendor information" FORCE)
146146
SET(APPLICATION_CONTACT "[email protected]" CACHE INTERNAL "Contact information" FORCE)
147-
SET(APPLICATION_WINDOWS_ICON "${CMAKE_SOURCE_DIR}/Interface/Application\\\\scirun-icon-large.ico" CACHE INTERNAL "Windows icon" FORCE)
147+
SET(APPLICATION_WINDOWS_ICON "${CMAKE_SOURCE_DIR}/Resources/Icons\\\\scirun5_32.ico" CACHE INTERNAL "Windows icon" FORCE)
148+
SET(APPLICATION_WINDOWS_RC "${CMAKE_SOURCE_DIR}/Resources/Icons\\\\SCIRun.rc" CACHE INTERNAL "Windows icon" FORCE)
148149
SET(APPLICATION_OSX_ICON_FULL_PATH "${CMAKE_SOURCE_DIR}/Resources/Icons/scirun5.icns" CACHE INTERNAL "OSX icon" FORCE)
149150
SET(APPLICATION_OSX_ICON "scirun5.icns" CACHE INTERNAL "OSX icon" FORCE)
150151

@@ -783,6 +784,7 @@ SET_PROPERTY(TARGET Modules_Legacy_Visualization PROPERTY FOLDER "Modules/Visu
783784
SET_PROPERTY(TARGET Modules_Factory PROPERTY FOLDER "Modules")
784785

785786
SET_PROPERTY(TARGET Graphics_Glyphs PROPERTY FOLDER "Graphics")
787+
SET_PROPERTY(TARGET Graphics_Widgets PROPERTY FOLDER "Graphics")
786788

787789
IF(BUILD_TESTING)
788790
SET_PROPERTY(TARGET gmock PROPERTY FOLDER "Testing Support")
@@ -840,6 +842,8 @@ IF(BUILD_TESTING)
840842
SET_PROPERTY(TARGET Modules_Visualization_Tests PROPERTY FOLDER "Modules/Visualization")
841843
SET_PROPERTY(TARGET Modules_Legacy_Matlab_DataIO_Tests PROPERTY FOLDER "Modules/DataIO")
842844
SET_PROPERTY(TARGET Modules_Factory_Tests PROPERTY FOLDER "Modules/Basic")
845+
846+
SET_PROPERTY(TARGET Interface_Modules_Render_Tests PROPERTY FOLDER "Interface/Tests")
843847
ENDIF()
844848

845849
SET_PROPERTY(TARGET Boost_external PROPERTY FOLDER "Externals")
@@ -864,6 +868,7 @@ ENDIF()
864868

865869
IF(DOWNLOAD_TOOLKITS)
866870
SET_PROPERTY(TARGET BrainStimulator_external PROPERTY FOLDER "Externals")
871+
SET_PROPERTY(TARGET FwdInvToolkit_external PROPERTY FOLDER "Externals")
867872
ENDIF()
868873

869874
########################################################################

src/Core/Algorithms/BrainStimulator/ElectrodeCoilSetupAlgorithm.cc

Lines changed: 428 additions & 161 deletions
Large diffs are not rendered by default.

src/Core/Algorithms/BrainStimulator/ElectrodeCoilSetupAlgorithm.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ namespace BrainStimulator {
6262
ALGORITHM_PARAMETER_DECL(NumberOfPrototypes);
6363
ALGORITHM_PARAMETER_DECL(ElectrodethicknessCheckBox);
6464
ALGORITHM_PARAMETER_DECL(ElectrodethicknessSpinBox);
65+
ALGORITHM_PARAMETER_DECL(InvertNormalsCheckBox);
66+
ALGORITHM_PARAMETER_DECL(OrientTMSCoilRadialToScalpCheckBox);
67+
ALGORITHM_PARAMETER_DECL(PutElectrodesOnScalpCheckBox);
68+
ALGORITHM_PARAMETER_DECL(InterpolateElectrodeShapeCheckbox);
6569

6670
class SCISHARE ElectrodeCoilSetupAlgorithm : public AlgorithmBase
6771
{
@@ -90,7 +94,7 @@ namespace BrainStimulator {
9094
Datatypes::DenseMatrixHandle make_rotation_matrix(const double angle, const std::vector<double>& normal) const;
9195
boost::tuple<Datatypes::DenseMatrixHandle, FieldHandle, FieldHandle, VariableHandle> make_tdcs_electrodes(FieldHandle scalp, const std::vector<FieldHandle>& elc_coil_proto,
9296
const std::vector<double>& elc_prototyp_map, const std::vector<double>& elc_x, const std::vector<double>& elc_y, const std::vector<double>& elc_z, const std::vector<double>& elc_angle_rotation, const std::vector<double>& elc_thickness, VariableHandle table) const;
93-
FieldHandle make_tms(FieldHandle scalp, const std::vector<FieldHandle>& elc_coil_proto, const std::vector<double>& coil_prototyp_map, const std::vector<double>& coil_x, const std::vector<double>& coil_y, const std::vector<double>& coil_z, const std::vector<double>& coil_angle_rotation, const std::vector<double>& coil_nx, const std::vector<double>& coil_ny, const std::vector<double>& coil_nz) const;
97+
FieldHandle make_tms(FieldHandle scalp, const std::vector<FieldHandle>& elc_coil_proto, const std::vector<double>& coil_prototyp_map, const std::vector<double>& coil_x, const std::vector<double>& coil_y, const std::vector<double>& coil_z, const std::vector<double>& coil_angle_rotation, std::vector<double>& coil_nx, std::vector<double>& coil_ny, std::vector<double>& coil_nz) const;
9498
VariableHandle fill_table(FieldHandle scalp, Datatypes::DenseMatrixHandle locations, const std::vector<FieldHandle>& input) const;
9599
boost::tuple<Variable::List, double, double, double> make_table_row(int i,double x, double y, double z, double nx, double ny, double nz) const;
96100
};

src/Core/Algorithms/BrainStimulator/SetupRHSforTDCSandTMSAlgorithm.cc

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,14 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
207207
{
208208
THROW_ALGORITHM_PROCESSING_ERROR(" The scalp surface (second module input, field, SCALP_TRI_SURF_MESH) must be a triangle mesh. ");
209209
}
210-
210+
211211
VMesh* mesh_vmesh = mesh->vmesh();
212212
VMesh::size_type mesh_num_nodes = mesh_vmesh->num_nodes();
213213
mesh_vmesh->synchronize(Mesh::NODE_LOCATE_E);
214214
DenseMatrixHandle lhs_knows, elc_elem, elc_elem_typ, elc_elem_def, elc_con_imp;
215215
std::vector<double> electrode_sponge_areas;
216216
index_type refnode_number = get(Parameters::refnode).toInt();
217217
bool getsurf = get(Parameters::GetContactSurface).toBool();
218-
219218
double normal_dot_product_bound_ = get(Parameters::normal_dot_product_bound).toDouble();
220219
double identical_node_location_differce = get(Parameters::pointdistancebound).toDouble();
221220

@@ -280,7 +279,7 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
280279
algo.set(SplitFieldByConnectedRegionAlgo::SortDomainBySize(), false);
281280
algo.set(SplitFieldByConnectedRegionAlgo::SortAscending(), false);
282281
std::vector<FieldHandle> result = algo.run(elc_tri_surf);
283-
282+
284283
if (result.size()<=0)
285284
{
286285
THROW_ALGORITHM_PROCESSING_ERROR(" Splitting input mesh into connected regions failed. ");
@@ -311,14 +310,15 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
311310
VMesh* elc_sponge_surf_vmesh = elc_sponge_surf->vmesh();
312311
VField* elc_sponge_surf_vfld = elc_sponge_surf->vfield();
313312
std::vector<double> field_values, impedances;
314-
313+
315314
/// map the electrode sponge center (CreateElectrodeCoil) to generated tDCS electrode geometry (Cleaver),
316315
/// this mapping is meant to map the GUI inputs to actual electrode geometry by having a lookup table
317316
int electrode_sponges=elc_sponge_location->nrows();
318317
DenseMatrixHandle lookup(new DenseMatrix(electrode_sponges, 1));
319318
DenseMatrixHandle distances(new DenseMatrix(electrode_sponges, 1));
320319
VMesh::Node::index_type didx;
321320
double distance=0;
321+
322322
for (long i=0;i<electrode_sponges;i++)
323323
{
324324
Point elc((*elc_sponge_location)(i,0),(*elc_sponge_location)(i,1),(*elc_sponge_location)(i,2)),r;
@@ -330,6 +330,7 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
330330
tmp_mesh->synchronize(Mesh::NODE_LOCATE_E);
331331

332332
tmp_mesh->find_closest_node(distance,r,didx,elc);
333+
333334
if (distance<min_dis)
334335
{
335336
min_dis=distance;
@@ -339,7 +340,7 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
339340
(*lookup)(i,0)=found_index;
340341
(*distances)(i,0)=min_dis;
341342
}
342-
343+
343344
/// throw error if the geometry is too far away from predicted location - further away than sponge thickness
344345
for (long i=0;i<elc_sponge_location->nrows();i++)
345346
{
@@ -365,7 +366,6 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
365366
DenseMatrixHandle sponge_center_pojected_onto_scalp(new DenseMatrix(result.size(), 3));
366367

367368
mesh_scalp_tri_surf->synchronize(Mesh::NODE_LOCATE_E);
368-
369369
for(long i=0;i<result.size();i++)
370370
{
371371
VMesh* tmp_mesh = result[i]->vmesh();
@@ -408,7 +408,6 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
408408
mesh_scalp_tri_surf->find_closest_node(distance,p,node_ind,q);
409409
(*sponge_center_pojected_onto_scalp_index)(i,0)=node_ind;
410410
}
411-
412411
/// determine normal of scalp/electrode sponge inferface center
413412
mesh_scalp_tri_surf->synchronize(Mesh::NORMALS_E);
414413
VMesh::Elem::array_type ca;
@@ -432,11 +431,9 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
432431
mesh_elc_tri_surf->synchronize(Mesh::NODE_LOCATE_E);
433432

434433
int nr_elc_sponge_triangles=0;
435-
436434
FieldInformation fi3("PointCloudMesh",0,"double");
437435
FieldHandle estimated_sponge_top_center_points=CreateField(fi3);
438436
VMesh* estimated_sponge_top_center_points_vmesh = estimated_sponge_top_center_points->vmesh();
439-
440437
/// retrieve electrode thickness from last input by using the lookup table
441438
for(int k=0;k<sponge_center_pojected_onto_scalp_normal->nrows();k++)
442439
{
@@ -545,7 +542,6 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
545542

546543
double dot_sp_o1 = Dot(sp_o1, current_scalp_normal_at_elec);
547544
double dot_sp_o2 = Dot(sp_o2, current_scalp_normal_at_elec);
548-
549545
double x=0,y=0,z=0;
550546
if( (dot_sp_o1<0 && dot_sp_o2<0) || (dot_sp_o1>0 && dot_sp_o2>0) )
551547
{
@@ -716,7 +712,7 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
716712
THROW_ALGORITHM_PROCESSING_ERROR("Internal error: internal field definition is ");
717713
}
718714

719-
double area=0.0; double prev_elc=0;
715+
double area=0.0,prev_elc=0,tmp_fld_val=0;
720716
for(VMesh::Elem::index_type l=0; l<elc_sponge_surf_vmesh->num_elems(); l++)
721717
{
722718
(*elc_elem_typ)(l,0)=2; //define triangles to incject currents in TDCS simulations
@@ -753,15 +749,14 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
753749
double x3=pos.x(), y3=pos.y(), z3=pos.z();
754750

755751
(*elc_elem_def)(l,3)=0;
756-
(*elc_elem)(l,0)=field_values[l];
757-
(*elc_con_imp)(l,0)=impedances[l];
752+
(*elc_elem)(l,0)=field_values[l];
758753

759754
///compute surface area of electrode/scalp interface
760755
double area_tmp =y1*z2+z1*y3+y2*z3-z2*y3-z1*y2-y1*z3;
761756
double area_tmp1=z1*x2+x1*z3+z2*x3-x2*z3-x1*z2-z1*x3;
762757
double area_tmp2=x1*y2+y1*x3+x2*y3-y2*x3-y1*x2-x1*y3;
763758
double triangle_area=0.5 * sqrt(area_tmp*area_tmp+area_tmp1*area_tmp1+area_tmp2*area_tmp2);
764-
double tmp_fld_val=0;
759+
tmp_fld_val=0;
765760
elc_sponge_surf_vfld->get_value(tmp_fld_val,l);
766761

767762
if(prev_elc!=tmp_fld_val)
@@ -775,8 +770,21 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
775770
area+=triangle_area;
776771
}
777772
}
773+
778774
area*=1e-6;
775+
779776
electrode_sponge_areas.push_back(area);
777+
778+
for(VMesh::Elem::index_type l=0; l<elc_sponge_surf_vmesh->num_elems(); l++) /// the impedance (Ohm * m^2) that was provided by the user needs to be defined related to the electrode area. For convenience we do that for the user here.
779+
{
780+
elc_sponge_surf_vfld->get_value(tmp_fld_val,l);
781+
if(tmp_fld_val>=electrode_sponge_areas.size())
782+
{
783+
THROW_ALGORITHM_PROCESSING_ERROR("Internal ERROR (should not happen): could not scale contact impedance by electrode surface area (index out of bound). ");
784+
}
785+
(*elc_con_imp)(l,0)=impedances[tmp_fld_val]*electrode_sponge_areas[tmp_fld_val];
786+
}
787+
780788
DenseMatrixHandle selectmatrixind(new DenseMatrix(mesh_vmesh->num_nodes(), 1)); ///create indeces for SelectSubMatrix
781789
for(long i=0;i<mesh_vmesh->num_nodes();i++)
782790
{
@@ -802,7 +810,7 @@ DenseMatrixHandle SetupTDCSAlgorithm::create_rhs(FieldHandle mesh, FieldHandle e
802810
double temp = elcs_wanted[i].toDouble();
803811
min_current += temp;
804812
}
805-
813+
806814
if (std::fabs(min_current) > electode_current_summation_bound)
807815
THROW_ALGORITHM_INPUT_ERROR("Summed electrode current intensities are greater than 1e-6 mA. The sum should be close to 0 mA !!! ");
808816

@@ -815,7 +823,11 @@ DenseMatrixHandle SetupTDCSAlgorithm::create_rhs(FieldHandle mesh, FieldHandle e
815823
VMesh* mesh_elc_tri_surf = elc_tri_surf->vmesh();
816824
mesh_elc_tri_surf->synchronize(Mesh::NODE_LOCATE_E);
817825
vmesh->synchronize(Mesh::NODE_LOCATE_E);
818-
826+
for(VMesh::Node::index_type l=0; l<vmesh->num_nodes(); l++)
827+
{
828+
(*output)(l,0)=0;
829+
}
830+
double min_dis = get(Parameters::pointdistancebound).toDouble();
819831
for(VMesh::Node::index_type l=0; l<mesh_elc_tri_surf->num_nodes(); l++)
820832
{
821833
Point p,q;
@@ -824,8 +836,14 @@ DenseMatrixHandle SetupTDCSAlgorithm::create_rhs(FieldHandle mesh, FieldHandle e
824836
VMesh::Node::index_type ind;
825837
vmesh->find_closest_node(distance,q,ind,p);
826838
(*output)(ind,0)=elcs_wanted[l].toDouble()/1000.0;
839+
if(min_dis<distance)
840+
{
841+
std::ostringstream ostr4;
842+
ostr4 << " The electrode locations (4th module input) are further away from them mesh as provided by the GUI (min. distance bound). " << std::endl;
843+
remark(ostr4.str());
844+
}
827845
}
828-
846+
829847
return output;
830848
} else
831849
{
@@ -859,14 +877,12 @@ boost::tuple<DenseMatrixHandle, DenseMatrixHandle, DenseMatrixHandle, DenseMatri
859877
{
860878
if (num_of_elc > max_number_of_electrodes) { THROW_ALGORITHM_INPUT_ERROR("Number of electrodes (>512) given exceeds what is possible ");} /// number of possible electrodes is currently bound to 512 electrodes in default setting
861879
if (num_of_elc < 0) { THROW_ALGORITHM_INPUT_ERROR("Negative number of electrodes given ");}
862-
863880
if (!mesh) THROW_ALGORITHM_INPUT_ERROR("Input field (mesh) was not allocated ");
864881
if (!scalp_tri_surf) THROW_ALGORITHM_INPUT_ERROR("Input field (scalp triangle surface) was not allocated ");
865882
if (!elc_tri_surf) THROW_ALGORITHM_INPUT_ERROR("Input field (electrode triangle surface) was not allocated ");
866883
if (!elc_sponge_location) THROW_ALGORITHM_INPUT_ERROR("Input field (electrode triangle surface) was not allocated ");
867-
868884
DenseMatrixHandle rhs=create_rhs(mesh, elc_tri_surf, elcs, num_of_elc); /// get the right-hand-side
869-
885+
870886
DenseMatrixHandle lhs_knowns, elc_element, elc_element_typ, elc_element_def, elc_contact_imp, selectmatrixind;
871887
FieldHandle elec_sponge_surf;
872888
std::vector<double> electrode_sponge_areas;

src/Core/Algorithms/BrainStimulator/SetupRHSforTDCSandTMSAlgorithm.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ namespace BrainStimulator {
8282

8383
static Core::Algorithms::AlgorithmParameterName ElectrodeParameterName(int i);
8484
static Core::Algorithms::AlgorithmParameterName ElectrodeImpedanceParameterName(int i);
85-
85+
static const int max_number_of_electrodes;
8686
private:
8787
static const int special_label;
88-
static const int max_number_of_electrodes;
8988
static const double electode_current_summation_bound;
9089
SCIRun::Core::Datatypes::DenseMatrixHandle create_rhs(FieldHandle mesh, FieldHandle elc_tri_surf, const std::vector<Variable>& elcs, int num_of_elc) const;
9190
boost::tuple<Datatypes::DenseMatrixHandle, Datatypes::DenseMatrixHandle, Datatypes::DenseMatrixHandle, Datatypes::DenseMatrixHandle, Datatypes::DenseMatrixHandle, Datatypes::DenseMatrixHandle, FieldHandle, std::vector<double>> create_lhs(FieldHandle mesh, const std::vector<Variable>& impelc, FieldHandle scalp_tri_surf, FieldHandle elc_tri_surf, SCIRun::Core::Datatypes::DenseMatrixHandle elc_sponge_location) const;

src/Core/Algorithms/BrainStimulator/Tests/ElectrodeCoilSetupAlgorithmTests.cc

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,82 @@
3333
#include <Core/Algorithms/Base/AlgorithmPreconditions.h>
3434
#include <Core/Algorithms/BrainStimulator/ElectrodeCoilSetupAlgorithm.h>
3535
#include <Testing/Utils/SCIRunUnitTests.h>
36-
//////////////////////////////////////////////////////////////////////////
37-
/// @todo MORITZ
38-
//////////////////////////////////////////////////////////////////////////
36+
#include <Testing/Utils/MatrixTestUtilities.h>
37+
#include <boost/lexical_cast.hpp>
38+
#include <boost/range/algorithm/count.hpp>
39+
#include <boost/algorithm/string/trim.hpp>
40+
#include <boost/algorithm/string/split.hpp>
41+
#include <boost/algorithm/string/classification.hpp>
42+
#include <boost/format.hpp>
43+
#include <boost/assign.hpp>
44+
#include <vector>
45+
#include <iostream>
46+
#include <Core/Math/MiscMath.h>
47+
3948
using namespace SCIRun;
4049
using namespace SCIRun::Core::Geometry;
50+
using namespace SCIRun::Core::Datatypes;
4151
using namespace SCIRun::Core::Algorithms::BrainStimulator;
52+
using namespace SCIRun::Core::Algorithms;
4253
using namespace SCIRun::TestUtils;
54+
using namespace boost;
55+
using namespace boost::assign;
4356

44-
TEST(ElectrodeCoilSetupAlgorithm, DISABLED_Foo)
57+
namespace
58+
{
59+
FieldHandle LoadMickeyScalpSurfMeshForAlgo()
60+
{
61+
return loadFieldFromFile(TestResources::rootDir() / "Fields/BrainStim/micky_scalp.fld");
62+
}
63+
FieldHandle LoadMickeyTMSCoilForAlgo()
64+
{
65+
return loadFieldFromFile(TestResources::rootDir() / "Fields/BrainStim/mickey_tms_coil.fld");
66+
}
67+
68+
DenseMatrixHandle TMSCoilLocationForAlgo()
69+
{
70+
DenseMatrixHandle m(boost::make_shared<DenseMatrix>(1,3));
71+
(*m)(0,0) = 33.6654;
72+
(*m)(0,1) = 34.625;
73+
(*m)(0,2) = 10.6;
74+
75+
return m;
76+
}
77+
}
78+
79+
80+
TEST(ElectrodeCoilSetupAlgorithmTests, AlgoCorrect)
4581
{
4682
ElectrodeCoilSetupAlgorithm algo;
47-
FAIL() << "Insert code here for the most basic test cases !";
83+
FieldHandle coils_field,electrodes_field, final_electrode_field;
84+
FieldHandle scalp=LoadMickeyScalpSurfMeshForAlgo();
85+
Variable::List table;
86+
DenseMatrixHandle elc_sponge_loc_avr, locations=TMSCoilLocationForAlgo();
87+
std::vector<FieldHandle> elc_coil_proto;
88+
elc_coil_proto.push_back(LoadMickeyTMSCoilForAlgo());
89+
Variable var1,var2,var3,var4,var5,var6,var7,var8,var9,var10;
90+
var1=makeVariable("Input #", boost::str(boost::format("%s") % "USE_MODULE_INPUT_3"));
91+
var2=makeVariable("Type", boost::str(boost::format("%s") % "TMS"));
92+
var3=makeVariable("X", boost::str(boost::format("%.3f") % "33.6654"));
93+
var4=makeVariable("Y", boost::str(boost::format("%.3f") % "34.625"));
94+
var5=makeVariable("Y", boost::str(boost::format("%.3f") % "7.6"));
95+
var6=makeVariable("Angle", boost::str(boost::format("%s") % "1"));
96+
var7=makeVariable("NX", boost::str(boost::format("%s") % "???"));
97+
var8=makeVariable("NY", boost::str(boost::format("%s") % "???"));
98+
var9=makeVariable("NZ", boost::str(boost::format("%s") % "???"));
99+
var10=makeVariable("thickness",boost::str(boost::format("%s") % "2"));
100+
Variable::List tmp;
101+
tmp += var1,var2,var3,var4,var5,var6,var7,var8,var9,var10;
102+
table.push_back(makeVariable("row" + boost::lexical_cast<std::string>(0), tmp));
103+
VariableHandle output(new Variable(Name("Table"), table));
104+
///@Dan: I dont know how to set the table to the GUI so that the module can executed properly.
105+
106+
// boost::tie(table, elc_sponge_loc_avr, electrodes_field, final_electrode_field, coils_field) = algo.run(scalp, locations, elc_coil_proto);
107+
/*
108+
EXPECT_EQ(coils_field->vmesh()->num_nodes(),18);
109+
EXPECT_EQ(coils_field->vmesh()->num_elems(),18);
110+
EXPECT_EQ(coils_field->vfield()->num_values(),18);
111+
//need more check routines here !!!
112+
*/
48113
}
114+

0 commit comments

Comments
 (0)