Skip to content

Commit 2fd690a

Browse files
author
tpat
committed
Undid rename of SecondaryVectorParameter variables because it would reset saved
values from older files
1 parent 84d09e0 commit 2fd690a

File tree

4 files changed

+139
-19
lines changed

4 files changed

+139
-19
lines changed

src/ExampleNets/regression/Renderer/showFieldGlyphsSecondaryTertiaryInput.srn5

Lines changed: 123 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
</module>
368368
<state>
369369
<stateMap>
370-
<count>47</count>
370+
<count>49</count>
371371
<item_version>0</item_version>
372372
<item>
373373
<first>
@@ -429,6 +429,18 @@
429429
</value>
430430
</second>
431431
</item>
432+
<item>
433+
<first>
434+
<name>RenderBases</name>
435+
</first>
436+
<second>
437+
<name>RenderBases</name>
438+
<value>
439+
<which>3</which>
440+
<value>0</value>
441+
</value>
442+
</second>
443+
</item>
432444
<item>
433445
<first>
434446
<name>RenderBidirectionaly</name>
@@ -593,7 +605,19 @@
593605
<name>SecondaryVectorParameterScale</name>
594606
<value>
595607
<which>1</which>
596-
<value>5.00000000000000000e+00</value>
608+
<value>2.50000000000005329e+00</value>
609+
</value>
610+
</second>
611+
</item>
612+
<item>
613+
<first>
614+
<name>SecondaryVectorParameterScalingType</name>
615+
</first>
616+
<second>
617+
<name>SecondaryVectorParameterScalingType</name>
618+
<value>
619+
<which>0</which>
620+
<value>1</value>
597621
</value>
598622
</second>
599623
</item>
@@ -947,7 +971,7 @@
947971
</module>
948972
<state>
949973
<stateMap>
950-
<count>39</count>
974+
<count>47</count>
951975
<item_version>0</item_version>
952976
<item>
953977
<first>
@@ -1081,6 +1105,18 @@
10811105
</value>
10821106
</second>
10831107
</item>
1108+
<item>
1109+
<first>
1110+
<name>HeadLightAzimuth</name>
1111+
</first>
1112+
<second>
1113+
<name>HeadLightAzimuth</name>
1114+
<value>
1115+
<which>0</which>
1116+
<value>180</value>
1117+
</value>
1118+
</second>
1119+
</item>
10841120
<item>
10851121
<first>
10861122
<name>HeadLightColor</name>
@@ -1093,6 +1129,18 @@
10931129
</value>
10941130
</second>
10951131
</item>
1132+
<item>
1133+
<first>
1134+
<name>HeadLightInclination</name>
1135+
</first>
1136+
<second>
1137+
<name>HeadLightInclination</name>
1138+
<value>
1139+
<which>0</which>
1140+
<value>90</value>
1141+
</value>
1142+
</second>
1143+
</item>
10961144
<item>
10971145
<first>
10981146
<name>HeadLightOn</name>
@@ -1105,6 +1153,18 @@
11051153
</value>
11061154
</second>
11071155
</item>
1156+
<item>
1157+
<first>
1158+
<name>Light1Azimuth</name>
1159+
</first>
1160+
<second>
1161+
<name>Light1Azimuth</name>
1162+
<value>
1163+
<which>0</which>
1164+
<value>180</value>
1165+
</value>
1166+
</second>
1167+
</item>
11081168
<item>
11091169
<first>
11101170
<name>Light1Color</name>
@@ -1117,6 +1177,18 @@
11171177
</value>
11181178
</second>
11191179
</item>
1180+
<item>
1181+
<first>
1182+
<name>Light1Inclination</name>
1183+
</first>
1184+
<second>
1185+
<name>Light1Inclination</name>
1186+
<value>
1187+
<which>0</which>
1188+
<value>90</value>
1189+
</value>
1190+
</second>
1191+
</item>
11201192
<item>
11211193
<first>
11221194
<name>Light1On</name>
@@ -1129,6 +1201,18 @@
11291201
</value>
11301202
</second>
11311203
</item>
1204+
<item>
1205+
<first>
1206+
<name>Light2Azimuth</name>
1207+
</first>
1208+
<second>
1209+
<name>Light2Azimuth</name>
1210+
<value>
1211+
<which>0</which>
1212+
<value>180</value>
1213+
</value>
1214+
</second>
1215+
</item>
11321216
<item>
11331217
<first>
11341218
<name>Light2Color</name>
@@ -1141,6 +1225,18 @@
11411225
</value>
11421226
</second>
11431227
</item>
1228+
<item>
1229+
<first>
1230+
<name>Light2Inclination</name>
1231+
</first>
1232+
<second>
1233+
<name>Light2Inclination</name>
1234+
<value>
1235+
<which>0</which>
1236+
<value>90</value>
1237+
</value>
1238+
</second>
1239+
</item>
11441240
<item>
11451241
<first>
11461242
<name>Light2On</name>
@@ -1153,6 +1249,18 @@
11531249
</value>
11541250
</second>
11551251
</item>
1252+
<item>
1253+
<first>
1254+
<name>Light3Azimuth</name>
1255+
</first>
1256+
<second>
1257+
<name>Light3Azimuth</name>
1258+
<value>
1259+
<which>0</which>
1260+
<value>180</value>
1261+
</value>
1262+
</second>
1263+
</item>
11561264
<item>
11571265
<first>
11581266
<name>Light3Color</name>
@@ -1165,6 +1273,18 @@
11651273
</value>
11661274
</second>
11671275
</item>
1276+
<item>
1277+
<first>
1278+
<name>Light3Inclination</name>
1279+
</first>
1280+
<second>
1281+
<name>Light3Inclination</name>
1282+
<value>
1283+
<which>0</which>
1284+
<value>90</value>
1285+
</value>
1286+
</second>
1287+
</item>
11681288
<item>
11691289
<first>
11701290
<name>Light3On</name>

