Skip to content

Commit 5715a99

Browse files
authored
Merge branch 'master' into glm
2 parents 58f69d2 + fc8411c commit 5715a99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1647
-699
lines changed

.github/workflows/mac.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ jobs:
4949
name: SCIRunMacInstaller
5050
path: bin/SCIRun/SCIRun-5.0.beta.*-Darwin.pkg
5151

52+
- name: Deploy
53+
id: deploy
54+
if: github.ref == 'refs/heads/master'
55+
uses: marvinpinto/action-automatic-releases@latest
56+
with:
57+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
58+
automatic_release_tag: "dev-mac"
59+
prerelease: true
60+
title: "Development Build for Mac"
61+
files: |
62+
bin/SCIRun/SCIRun-5.0.beta.*-Darwin.pkg
63+
5264
mac-build-headless:
5365

5466
runs-on: macOS-latest

.github/workflows/windows.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,14 @@ jobs:
119119
with:
120120
name: SCIRunWindowsPythonInstaller
121121
path: bin/SCIRun/SCIRun-5.0.beta.*-win64.exe
122+
123+
- name: Deploy
124+
if: github.ref == 'refs/heads/master'
125+
uses: marvinpinto/action-automatic-releases@latest
126+
with:
127+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
128+
automatic_release_tag: "dev-windows"
129+
prerelease: true
130+
title: "Development Build for Windows"
131+
files: |
132+
bin/SCIRun/SCIRun-5.0.beta.*-win64.exe

src/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,9 @@ IF(BUILD_TESTING)
192192
SET(BUILDNAME "${BUILDNAME_SCIRun}" CACHE STRING "Name of build on the dashboard")
193193
MARK_AS_ADVANCED(BUILDNAME)
194194

195-
#INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestDataConfig.cmake)
196-
#TEST_DATA()
197-
198195
OPTION(RUN_UNIT_TESTS "Run gtest unit tests" ON)
199196
OPTION(RUN_BASIC_REGRESSION_TESTS "Run basic regression tests" ON)
197+
OPTION(RUN_IMPORT_TESTS "Run v4 import tests" ON)
200198

201199
IF(NOT EXISTS "${SCIRUN_TEST_RESOURCE_DIR}")
202200
MESSAGE( WARNING "Test resource path does not exist. Please set it correctly to run all the unit and regression tests. Clone this github repo to get all the files: https://github.com/CIBC-Internal/SCIRunTestData" )
@@ -828,6 +826,7 @@ IF(BUILD_TESTING)
828826
SET_PROPERTY(TARGET Core_DatabaseManager_Tests PROPERTY FOLDER "Core/Tests")
829827
SET_PROPERTY(TARGET Core_ImportExport_Tests PROPERTY FOLDER "Core/Tests")
830828
SET_PROPERTY(TARGET Core_IEPlugin_Tests PROPERTY FOLDER "Core/Tests")
829+
SET_PROPERTY(TARGET Graphics_Widgets_Tests PROPERTY FOLDER "Graphics/Tests")
831830

832831
SET_PROPERTY(TARGET Engine_Network_Tests PROPERTY FOLDER "Dataflow/Engine/Tests")
833832
SET_PROPERTY(TARGET Engine_Scheduler_Tests PROPERTY FOLDER "Dataflow/Engine/Tests")

