@@ -220,7 +220,7 @@ VariableHandle ElectrodeCoilSetupAlgorithm::fill_table(FieldHandle, DenseMatrixH
220220}
221221
222222
223- DenseMatrixHandle ElectrodeCoilSetupAlgorithm::make_rotation_matrix (const double angle, const std::vector<double >& normal) const
223+ DenseMatrixHandle ElectrodeCoilSetupAlgorithm::make_rotation_matrix (const std::vector<double >& normal) const
224224{
225225 DenseMatrixHandle result (new DenseMatrix (3 , 3 ));
226226
@@ -387,7 +387,7 @@ FieldHandle ElectrodeCoilSetupAlgorithm::make_tms(FieldHandle scalp, const std::
387387 coil_vector.push_back (coil_ny[i]);
388388 coil_vector.push_back (coil_nz[i]);
389389
390- rotation_matrix1 = make_rotation_matrix (angle, coil_vector);
390+ rotation_matrix1 = make_rotation_matrix (coil_vector);
391391
392392 if (angle != 0 ) // / test it !
393393 {
@@ -609,7 +609,7 @@ boost::tuple<Variable::List, double, double, double> ElectrodeCoilSetupAlgorithm
609609}
610610
611611
612- boost::tuple<DenseMatrixHandle, FieldHandle, FieldHandle, VariableHandle> ElectrodeCoilSetupAlgorithm::make_tdcs_electrodes (FieldHandle scalp_mesh, const std::vector<FieldHandle>& elc_coil_proto, 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
612+ boost::tuple<DenseMatrixHandle, FieldHandle, FieldHandle, VariableHandle> ElectrodeCoilSetupAlgorithm::make_tdcs_electrodes (FieldHandle scalp_mesh, const std::vector<FieldHandle>& elc_coil_proto, 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) const
613613{
614614 int nr_elc_sponge_triangles = 0 , num_valid_electrode_definition = 0 , nr_elc_sponge_triangles_on_scalp = 0 ;
615615 std::vector<double > field_values, field_values_elc_on_scalp;
@@ -688,8 +688,8 @@ boost::tuple<DenseMatrixHandle, FieldHandle, FieldHandle, VariableHandle> Electr
688688 axis.push_back (norm[2 ]);
689689 double angle = elc_angle_rotation[i];
690690 DenseMatrixHandle rotation_matrix, rotation_matrix1, rotation_matrix2;
691- rotation_matrix1 = make_rotation_matrix (angle, axis);
692- if (elc_angle_rotation[i] != 0 )
691+ rotation_matrix1 = make_rotation_matrix (axis);
692+ if (angle != 0 )
693693 {
694694 rotation_matrix2 = make_rotation_matrix_around_axis (angle, axis);
695695 rotation_matrix = boost::make_shared<DenseMatrix>((*rotation_matrix2) * (*rotation_matrix1));
@@ -1696,7 +1696,7 @@ boost::tuple<VariableHandle, DenseMatrixHandle, FieldHandle, FieldHandle, FieldH
16961696
16971697 if (t1 == t2 && t1 == t3 && t1 == t4 && t1 == t5 && t14 > 0 && t1 > 0 )
16981698 {
1699- boost::tie (elc_sponge_locations, electrodes_field, final_electrodes_field, table_output) = make_tdcs_electrodes (scalp, elc_coil_proto, elc_prototyp_map, elc_x, elc_y, elc_z, elc_angle_rotation, elc_thickness, table_output );
1699+ boost::tie (elc_sponge_locations, electrodes_field, final_electrodes_field, table_output) = make_tdcs_electrodes (scalp, elc_coil_proto, elc_prototyp_map, elc_x, elc_y, elc_z, elc_angle_rotation, elc_thickness);
17001700 valid_tdcs = true ;
17011701 }
17021702
0 commit comments