Skip to content

Commit 3705e4c

Browse files
committed
Merge branch 'master' into gui_B
2 parents 1011a49 + 6135464 commit 3705e4c

9 files changed

+157
-17
lines changed

src/Interface/Application/scirun5.qrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
<file>Resources/copy.png</file>
3333
<file>Resources/paste.png</file>
3434
<file>Resources/download.png</file>
35-
<file>Resources/cubic.png</file>
36-
<file>Resources/euclidean.png</file>
37-
<file>Resources/manhattan.png</file>
35+
<file>Resources/cubic.PNG</file>
36+
<file>Resources/euclidean.PNG</file>
37+
<file>Resources/manhattan.PNG</file>
3838
<file>Resources/timepiece-512.png</file>
3939
<file>Resources/new/general/folder.png</file>
4040
<file>Resources/new/general/header-divider.png</file>

src/Interface/Modules/Fields/CreateLatVol.ui

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,17 @@
205205
</item>
206206
</layout>
207207
</widget>
208+
<tabstops>
209+
<tabstop>xSizeSpinBox_</tabstop>
210+
<tabstop>ySizeSpinBox_</tabstop>
211+
<tabstop>zSizeSpinBox_</tabstop>
212+
<tabstop>padPercentageSpinBox_</tabstop>
213+
<tabstop>dataAtNodesButton_</tabstop>
214+
<tabstop>dataAtCellsButton_</tabstop>
215+
<tabstop>dataAtNoneButton_</tabstop>
216+
<tabstop>elementSizeNormalizedButton_</tabstop>
217+
<tabstop>elementSizeOneButton_</tabstop>
218+
</tabstops>
208219
<resources/>
209220
<connections/>
210221
</ui>

src/Interface/Modules/Fields/MapFieldDataFromSourceToDestinationDialog.ui

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@
147147
</item>
148148
</layout>
149149
</widget>
150+
<tabstops>
151+
<tabstop>methodComboBox_</tabstop>
152+
<tabstop>maxDistanceSpinBox_</tabstop>
153+
<tabstop>noMaxCheckBox_</tabstop>
154+
<tabstop>defaultValueDoubleSpinBox_</tabstop>
155+
<tabstop>useNanForUnassignedValuesCheckBox_</tabstop>
156+
</tabstops>
150157
<resources/>
151158
<connections>
152159
<connection>
@@ -156,12 +163,12 @@
156163
<slot>setDisabled(bool)</slot>
157164
<hints>
158165
<hint type="sourcelabel">
159-
<x>70</x>
160-
<y>139</y>
166+
<x>134</x>
167+
<y>107</y>
161168
</hint>
162169
<hint type="destinationlabel">
163-
<x>187</x>
164-
<y>114</y>
170+
<x>361</x>
171+
<y>102</y>
165172
</hint>
166173
</hints>
167174
</connection>
@@ -172,8 +179,8 @@
172179
<slot>setDisabled(bool)</slot>
173180
<hints>
174181
<hint type="sourcelabel">
175-
<x>50</x>
176-
<y>197</y>
182+
<x>236</x>
183+
<y>206</y>
177184
</hint>
178185
<hint type="destinationlabel">
179186
<x>378</x>

src/Interface/Modules/Fields/MapFieldDataOntoElems.ui

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,54 @@
211211
</property>
212212
</widget>
213213
</item>
214-
<item row="5" column="0">
214+
<item row="6" column="0">
215215
<widget class="QLabel" name="label_6">
216216
<property name="text">
217217
<string>Maximum Distance:</string>
218218
</property>
219219
</widget>
220220
</item>
221-
<item row="5" column="1">
221+
<item row="6" column="1">
222222
<widget class="QLineEdit" name="maximumDistanceLineEdit_"/>
223223
</item>
224+
<item row="5" column="1">
225+
<widget class="QCheckBox" name="useNanForUnassignedValuesCheckBox_">
226+
<property name="text">
227+
<string>Use Nan</string>
228+
</property>
229+
</widget>
230+
</item>
224231
</layout>
225232
</widget>
226233
</item>
227234
</layout>
228235
</widget>
236+
<tabstops>
237+
<tabstop>quantityComboBox_</tabstop>
238+
<tabstop>interpolationComboBox_</tabstop>
239+
<tabstop>samplePointsComboBox_</tabstop>
240+
<tabstop>sampleMethodComboBox_</tabstop>
241+
<tabstop>outsideValueDoubleSpinBox_</tabstop>
242+
<tabstop>useNanForUnassignedValuesCheckBox_</tabstop>
243+
<tabstop>maximumDistanceLineEdit_</tabstop>
244+
</tabstops>
229245
<resources/>
230-
<connections/>
246+
<connections>
247+
<connection>
248+
<sender>useNanForUnassignedValuesCheckBox_</sender>
249+
<signal>toggled(bool)</signal>
250+
<receiver>outsideValueDoubleSpinBox_</receiver>
251+
<slot>setDisabled(bool)</slot>
252+
<hints>
253+
<hint type="sourcelabel">
254+
<x>263</x>
255+
<y>164</y>
256+
</hint>
257+
<hint type="destinationlabel">
258+
<x>274</x>
259+
<y>149</y>
260+
</hint>
261+
</hints>
262+
</connection>
263+
</connections>
231264
</ui>