src/Core/Datatypes/Dyadic3DTensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace Core {
5252
: parent()
5353
{
5454
if (eigvecs.size() != DIM_)
55-
THROW_INVALID_ARGUMENT("The number of input parameters must be " + DIM_);
55+
THROW_INVALID_ARGUMENT("The number of input parameters must be " + std::to_string(DIM_));
5656
parent::setEigenVectors(eigvecs);
5757
}
5858

src/Core/Datatypes/DyadicTensor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ namespace Core {
229229
const std::vector<VectorType>& eigvecs, const std::vector<Number>& eigvals) const
230230
{
231231
if (eigvecs_.size() != eigvecs.size())
232-
THROW_INVALID_ARGUMENT("The number of input eigvecs must be " + eigvecs_.size());
232+
THROW_INVALID_ARGUMENT("The number of input eigvecs must be " + std::to_string(eigvecs_.size()));
233233
if (eigvals_.size() != eigvals.size())
234-
THROW_INVALID_ARGUMENT("The number of input eigvals must be " + eigvals_.size());
234+
THROW_INVALID_ARGUMENT("The number of input eigvals must be " + std::to_string(eigvals_.size()));
235235
eigvecs_ = eigvecs;
236236
eigvals_ = eigvals;
237237
haveEigens_ = true;

src/Core/Datatypes/Tests/DyadicTensorTests.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ TEST(DyadicTensorTest, Equivalent)
256256
ASSERT_TRUE(t2 != t3);
257257
}
258258

259-
TEST(DyadicTensorTest, DifferentDimensionsNotEquivalent)
259+
TEST(DyadicTensorTest, DISABLED_DifferentDimensionsNotEquivalent)
260260
{
261261
Dyadic3DTensor t(
262262
{Eigen::Vector3d({1, 0, 0}), Eigen::Vector3d({0, 1, 0}), Eigen::Vector3d({0, 0, 1})});
263263
Dyadic4DTensor t2({Eigen::Vector4d({1, 0, 0, 0}), Eigen::Vector4d({0, 1, 0, 0}),
264264
Eigen::Vector4d({0, 0, 1, 0}), Eigen::Vector4d({0, 0, 0, 1})});
265265

266-
ASSERT_DEATH(t != t2, "");
266+
ASSERT_TRUE(t != t2);
267267
}
268268

269269
TEST(DyadicTensorTest, EqualsOperatorTensor)

src/Dataflow/Engine/Controller/NetworkEditorController.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ void NetworkEditorController::loadNetwork(const NetworkFileHandle& xml)
576576
theNetwork_->clear();
577577
throw;
578578
}
579+
catch (std::exception& ex)
580+
{
581+
logError("File load failed: exception while processing xml network data: {}", ex.what());
582+
theNetwork_->clear();
583+
throw;
584+
}
579585
eventCmdFactory_->create(NetworkEventCommands::OnNetworkLoad)->execute();
580586
}
581587
}

src/Dataflow/Serialization/Network/Importer/NetworkIO.cc

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ const std::string &y)
163163
return;
164164

165165
const std::string cmodule = checkForModuleRename(moduleNameOrig);
166+
if (cmodule == "PlaceholderModule")
167+
{
168+
//TODO: add state to placeholder module with original name
169+
}
166170

167171
std::vector<int> existingIdsWithThisModuleName;
168172
boost::copy(moduleIdMap_
@@ -182,6 +186,7 @@ const std::string &y)
182186

183187
std::ostringstream ostr;
184188
ostr << "Error: Undefined module \"" << cmodule << "\"";
189+
logCritical("LegacyNetworkIO error: Undefined module \"{}\"", cmodule);
185190
THROW_INVALID_ARGUMENT(ostr.str());
186191
}
187192

