Skip to content

Commit e612005

Browse files
committed
Module compiles, but no algo call yet
1 parent 6ff57e1 commit e612005

File tree

1 file changed

+37
-30
lines changed

1 file changed

+37
-30
lines changed

src/Modules/Legacy/Forward/CalcTMP.cc

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,19 @@
2626
DEALINGS IN THE SOFTWARE.
2727
*/
2828

29+
#include <Modules/Legacy/Forward/CalcTMP.h>
2930
#include <Core/Datatypes/DenseMatrix.h>
30-
#include <Core/Datatypes/Matrix.h>
31-
#include <Core/Datatypes/Field.h>
32-
33-
#include <Dataflow/Network/Ports/MatrixPort.h>
34-
#include <Dataflow/Network/Ports/FieldPort.h>
35-
#include <Dataflow/GuiInterface/GuiVar.h>
36-
#include <Dataflow/Network/Module.h>
37-
38-
#include <Packages/BioPSE/Core/Algorithms/NumApproximation/CalcTMP.h>
39-
40-
namespace BioPSE {
31+
//#include <Packages/BioPSE/Core/Algorithms/NumApproximation/CalcTMP.h>
4132

4233
using namespace SCIRun;
34+
using namespace SCIRun::Core::Datatypes;
35+
using namespace SCIRun::Modules::Forward;
36+
using namespace SCIRun::Dataflow::Networks;
37+
//using namespace SCIRun::Core::Algorithms::Forward;
38+
39+
const ModuleLookupInfo CalcTMP::staticInfo_("CalcTMP", "Forward", "SCIRun");
4340

41+
/*
4442
class CalcTMP : public Module, public CalcTMPAlgo {
4543
public:
4644
CalcTMP(GuiContext*);
@@ -52,38 +50,48 @@ class CalcTMP : public Module, public CalcTMPAlgo {
5250
//SCIRunAlgo::CalcTMPAlgo algo_;
5351
CalcTMPAlgo algo_;
5452
};
53+
*/
5554

56-
57-
DECLARE_MAKER(CalcTMP)
58-
59-
CalcTMP::CalcTMP(GuiContext* ctx)
60-
: Module("CalcTMP", ctx, Source, "Forward", "BioPSE")
55+
CalcTMP::CalcTMP()
56+
: Module(staticInfo_)
6157
{
58+
INITIALIZE_PORT(Amplitude);
59+
INITIALIZE_PORT(i1);
60+
INITIALIZE_PORT(i2);
61+
INITIALIZE_PORT(i3);
62+
INITIALIZE_PORT(i4);
63+
INITIALIZE_PORT(i5);
64+
INITIALIZE_PORT(i6);
65+
INITIALIZE_PORT(TMPs);
6266
//algo_.set_progress_reporter(this);
6367
}
6468

6569

6670
void CalcTMP::execute()
6771
{
68-
MatrixHandle amplitudes;
69-
MatrixHandle deps;
72+
MatrixHandle amplitudes = getRequiredInput(Amplitude);
73+
auto deps = getOptionalInput(i1);
74+
75+
76+
77+
7078
MatrixHandle depslopes;
7179
MatrixHandle platslopes;
7280
MatrixHandle reps;
7381
MatrixHandle repslopes;
7482
MatrixHandle rests;
75-
MatrixHandle TMPs;
83+
MatrixHandle tmps;
7684

77-
get_input_handle("Amplitude", amplitudes, false);
78-
get_input_handle("Depolarization Time", deps, false);
79-
get_input_handle("Depolarization Slope", depslopes, false);
80-
get_input_handle("Plateau Slope", platslopes, false);
81-
get_input_handle("Repolarization Time", reps, false);
82-
get_input_handle("Repolarization Slope", repslopes, false);
83-
get_input_handle("Rest Potential", rests, false);
85+
// get_input_handle("Depolarization Time", deps, false);
86+
// get_input_handle("Depolarization Slope", depslopes, false);
87+
// get_input_handle("Plateau Slope", platslopes, false);
88+
// get_input_handle("Repolarization Time", reps, false);
89+
// get_input_handle("Repolarization Slope", repslopes, false);
90+
// get_input_handle("Rest Potential", rests, false);
8491

85-
if (inputs_changed_ || !oport_cached("TMPs") )
92+
if (needToExecute())
8693
{
94+
/* TODO LATER
8795
algo_.calc_TMPs(amplitudes,
8896
deps,
8997
depslopes,
@@ -93,9 +101,8 @@ void CalcTMP::execute()
93101
rests,
94102
500,
95103
TMPs);
104+
*/
96105

97-
send_output_handle("TMPs", TMPs);
106+
sendOutput(TMPs, tmps);
98107
}
99108
}
100-
101-
} // End namespace BioPSE

0 commit comments

Comments
 (0)