Skip to content

Commit 653ab3e

Browse files
committed
Made UI and base files
1 parent 5d0402c commit 653ab3e

File tree

6 files changed

+323
-2
lines changed

6 files changed

+323
-2
lines changed

src/Interface/Modules/Fields/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ SET(Interface_Modules_Fields_FORMS
6666
ClipVolumeByIsovalue.ui
6767
ChooseInput.ui
6868
convertfielddatatype.ui
69-
scalefieldmeshanddata.ui
69+
scalefieldmeshanddata.ui #TODO: fix case
70+
ConvertMatricesToMesh.ui
7071
)
7172

7273
SET(Interface_Modules_Fields_HEADERS
@@ -109,6 +110,7 @@ SET(Interface_Modules_Fields_HEADERS
109110
ChooseInputDialog.h
110111
ScaleFieldMeshAndDataDialog.h
111112
ConvertFieldDataTypeDialog.h
113+
ConvertMatricesToMeshDialog.h
112114
)
113115

114116
SET(Interface_Modules_Fields_SOURCES
@@ -150,6 +152,7 @@ SET(Interface_Modules_Fields_SOURCES
150152
ChooseInputDialog.cc
151153
ScaleFieldMeshAndDataDialog.cc
152154
ConvertFieldDataTypeDialog.cc
155+
ConvertMatricesToMeshDialog.cc
153156
)
154157

155158
IF(WITH_TETGEN)
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>ConvertMatricesToMesh</class>
4+
<widget class="QDialog" name="ConvertMatricesToMesh">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>500</width>
10+
<height>201</height>
11+
</rect>
12+
</property>
13+
<property name="minimumSize">
14+
<size>
15+
<width>250</width>
16+
<height>200</height>
17+
</size>
18+
</property>
19+
<property name="windowTitle">
20+
<string>ConvertMatricesToMesh</string>
21+
</property>
22+
<layout class="QVBoxLayout" name="verticalLayout">
23+
<item>
24+
<widget class="QGroupBox" name="inputFieldTypeGroupBox_">
25+
<property name="title">
26+
<string>Input Field Type</string>
27+
</property>
28+
<layout class="QFormLayout" name="formLayout">
29+
<item row="0" column="0">
30+
<widget class="QLabel" name="label">
31+
<property name="text">
32+
<string>Name :</string>
33+
</property>
34+
</widget>
35+
</item>
36+
<item row="0" column="1">
37+
<widget class="QLabel" name="nameTextLabel_">
38+
<property name="text">
39+
<string/>
40+
</property>
41+
</widget>
42+
</item>
43+
<item row="1" column="0">
44+
<widget class="QLabel" name="label_2">
45+
<property name="text">
46+
<string>Type Name :</string>
47+
</property>
48+
</widget>
49+
</item>
50+
<item row="1" column="1">
51+
<widget class="QLabel" name="typeNameTextLabel_">
52+
<property name="text">
53+
<string/>
54+
</property>
55+
</widget>
56+
</item>
57+
</layout>
58+
</widget>
59+
</item>
60+
<item>
61+
<widget class="QGroupBox" name="outputMeshTypeGroupBox_">
62+
<property name="title">
63+
<string>Output Mesh Type</string>
64+
</property>
65+
<layout class="QFormLayout" name="formLayout_3">
66+
<item row="0" column="0">
67+
<widget class="QLabel" name="label_5">
68+
<property name="text">
69+
<string>Mesh Type :</string>
70+
</property>
71+
</widget>
72+
</item>
73+
<item row="0" column="1">
74+
<widget class="QComboBox" name="meshTypeComboBox_">
75+
<property name="currentIndex">
76+
<number>5</number>
77+
</property>
78+
<item>
79+
<property name="text">
80+
<string>Curve</string>
81+
</property>
82+
</item>
83+
<item>
84+
<property name="text">
85+
<string>HexVol</string>
86+
</property>
87+
</item>
88+
<item>
89+
<property name="text">
90+
<string>PointCloud</string>
91+
</property>
92+
</item>
93+
<item>
94+
<property name="text">
95+
<string>PrismVol</string>
96+
</property>
97+
</item>
98+
<item>
99+
<property name="text">
100+
<string>QuadSurf</string>
101+
</property>
102+
</item>
103+
<item>
104+
<property name="text">
105+
<string>TetVol</string>
106+
</property>
107+
</item>
108+
<item>
109+
<property name="text">
110+
<string>TriSurf</string>
111+
</property>
112+
</item>
113+
</widget>
114+
</item>
115+
</layout>
116+
<zorder>inputFieldTypeGroupBox_</zorder>
117+
<zorder>label_5</zorder>
118+
<zorder>meshTypeComboBox_</zorder>
119+
</widget>
120+
</item>
121+
<item>
122+
<widget class="QGroupBox" name="outputFieldTypeGroupBox_">
123+
<property name="title">
124+
<string>Output Field Type</string>
125+
</property>
126+
<layout class="QFormLayout" name="formLayout_4">
127+
<item row="0" column="0">
128+
<widget class="QLabel" name="label_6">
129+
<property name="text">
130+
<string>Field Type :</string>
131+
</property>
132+
</widget>
133+
</item>
134+
<item row="0" column="1">
135+
<widget class="QComboBox" name="fieldTypeComboBox_">
136+
<property name="currentIndex">
137+
<number>7</number>
138+
</property>
139+
<item>
140+
<property name="text">
141+
<string>unsigned char</string>
142+
</property>
143+
</item>
144+
<item>
145+
<property name="text">
146+
<string>unsigned short</string>
147+
</property>
148+
</item>
149+
<item>
150+
<property name="text">
151+
<string>unsigned int</string>
152+
</property>
153+
</item>
154+
<item>
155+
<property name="text">
156+
<string>char</string>
157+
</property>
158+
</item>
159+
<item>
160+
<property name="text">
161+
<string>short</string>
162+
</property>
163+
</item>
164+
<item>
165+
<property name="text">
166+
<string>int</string>
167+
</property>
168+
</item>
169+
<item>
170+
<property name="text">
171+
<string>float</string>
172+
</property>
173+
</item>
174+
<item>
175+
<property name="text">
176+
<string>double</string>
177+
</property>
178+
</item>
179+
<item>
180+
<property name="text">
181+
<string>Vector</string>
182+
</property>
183+
</item>
184+
<item>
185+
<property name="text">
186+
<string>Tensor</string>
187+
</property>
188+
</item>
189+
</widget>
190+
</item>
191+
</layout>
192+
</widget>
193+
</item>
194+
</layout>
195+
</widget>
196+
<layoutdefault spacing="6" margin="11"/>
197+
<resources/>
198+
<connections/>
199+
</ui>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2015 Scientific Computing and Imaging Institute,
7+
University of Utah.
8+
9+
License for the specific language governing rights and limitations under
10+
Permission is hereby granted, free of charge, to any person obtaining a
11+
copy of this software and associated documentation files (the "Software"),
12+
to deal in the Software without restriction, including without limitation
13+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
14+
and/or sell copies of the Software, and to permit persons to whom the
15+
Software is furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included
18+
in all copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26+
DEALINGS IN THE SOFTWARE.
27+
*/
28+
29+
#include <Interface/Modules/Fields/ConvertMatricesToMeshDialog.h>
30+
#include <Core/Algorithms/Legacy/Fields/FieldData/ConvertMatricesToMesh.h>
31+
#include <Core/Algorithms/Legacy/Fields/FieldData/ConvertFieldBasisType.h>
32+
33+
using namespace SCIRun::Gui;
34+
using namespace SCIRun::Dataflow::Networks;
35+
using namespace SCIRun::Core::Algorithms::Fields;
36+
37+
ConvertMatricesToMeshDialog::ConvertMatricesToMeshDialog(const std::string& name, ModuleStateHandle state,
38+
QWidget* parent /* = 0 */)
39+
: ModuleDialogGeneric(state, parent)
40+
{
41+
setupUi(this);
42+
setWindowTitle(QString::fromStdString(name));
43+
fixSize();
44+
45+
addDynamicLabelManager(inputNameLabel_, Parameters::InputFieldName);
46+
addDynamicLabelManager(typeNameLabel_, Parameters::InputType);
47+
addComboBoxManager(outputFieldTypeComboBox_, Parameters::FieldDatatype);
48+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2015 Scientific Computing and Imaging Institute,
7+
University of Utah.
8+
9+
License for the specific language governing rights and limitations under
10+
Permission is hereby granted, free of charge, to any person obtaining a
11+
copy of this software and associated documentation files (the "Software"),
12+
to deal in the Software without restriction, including without limitation
13+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
14+
and/or sell copies of the Software, and to permit persons to whom the
15+
Software is furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included
18+
in all copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26+
DEALINGS IN THE SOFTWARE.
27+
*/
28+
29+
#ifndef INTERFACE_MODULES_CONVERT_MATRICES_TO_MESH_DIALOG_H
30+
#define INTERFACE_MODULES_CONVERT_MATRICES_TO_MESH_DIALOG_H
31+
32+
#include "Interface/Modules/Fields/ui_ConvertMatricesToMesh.h"
33+
#include <Interface/Modules/Base/ModuleDialogGeneric.h>
34+
#include <Interface/Modules/Fields/share.h>
35+
36+
namespace SCIRun {
37+
namespace Gui {
38+
39+
class SCISHARE ConvertMatricesToMeshDialog : public ModuleDialogGeneric,
40+
public Ui::ConvertMatricesToMesh
41+
{
42+
Q_OBJECT
43+
44+
public:
45+
ConvertMatricesToMeshDialog(const std::string& name,
46+
SCIRun::Dataflow::Networks::ModuleStateHandle state,
47+
QWidget* parent = 0);
48+
};
49+
50+
}
51+
}
52+
53+
#endif
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"module": {
3+
"name": "ConvertMatricesToMesh",
4+
"namespace": "Fields",
5+
"status": "Ported module",
6+
"description": "Store/retrieve values from an input matrix to/from the data of a field",
7+
"header": "Modules/Legacy/Forward/ConvertMatricesToMesh.h"
8+
},
9+
"algorithm": {
10+
"name": "N/A",
11+
"namespace": "N/A",
12+
"header": "N/A"
13+
},
14+
"UI": {
15+
"name": "ConvertMatricesToMeshDialog",
16+
"header": "Interface/Modules/Fields/ConvertMatricesToMeshDialog.h"
17+
}
18+
}

src/Modules/Legacy/Fields/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ SET(Modules_Legacy_Fields_SRCS
118118
ClipFieldByMesh.cc
119119
#ClipFieldToFieldOrWidget.cc
120120
#ClipLatVolByIndicesOrWidget.cc
121-
#ConvertMatricesToMesh.cc
121+
ConvertMatricesToMesh.cc
122122
#CollectPointClouds.cc
123123
#CoregisterPointClouds.cc
124124
#EditMeshBoundingBox.cc

0 commit comments

Comments
 (0)