src/Interface/Modules/Fields/MapFieldDataOntoElemsDialog.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <Core/Algorithms/Legacy/Fields/Mapping/MapFieldDataOntoElems.h>
3131
#include <Dataflow/Network/ModuleStateInterface.h> ///TODO: extract into intermediate
3232
#include <Core/Logging/Log.h>
33+
#include <Core/Math/MiscMath.h>
3334

3435
using namespace SCIRun::Gui;
3536
using namespace SCIRun::Dataflow::Networks;
@@ -48,4 +49,22 @@ MapFieldDataOntoElemsDialog::MapFieldDataOntoElemsDialog(const std::string& name
4849
addComboBoxManager(samplePointsComboBox_, Parameters::SamplePoints);
4950
addDoubleSpinBoxManager(outsideValueDoubleSpinBox_, Parameters::OutsideValue);
5051
addDoubleLineEditManager(maximumDistanceLineEdit_, Parameters::MaxDistance);
52+
connect(useNanForUnassignedValuesCheckBox_, SIGNAL(stateChanged(int)), this, SLOT(setUseNanForUnassignedValues(int)));
53+
}
54+
55+
void MapFieldDataOntoElemsDialog::pullSpecial()
56+
{
57+
if (IsNan(state_->getValue(Parameters::OutsideValue).toDouble()))
58+
{
59+
useNanForUnassignedValuesCheckBox_->setChecked(true);
60+
}
61+
}
62+
63+
void MapFieldDataOntoElemsDialog::setUseNanForUnassignedValues(int state)
64+
{
65+
if (!pulling_)
66+
{
67+
if (0 != state)
68+
state_->setValue(Parameters::OutsideValue, std::numeric_limits<double>::quiet_NaN());
69+
}
5170
}

src/Interface/Modules/Fields/MapFieldDataOntoElemsDialog.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class SCISHARE MapFieldDataOntoElemsDialog : public ModuleDialogGeneric,
4545
MapFieldDataOntoElemsDialog(const std::string& name,
4646
SCIRun::Dataflow::Networks::ModuleStateHandle state,
4747
QWidget* parent = 0);
48+
protected:
49+
virtual void pullSpecial() override;
50+
private Q_SLOTS:
51+
void setUseNanForUnassignedValues(int state);
4852
};
4953

5054
}