src/Interface/Modules/Visualization/ShowFieldGlyphsDialog.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ void ShowFieldGlyphsDialog::setupVectorsTab()
166166
addCheckableButtonManager(this->renderVectorsBelowThresholdCheckBox_, ShowFieldGlyphs::RenderVectorsBelowThreshold);
167167
addDoubleSpinBoxManager(this->vectorsThresholdDoubleSpinBox_, ShowFieldGlyphs::VectorsThreshold);
168168
// Radius/Width
169-
addRadioButtonGroupManager({ this->secondaryVectorParameterUniformRButton_, this->secondaryVectorParameterPortRButton_}, ShowFieldGlyphs::SecondaryVecParamScalingType);
170-
addComboBoxManager(this->secondaryVectorParameterPortComboBox_, ShowFieldGlyphs::SecondaryVecParamDataInput);
171-
addDoubleSpinBoxManager(this->secondaryVectorParameterDoubleSpinBox_, ShowFieldGlyphs::SecondaryVecParamScale);
169+
addRadioButtonGroupManager({ this->secondaryVectorParameterUniformRButton_, this->secondaryVectorParameterPortRButton_}, ShowFieldGlyphs::SecondaryVectorParameterScalingType);
170+
addComboBoxManager(this->secondaryVectorParameterPortComboBox_, ShowFieldGlyphs::SecondaryVectorParameterDataInput);
171+
addDoubleSpinBoxManager(this->secondaryVectorParameterDoubleSpinBox_, ShowFieldGlyphs::SecondaryVectorParameterScale);
172172
// Arrow Settings
173173
addDoubleSpinBoxManager(this->arrowHeadRatioDoubleSpinBox_, ShowFieldGlyphs::ArrowHeadRatio);
174174
addCheckableButtonManager(this->bidirectionalVectorsCheckBox_, ShowFieldGlyphs::RenderBidirectionaly);

src/Modules/Visualization/ShowFieldGlyphs.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ namespace SCIRun {
133133
}
134134
}
135135