@@ -208,7 +213,102 @@ const std::map<std::string, std::string> LegacyNetworkIO::moduleRenameMap_ =
208213
{ "CalculateFieldData2", "CalculateFieldData" },
209214
{ "CalculateFieldData3", "CalculateFieldData" },
210215
{ "CalculateFieldData4", "CalculateFieldData" },
211-
{ "CalculateFieldData5", "CalculateFieldData" }
216+
{ "CalculateFieldData5", "CalculateFieldData" },
217+
{ "InterfaceWithNeuroFEMForward", "PlaceholderModule" },
218+
{ "ViewLeadSignals", "PlaceholderModule" },
219+
{ "ShowMatrix", "PlaceholderModule" },
220+
{ "ConvertFieldDataFromIndicesToTensors", "PlaceholderModule" },
221+
{ "CalculateMisfitField", "PlaceholderModule" },
222+
{ "SwapNodeLocationsWithMatrixEntries", "PlaceholderModule" },
223+
{ "BuildElemLeadField", "PlaceholderModule" },
224+
{ "OptimizeDipole", "PlaceholderModule" },
225+
{ "OptimizeConductivities", "PlaceholderModule" },
226+
{ "CalculateNodeNormals", "PlaceholderModule" },
227+
{ "SynchronizeGeometry", "PlaceholderModule" },
228+
{ "TransformData", "PlaceholderModule" },
229+
{ "SetFieldOrMeshStringProperty", "PlaceholderModule" },
230+
{ "Viewer", "PlaceholderModule" },
231+
{ "HDF5DataReader", "PlaceholderModule" },
232+
{ "MapDataToMeshCoord", "PlaceholderModule" },
233+
{ "ShowFieldV1", "PlaceholderModule" },
234+
{ "InterfaceWithMatlab", "PlaceholderModule" },
235+
{ "ShowTextureSlices", "PlaceholderModule" },
236+
{ "ApplyFilterToFieldData", "PlaceholderModule" },
237+
{ "CalculateLatVolGradientsAtNodes", "PlaceholderModule" },
238+
{ "ConvertLatVolDataFromElemToNode", "PlaceholderModule" },
239+
{ "CreateStructHex", "PlaceholderModule" },
240+
{ "ConvertLatVolDataFromNodeToElem", "PlaceholderModule" },
241+
{ "ConvertMeshToIrregularMesh", "PlaceholderModule" },
242+
{ "ConvertBundleToField", "PlaceholderModule" },
243+
{ "RemoveZerosFromMatrix", "PlaceholderModule" },
244+
{ "ReportScalarFieldStats", "PlaceholderModule" },
245+
{ "ClipFieldToFieldOrWidget", "PlaceholderModule" },
246+
{ "ClipLatVolByIndicesOrWidget", "PlaceholderModule" },
247+
{ "ExtractIsosurfaceByFunction", "PlaceholderModule" },
248+
{ "ConvertRegularMeshToStructuredMesh", "PlaceholderModule" },
249+
{ "GetDomainStructure", "PlaceholderModule" },
250+
{ "ConvertFieldToNrrd", "PlaceholderModule" },
251+
{ "MergeFields", "PlaceholderModule" },
252+
{ "InsertHexVolSheetAlongSurface", "PlaceholderModule" },
253+
{ "SubsampleStructuredFieldByIndices", "PlaceholderModule" },
254+
{ "EvaluateLinAlgGeneral", "PlaceholderModule" },
255+
{ "ShowTextureVolume", "PlaceholderModule" },
256+
{ "CreateAndEditColorMap2D", "PlaceholderModule" },
257+
{ "ShowLinePath", "PlaceholderModule" },
258+
{ "ShowFieldMesh", "PlaceholderModule" },
259+
{ "CreateMeshFromNrrd", "PlaceholderModule" },
260+
{ "JoinBundles", "PlaceholderModule" },
261+
{ "WriteBundle", "PlaceholderModule" },
262+
{ "SplitVectorArrayInXYZ", "PlaceholderModule" },
263+
{ "ManageFieldData", "PlaceholderModule" },
264+
{ "UnuCrop", "PlaceholderModule" },
265+
{ "Isosurface", "PlaceholderModule" },
266+
{ "FieldSlicer", "PlaceholderModule" },
267+
{ "GenStandardColorMaps", "PlaceholderModule" },
268+
{ "GetSubmatrix", "PlaceholderModule" },
269+
{ "CalculateDataArray", "PlaceholderModule" },
270+
{ "InterfaceWithMatlabViaBundles", "PlaceholderModule" },
271+
{ "TendAnvol", "PlaceholderModule" },
272+
{ "TendBmat", "PlaceholderModule" },
273+
{ "Unu1op", "PlaceholderModule" },
274+
{ "Unu2op", "PlaceholderModule" },
275+
{ "Unu3op", "PlaceholderModule" },
276+
{ "UnuCmedian", "PlaceholderModule" },
277+
{ "UnuConvert", "PlaceholderModule" },
278+
{ "UnuJoin", "PlaceholderModule" },
279+
{ "UnuCrop", "PlaceholderModule" },
280+
{ "UnuFlip", "PlaceholderModule" },
281+
{ "UnuGamma", "PlaceholderModule" },
282+
{ "UnuPad", "PlaceholderModule" },
283+
{ "UnuPermute", "PlaceholderModule" },
284+
{ "UnuQuantize", "PlaceholderModule" },
285+
{ "UnuResample", "PlaceholderModule" },
286+
{ "UnuReshape", "PlaceholderModule" },
287+
{ "UnuShuffle", "PlaceholderModule" },
288+
{ "UnuSlice", "PlaceholderModule" },
289+
{ "UnuHeq", "PlaceholderModule" },
290+
{ "ConvertNrrdsToTexture", "PlaceholderModule" },
291+
{ "GetAllSegmentationBoundaries", "PlaceholderModule" },
292+
{ "ShowPointPath", "PlaceholderModule" },
293+
{ "BuildNrrdGradientAndMagnitude", "PlaceholderModule" },
294+
{ "ConvertFieldsToTexture", "PlaceholderModule" },
295+
{ "CreateViewerClockIcon", "PlaceholderModule" },
296+
{ "UnuJhisto", "PlaceholderModule" },
297+
{ "NrrdToField", "PlaceholderModule" },
298+
{ "MDSPlusDataReader", "PlaceholderModule" },
299+
{ "VectorMagnitude", "PlaceholderModule" },
300+
{ "FieldSubSample", "PlaceholderModule" },
301+
{ "NIMRODConverter", "PlaceholderModule" },
302+
{ "StreamLines", "PlaceholderModule" },
303+
{ "FieldSubSample", "PlaceholderModule" },
304+
{ "SampleLattice", "PlaceholderModule" },
305+
{ "NrrdSelectTime", "PlaceholderModule" },
306+
{ "NrrdSetProperty", "PlaceholderModule" },
307+
{ "FieldInfo", "PlaceholderModule" },
308+
{ "SampleField", "PlaceholderModule" },
309+
{ "TextureBuilder", "PlaceholderModule" },
310+
{ "ShowTextureSurface", "PlaceholderModule" },
311+
{ "UnuProject", "PlaceholderModule" }
212312
};
213313

