Skip to content

Commit e8d3604

Browse files
committed
ReadAllFields works again!
1 parent 23a3a9c commit e8d3604

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/ExampleNets/pythonScripts/readAllFields.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,18 @@ def printList(list, name):
2727
# these meshes had some issues that crashed scirun, fixed in 5 now:
2828
#r"time-dependent\25feb97_sock_closed" not in file and
2929
#if (r"UCSD\heart-canine" not in file):
30-
30+
read = addModule("ReadField")
31+
show = addModule("ReportFieldInfo")
32+
prnt = addModule("PrintDatatype")
33+
read.output[0] >> show.input.InputField
34+
show.output[0] >> prnt.input[0]
35+
3136
for file in allFields(dir):
3237
count += 1
33-
read = addModule("ReadField")
3438
read.Filename = file
3539
files.append(file)
36-
show = addModule("ReportFieldInfo")
37-
prnt = addModule("PrintDatatype")
38-
read.output[0] >> show.input.InputField
39-
show.output[0] >> prnt.input[0]
4040
executeAll()
41-
time.sleep(1)
4241
v = prnt.ReceivedValue
4342
values.append(v)
44-
[removeModule(m.id) for m in modules()]
45-
4643

4744
printList(zip(files, values), r'E:\fieldTypesAll2.txt')

src/Modules/Basic/PrintDatatype.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ PrintDatatypeModule::PrintDatatypeModule()
4646
INITIALIZE_PORT(Input);
4747
}
4848

49+
void PrintDatatypeModule::setStateDefaults()
50+
{
51+
get_state()->setValue(ReceivedValue, std::string());
52+
}
53+
4954
void PrintDatatypeModule::execute()
5055
{
5156
auto data = getRequiredInput(Input);

src/Modules/Basic/PrintDatatype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace SCIRun {
4444
public:
4545
PrintDatatypeModule();
4646
virtual void execute();
47-
virtual void setStateDefaults() {}
47+
virtual void setStateDefaults();
4848

4949
INPUT_PORT(0, Input, Datatype);
5050

0 commit comments

Comments
 (0)