src/Interface/Modules/Fields/MapFieldDataOntoNodes.ui

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>405</width>
10-
<height>172</height>
10+
<height>185</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -19,7 +19,7 @@
1919
<property name="minimumSize">
2020
<size>
2121
<width>405</width>
22-
<height>172</height>
22+
<height>185</height>
2323
</size>
2424
</property>
2525
<property name="windowTitle">
@@ -28,6 +28,12 @@
2828
<layout class="QVBoxLayout" name="verticalLayout">
2929
<item>
3030
<widget class="QGroupBox" name="groupBox">
31+
<property name="minimumSize">
32+
<size>
33+
<width>380</width>
34+
<height>165</height>
35+
</size>
36+
</property>
3137
<property name="title">
3238
<string/>
3339
</property>
@@ -117,21 +123,57 @@
117123
</property>
118124
</widget>
119125
</item>
120-
<item row="3" column="0">
126+
<item row="5" column="0">
121127
<widget class="QLabel" name="label_6">
122128
<property name="text">
123129
<string>Maximum Distance:</string>
124130
</property>
125131
</widget>
126132
</item>
127-
<item row="3" column="1">
133+
<item row="5" column="1">
128134
<widget class="QLineEdit" name="maximumDistanceLineEdit_"/>
129135
</item>
136+
<item row="3" column="1">
137+
<widget class="QCheckBox" name="useNanForUnassignedValuesCheckBox_">
138+
<property name="sizePolicy">
139+
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
140+
<horstretch>0</horstretch>
141+
<verstretch>0</verstretch>
142+
</sizepolicy>
143+
</property>
144+
<property name="text">
145+
<string>Use NaN</string>
146+
</property>
147+
</widget>
148+
</item>
130149
</layout>
131150
</widget>
132151
</item>
133152
</layout>
134153
</widget>
154+
<tabstops>
155+
<tabstop>quantityComboBox_</tabstop>
156+
<tabstop>interpolationComboBox_</tabstop>
157+
<tabstop>outsideValueDoubleSpinBox_</tabstop>
158+
<tabstop>maximumDistanceLineEdit_</tabstop>
159+
</tabstops>
135160
<resources/>
136-
<connections/>
161+
<connections>
162+
<connection>
163+
<sender>useNanForUnassignedValuesCheckBox_</sender>
164+
<signal>toggled(bool)</signal>
165+
<receiver>outsideValueDoubleSpinBox_</receiver>
166+
<slot>setDisabled(bool)</slot>
167+
<hints>
168+
<hint type="sourcelabel">
169+
<x>242</x>
170+
<y>104</y>
171+
</hint>
172+
<hint type="destinationlabel">
173+
<x>255</x>
174+
<y>78</y>
175+
</hint>
176+
</hints>
177+
</connection>
178+
</connections>
137179
</ui>

src/Interface/Modules/Fields/MapFieldDataOntoNodesDialog.cc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <Core/Algorithms/Legacy/Fields/Mapping/MapFieldDataOntoNodes.h>
3131
#include <Dataflow/Network/ModuleStateInterface.h> ///TODO: extract into intermediate
3232
#include <Core/Logging/Log.h>
33+
#include <Core/Math/MiscMath.h>
3334

3435
using namespace SCIRun::Gui;
3536
using namespace SCIRun::Dataflow::Networks;
@@ -46,4 +47,23 @@ MapFieldDataOntoNodesDialog::MapFieldDataOntoNodesDialog(const std::string& name
4647
addComboBoxManager(interpolationComboBox_, Parameters::InterpolationModel);
4748
addDoubleSpinBoxManager(outsideValueDoubleSpinBox_, Parameters::OutsideValue);
4849
addDoubleLineEditManager(maximumDistanceLineEdit_, Parameters::MaxDistance);
50+
connect(useNanForUnassignedValuesCheckBox_, SIGNAL(stateChanged(int)), this, SLOT(setUseNanForUnassignedValues(int)));
4951
}
52+
53+
void MapFieldDataOntoNodesDialog::pullSpecial()
54+
{
55+
if (IsNan(state_->getValue(Parameters::OutsideValue).toDouble()))
56+
{
57+
useNanForUnassignedValuesCheckBox_->setChecked(true);
58+
}
59+
}
60+
61+
void MapFieldDataOntoNodesDialog::setUseNanForUnassignedValues(int state)
62+
{
63+
if (!pulling_)
64+
{
65+
if (0 != state)
66+
state_->setValue(Parameters::OutsideValue, std::numeric_limits<double>::quiet_NaN());
67+
}
68+
}
69+

src/Interface/Modules/Fields/MapFieldDataOntoNodesDialog.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class SCISHARE MapFieldDataOntoNodesDialog : public ModuleDialogGeneric,
4545
MapFieldDataOntoNodesDialog(const std::string& name,
4646
SCIRun::Dataflow::Networks::ModuleStateHandle state,
4747
QWidget* parent = 0);
48+
protected:
49+
virtual void pullSpecial() override;
50+
private Q_SLOTS:
51+
void setUseNanForUnassignedValues(int state);
4852
};
4953

5054
}

0 commit comments

Comments
 (0)