214314
#if 0
@@ -230,6 +330,9 @@ LegacyNetworkIO::createConnectionNew(const std::string& from, const std::string&
230330
auto fromId = moduleIdMap_[from];
231331
auto toId = moduleIdMap_[to];
232332

333+
if (fromId.name_ == "PlaceholderModule" || toId.name_ == "PlaceholderModule")
334+
return;
335+
233336
if (!xmlData_)
234337
return;
235338

@@ -356,11 +459,11 @@ LegacyNetworkIO::gui_set_modgui_variable(const std::string &mod_id, const std::s
356459
auto& stateXML = xmlData_->network.modules[moduleIdMap_[mod_id]].state;
357460

358461
auto converterObj = legacyState_.getStateConverter(moduleName, var);
359-
if (converterObj)
462+
if (converterObj && converterObj->valueConverter)
360463
{
361464
std::string stripBraces(val.begin() + 1, val.end() - 1);
362465
simpleLog_ << ">>> Attempting state conversion function: name{" << converterObj->name << "} "
363-
<< (converterObj->valueConverter ? "<func>" : "null func") << std::endl;
466+
<< (converterObj->valueConverter ? "<func>" : "null func") << " from " << stripBraces << " to " << converterObj->valueConverter(stripBraces) << std::endl;
364467
stateXML.setValue(converterObj->name, converterObj->valueConverter(stripBraces));
365468
}
366469
else
@@ -1100,11 +1203,16 @@ LegacyNetworkIO::process_substitute(const std::string &orig)
11001203
NetworkFileHandle
11011204
LegacyNetworkIO::load_net(const std::string &net)
11021205
{
1206+
logCritical("^^^^^ Importing network: {}", net);
11031207
net_file_ = net;
11041208
if (!load_network())
1209+
{
1210+
logCritical("!!!!!!! Network import unsuccessful: {}", net);
1211+
11051212
return nullptr;
1213+
}
11061214

1107-
std::cout << "Network import successful." << std::endl;
1215+
logCritical("~~~ ~~~ ~~~ Network import successful: {}", net);
11081216
return xmlData_;
11091217
}
11101218

src/Dataflow/Serialization/Network/Tests/LegacyNetworkFileImporterTests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class LegacyNetworkFileImporterTests : public ::testing::Test
7171
}
7272
NetworkFileHandle load(const std::string& file)
7373
{
74-
auto v4file1 = TestResources::rootDir() / "Other" / "v4nets" / file;
74+
auto v4file1 = TestResources::rootDir() / "Other" / "v4nets" / "testing" / file;
7575
return lnio.load_net(v4file1.string());
7676
}
7777
static void SetUpTestCase()

0 commit comments

Comments
 (0)