136-
enum SecondaryVecParamScalingTypeEnum
136+
enum SecondaryVectorParameterScalingTypeEnum
137137
{
138138
UNIFORM,
139139
USE_INPUT
@@ -234,9 +234,9 @@ void ShowFieldGlyphs::setStateDefaults()
234234
state->setValue(VectorsTransparency, 0);
235235
state->setValue(VectorsUniformTransparencyValue, 0.65);
236236
// state->setValue(VectorsTransparencyDataInput, std::string("Primary"));
237-
state->setValue(SecondaryVecParamScalingType, SecondaryVecParamScalingTypeEnum::USE_INPUT);
238-
state->setValue(SecondaryVecParamDataInput, std::string("Primary"));
239-
state->setValue(SecondaryVecParamScale, 0.5);
237+
state->setValue(SecondaryVectorParameterScalingType, SecondaryVectorParameterScalingTypeEnum::USE_INPUT);
238+
state->setValue(SecondaryVectorParameterDataInput, std::string("Primary"));
239+
state->setValue(SecondaryVectorParameterScale, 0.5);
240240
state->setValue(NormalizeVectors, false);
241241
state->setValue(VectorsScale, 1.0);
242242
state->setValue(RenderVectorsBelowThreshold, true);
@@ -459,7 +459,7 @@ void GlyphBuilder::renderVectors(
459459
// Gets user set data
460460
ColorScheme colorScheme = portHandler.getColorScheme();
461461
double scale = state->getValue(ShowFieldGlyphs::VectorsScale).toDouble();
462-
double radiusWidthScale = state->getValue(ShowFieldGlyphs::SecondaryVecParamScale).toDouble();
462+
double radiusWidthScale = state->getValue(ShowFieldGlyphs::SecondaryVectorParameterScale).toDouble();
463463
int resolution = state->getValue(ShowFieldGlyphs::VectorsResolution).toInt();
464464
double arrowHeadRatio = state->getValue(ShowFieldGlyphs::ArrowHeadRatio).toDouble();
465465

@@ -545,7 +545,7 @@ void GlyphBuilder::renderVectors(
545545

546546
// Get radius
547547
radius = scale * radiusWidthScale / 2.0;
548-
if(state->getValue(ShowFieldGlyphs::SecondaryVecParamScalingType).toInt() == SecondaryVecParamScalingTypeEnum::USE_INPUT)
548+
if(state->getValue(ShowFieldGlyphs::SecondaryVectorParameterScalingType).toInt() == SecondaryVectorParameterScalingTypeEnum::USE_INPUT)
549549
radius *= portHandler.getSecondaryVectorParameter(indices[i]);
550550

551551
ColorRGB node_color = portHandler.getNodeColor(indices[i]);
@@ -907,7 +907,7 @@ RenderState GlyphBuilder::getVectorsRenderState(ModuleStateHandle state)
907907
renState.set(RenderState::USE_DEFAULT_COLOR, true);
908908
}
909909
renState.mColorInput = getInput(state->getValue(ShowFieldGlyphs::VectorsColoringDataInput).toString());
910-
renState.mSecondaryVectorParameterInput = getInput(state->getValue(ShowFieldGlyphs::SecondaryVecParamDataInput).toString());
910+
renState.mSecondaryVectorParameterInput = getInput(state->getValue(ShowFieldGlyphs::SecondaryVectorParameterDataInput).toString());
911911

912912
return renState;
913913
}
@@ -1061,9 +1061,9 @@ const AlgorithmParameterName ShowFieldGlyphs::NormalizeVectors("NormalizeVectors
10611061
const AlgorithmParameterName ShowFieldGlyphs::VectorsScale("VectorsScale");
10621062
const AlgorithmParameterName ShowFieldGlyphs::RenderVectorsBelowThreshold("RenderVectorsBelowThreshold");
10631063
const AlgorithmParameterName ShowFieldGlyphs::VectorsThreshold("VectorsThreshold");
1064-
const AlgorithmParameterName ShowFieldGlyphs::SecondaryVecParamScalingType("SecondaryVecParamScalingType");
1065-
const AlgorithmParameterName ShowFieldGlyphs::SecondaryVecParamDataInput("SecondaryVecParamDataInput");
1066-
const AlgorithmParameterName ShowFieldGlyphs::SecondaryVecParamScale("SecondaryVecParamScale");
1064+
const AlgorithmParameterName ShowFieldGlyphs::SecondaryVectorParameterScalingType("SecondaryVectorParameterScalingType");
1065+
const AlgorithmParameterName ShowFieldGlyphs::SecondaryVectorParameterDataInput("SecondaryVectorParameterDataInput");
1066+
const AlgorithmParameterName ShowFieldGlyphs::SecondaryVectorParameterScale("SecondaryVectorParameterScale");
10671067
const AlgorithmParameterName ShowFieldGlyphs::ArrowHeadRatio("ArrowHeadRatio");
10681068
const AlgorithmParameterName ShowFieldGlyphs::RenderBidirectionaly("RenderBidirectionaly");
10691069
const AlgorithmParameterName ShowFieldGlyphs::RenderBases("RenderBases");

src/Modules/Visualization/ShowFieldGlyphs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ namespace SCIRun {
6464
static const Core::Algorithms::AlgorithmParameterName VectorsScale;
6565
static const Core::Algorithms::AlgorithmParameterName RenderVectorsBelowThreshold;
6666
static const Core::Algorithms::AlgorithmParameterName VectorsThreshold;
67-
static const Core::Algorithms::AlgorithmParameterName SecondaryVecParamScalingType;
68-
static const Core::Algorithms::AlgorithmParameterName SecondaryVecParamDataInput;
69-
static const Core::Algorithms::AlgorithmParameterName SecondaryVecParamScale;
67+
static const Core::Algorithms::AlgorithmParameterName SecondaryVectorParameterScalingType;
68+
static const Core::Algorithms::AlgorithmParameterName SecondaryVectorParameterDataInput;
69+
static const Core::Algorithms::AlgorithmParameterName SecondaryVectorParameterScale;
7070
static const Core::Algorithms::AlgorithmParameterName ArrowHeadRatio;
7171
static const Core::Algorithms::AlgorithmParameterName RenderBidirectionaly;
7272
static const Core::Algorithms::AlgorithmParameterName RenderBases;

0 commit comments

Comments
 (0)