Skip to content

Commit 5a8f30d

Browse files
committed
Matlab field reading works
Forgot to re-enable the plugin
1 parent 41a0901 commit 5a8f30d

File tree

2 files changed

+75
-17
lines changed

2 files changed

+75
-17
lines changed

src/Core/IEPlugin/IEPluginInit.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ void IEPluginManager::Initialize()
5151
static FieldIEPluginLegacyAdapter ModalNrrdToField_plugin("NrrdFile[DataOnElements]","*.nhdr *.nrrd", "", Modal_NrrdToField_reader, 0);
5252
static FieldIEPluginLegacyAdapter IPNodalNrrdToField_plugin("NrrdFile[DataOnNodes,InvertParity]","*.nhdr *.nrrd", "", IPNodal_NrrdToField_reader, 0);
5353
static FieldIEPluginLegacyAdapter IPModalNrrdToField_plugin("NrrdFile[DataOnElements,InvertParity]","*.nhdr *.nrrd", "", IPModal_NrrdToField_reader, 0);
54-
55-
#if 0 // not ready yet
56-
static MatrixIEPluginLegacyAdapter MatlabMatrix_plugin("Matlab Matrix",".mat", "*.mat", MatlabMatrix_reader, MatlabMatrix_writer);
54+
5755
static FieldIEPluginLegacyAdapter MatlabField_plugin("Matlab Field", "*.mat", "*.mat", MatlabField_reader, MatlabField_writer);
58-
#endif
56+
5957
//TODO
58+
//static MatrixIEPluginLegacyAdapter MatlabMatrix_plugin("Matlab Matrix",".mat", "*.mat", MatlabMatrix_reader, MatlabMatrix_writer);
6059
//static NrrdIEPluginLegacyAdapter MatlabNrrd_plugin("Matlab Matrix",".mat", "*.mat",MatlabNrrd_reader,MatlabNrrd_writer);
6160
}

src/ExampleNets/regression/readMatlabField.srn5

Lines changed: 72 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,55 @@
44
<networkFile class_id="0" tracking_level="0" version="2">
55
<networkInfo class_id="1" tracking_level="0" version="0">
66
<modules class_id="2" tracking_level="0" version="0">
7-
<count>4</count>
7+
<count>5</count>
88
<item_version>0</item_version>
99
<item class_id="3" tracking_level="0" version="0">
10-
<first>ReadField:0</first>
10+
<first>CreateStandardColorMap:4</first>
1111
<second class_id="4" tracking_level="0" version="0">
1212
<module class_id="5" tracking_level="0" version="0">
1313
<package_name_>SCIRun</package_name_>
14-
<category_name_>DataIO</category_name_>
15-
<module_name_>ReadField</module_name_>
14+
<category_name_>Visualization</category_name_>
15+
<module_name_>CreateStandardColorMap</module_name_>
1616
</module>
1717
<state class_id="6" tracking_level="0" version="0">
1818
<stateMap class_id="7" tracking_level="0" version="0">
19-
<count>2</count>
19+
<count>1</count>
2020
<item_version>0</item_version>
2121
<item class_id="8" tracking_level="0" version="0">
2222
<first class_id="9" tracking_level="0" version="0">
23-
<name>FileTypeName</name>
23+
<name>ColorMapName</name>
2424
</first>
2525
<second class_id="10" tracking_level="0" version="0">
26-
<name>FileTypeName</name>
26+
<name>ColorMapName</name>
2727
<value class_id="11" tracking_level="0" version="0">
28+
<which>2</which>
29+
<value>Rainbow</value>
30+
</value>
31+
</second>
32+
</item>
33+
</stateMap>
34+
</state>
35+
</second>
36+
</item>
37+
<item>
38+
<first>ReadField:0</first>
39+
<second>
40+
<module>
41+
<package_name_>SCIRun</package_name_>
42+
<category_name_>DataIO</category_name_>
43+
<module_name_>ReadField</module_name_>
44+
</module>
45+
<state>
46+
<stateMap>
47+
<count>2</count>
48+
<item_version>0</item_version>
49+
<item>
50+
<first>
51+
<name>FileTypeName</name>
52+
</first>
53+
<second>
54+
<name>FileTypeName</name>
55+
<value>
2856
<which>2</which>
2957
<value>Matlab Field</value>
3058
</value>
@@ -72,7 +100,7 @@
72100
</module>
73101
<state>
74102
<stateMap>
75-
<count>7</count>
103+
<count>8</count>
76104
<item_version>0</item_version>
77105
<item>
78106
<first>
@@ -98,6 +126,18 @@
98126
</value>
99127
</second>
100128
</item>
129+
<item>
130+
<first>
131+
<name>FaceInvertNormals</name>
132+
</first>
133+
<second>
134+
<name>FaceInvertNormals</name>
135+
<value>
136+
<which>3</which>
137+
<value>1</value>
138+
</value>
139+
</second>
140+
</item>
101141
<item>
102142
<first>
103143
<name>FaceTransparency</name>
@@ -130,7 +170,7 @@
130170
<name>ShowEdges</name>
131171
<value>
132172
<which>3</which>
133-
<value>1</value>
173+
<value>0</value>
134174
</value>
135175
</second>
136176
</item>
@@ -180,11 +220,23 @@
180220
</item>
181221
</modules>
182222
<connections class_id="12" tracking_level="0" version="0">
183-
<count>3</count>
223+
<count>4</count>
184224
<item_version>0</item_version>
185225
<item class_id="13" tracking_level="0" version="0">
186-
<moduleId1_>ReadField:0</moduleId1_>
226+
<moduleId1_>CreateStandardColorMap:4</moduleId1_>
187227
<port1_ class_id="14" tracking_level="0" version="0">
228+
<name>ColorMapObject</name>
229+
<id>0</id>
230+
</port1_>
231+
<moduleId2_>ShowField:2</moduleId2_>
232+
<port2_>
233+
<name>ColorMapObject</name>
234+
<id>0</id>
235+
</port2_>
236+
</item>
237+
<item>
238+
<moduleId1_>ReadField:0</moduleId1_>
239+
<port1_>
188240
<name>Field</name>
189241
<id>0</id>
190242
</port1_>
@@ -221,11 +273,18 @@
221273
</connections>
222274
</networkInfo>
223275
<modulePositions class_id="15" tracking_level="0" version="0">
224-
<count>4</count>
276+
<count>5</count>
225277
<item_version>0</item_version>
226278
<item class_id="16" tracking_level="0" version="0">
227-
<first>ReadField:0</first>
279+
<first>CreateStandardColorMap:4</first>
228280
<second class_id="17" tracking_level="0" version="0">
281+
<first>-1900</first>
282+
<second>-1292</second>
283+
</second>
284+
</item>
285+
<item>
286+
<first>ReadField:0</first>
287+
<second>
229288
<first>-2052</first>
230289
<second>-1368</second>
231290
</second>

0 commit comments

Comments
 (0)