Skip to content

Commit 1f9ca46

Browse files
committed
Merge branch 'master' into issues_A
2 parents c72a817 + 5ad0542 commit 1f9ca46

24 files changed

+559
-165
lines changed

README.md

Lines changed: 10 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ https://github.com/SCIInstitute/SCIRun
1212
- [Summary](#user-content-summary)
1313
- [Goals](#user-content-goals)
1414
- [Documentation](#user-content-documentation)
15-
- [Platform Notes](#user-content-platform-notes)
16-
- [Build requirements](#user-content-build-requirements)
17-
- [CMake Build Generators](#user-content-cmake-build-generators)
18-
- [Unix Makefiles notes](#user-content-unix-makefiles-notes)
15+
- [Build](#user-content-build)
16+
- [Python API](#user-content-python-api)
1917
- [Questions and Answers](#user-content-questions-and-answers)
2018
- [License and Credits](#user-content-license-and-credits)
2119

@@ -24,49 +22,18 @@ https://github.com/SCIInstitute/SCIRun
2422
| Warning! | SCIRun 5 is alpha software, you may use for real science but beware of instability. |
2523
|:--------:|:-------------------------------------------------------------------------------------:|
2624

27-
###Goals
25+
### Goals
2826
SCIRun 5 is a complete rewrite of the GUI front end and graphical components of SCIRun 4, including a more stable and
2927
efficient middle layer, with support for Python scripting.
3028

3129
### Documentation
32-
For documentation, please see: http://sciinstitute.github.io/SCIRun/
33-
34-
### Platform Notes
35-
#### Build requirements
36-
* OS X (tested on 10.7-10.11)
37-
- Apple clang 5.1
38-
- Qt 4.8
39-
+ Download from http://releases.qt-project.org/qt4/source/qt-mac-opensource-4.8.4.dmg.
40-
+ The above dmg will not work if using OS X 10.11. In this case Qt 4.8 can be acquired through macports using the command 'sudo port install qt4-mac' - more on macports here: https://www.macports.org/install.php
41-
* Windows (tested on Windows 7, 8, 10)
42-
- Visual Studio 2013, 2015
43-
- Qt 4.8
44-
+ Build from source (see http://scirundocwiki.sci.utah.edu/SCIRunDocs/index.php/CIBC:Seg3D2:Building_Releases#Installing_Qt_on_your_system_and_building_from_scratch for instructions), but be sure to download http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.4.tar.gz.
45-
* Linux (tested on Ubuntu 12.10, OpenSUSE Leap)
46-
- gcc 4.6, 4.7, 4.8
47-
- Qt 4.8
48-
+ Build from source (http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.4.tar.gz), or use system libraries if available.
49-
* All platforms
50-
- CMake 2.8
51-
+ Root cmake file is SCIRun/Superbuild/CMakeLists.txt.
52-
+ Building in the source directory is not permitted.
53-
+ Make sure BUILD_SHARED_LIBS is on (default setting).
54-
55-
#### CMake Build Generators
56-
* Windows
57-
- Visual Studio 2013
58-
* OS X (tested on 10.7 and 10.8 and 10.10)
59-
- Unix Makefiles
60-
- Xcode
61-
* Linux (tested on Ubuntu 12.10)
62-
- Unix Makefiles
63-
64-
#### Unix Makefiles notes
65-
* Build Superbuild first (src/Superbuild), then subsequently, SCIRun can be built by itself (src/).
66-
* Included `build.sh` takes care of all this for you.
67-
68-
### Tagging releases
69-
On an OSX system, run script `release.sh` in the `src` directory with the release name in format `alpha.XX` as a parameter.
30+
For documentation, please see: http://sciinstitute.github.io/scirun.pages
31+
32+
#### Build
33+
Please see http://sciinstitute.github.io/scirun.pages/build.html
34+
35+
#### Python API
36+
Please see http://sciinstitute.github.io/scirun.pages/python.html
7037

7138
### Questions and Answers
7239
For help, email the testing mailing list at [email protected].

src/Core/IEPlugin/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SET(Core_IEPlugin_SRCS
3232
CurveField_Plugin.cc
3333
#DIF_Plugin.cc
3434
EcgsimFileToMatrix_Plugin.cc
35-
#IgbFileToMatrix_Plugin.cc
35+
IgbFileToMatrix_Plugin.cc
3636
#EcgsimFileToTriSurf_Plugin.cc
3737
#HexVolField_Plugin.cc
3838
IEPluginInit.cc

src/Core/IEPlugin/IEPluginInit.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <Core/IEPlugin/SimpleTextFileToMatrix_Plugin.h>
3333
#include <Core/IEPlugin/EcgsimFileToMatrix_Plugin.h>
3434
#include <Core/IEPlugin/PointCloudField_Plugin.h>
35-
#include <Core/IEPlugin/IGBFileToMatrix_Plugin.h>
35+
#include <Core/IEPlugin/IgbFileToMatrix_Plugin.h>
3636
#include <Core/IEPlugin/CurveField_Plugin.h>
3737
#include <Core/IEPlugin/TriSurfField_Plugin.h>
3838
#include <Core/IEPlugin/TetVolField_Plugin.h>
@@ -66,7 +66,7 @@ void IEPluginManager::Initialize()
6666
static FieldIEPluginLegacyAdapter CurveField_plugin("CurveField", "*.pts *.pos *.edge", "", TextToCurveField_reader, CurveFieldToTextBaseIndexZero_writer);
6767

6868
static MatrixIEPluginLegacyAdapter EcgsimFileMatrix_plugin("ECGSimFile", "", "", EcgsimFileMatrix_reader, EcgsimFileMatrix_writer);
69-
//static MatrixIEPluginLegacyAdapter IgbFileMatrix_plugin("IGBFile", "*.igb", "*.igb", IgbFileMatrix_reader, IgbFileMatrix_writer);
69+
static MatrixIEPluginLegacyAdapter IgbFileMatrix_plugin("IGBFile", "*.igb", "*.igb", IgbFileMatrix_reader, IgbFileMatrix_writer);
7070

7171
static FieldIEPluginLegacyAdapter TriSurfField_plugin("TriSurfField", "*.fac *.tri *.pts *.pos", "", TextToTriSurfField_reader, TriSurfFieldToTextBaseIndexZero_writer);
7272
static FieldIEPluginLegacyAdapter TriSurfFieldBaseIndexOne_plugin("TriSurfField[BaseIndex 1]", "*.fac *.pts", "", nullptr, TriSurfFieldToTextBaseIndexOne_writer);

src/Core/IEPlugin/IgbFileToMatrix_Plugin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939

4040
#include <Core/ImportExport/Matrix/MatrixIEPlugin.h>
41-
#include <Core/IEPlugin/IgbmFileToMatrix_Plugin.h>
41+
#include <Core/IEPlugin/IgbFileToMatrix_Plugin.h>
4242
#include <Core/Datatypes/DenseMatrix.h>
4343
#include <Core/Datatypes/MatrixTypeConversions.h>
4444
#include <Core/Utils/Legacy/StringUtil.h>
-2.1 KB
Binary file not shown.

src/Documentation/Manuals/BasicTutorial/BasicTutorial.tex

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,6 @@ \subsection{SCIRun \SCIRunVersion}
4646

4747
%%\subsection{SCIRun SVN}
4848

49-
\chapter{User Interface}
50-
51-
\begin{introduction}
52-
Scope: \hyperref[datalayer]{Data Layers} - \hyperref[favorites]{Favorite Modules} -
53-
\hyperref[visualize]{Saved Subnetworks} - \hyperref[convert4]{Converting Networks from SCIRun 4}
54-
\end{introduction}
55-
56-
\subsection{Data Layers}\label{datalayer}
57-
58-
\subsection{Favorite Modules}\label{favorites}
59-
60-
\subsection{Saved Subnetworks and Snippets}\label{subnets}
61-
62-
\subsection{Converting Networks from SCIRun 4}\label{convert4}
63-
64-
65-
66-
6749
\chapter{Simple Dataflow Network}
6850

6951
\begin{introduction}

src/Interface/Modules/Math/CreateGeometricTransform.ui

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
<property name="decimals">
5555
<number>6</number>
5656
</property>
57+
<property name="minimum">
58+
<double>-99.989999999999995</double>
59+
</property>
5760
</widget>
5861
</item>
5962
<item row="1" column="0">
@@ -68,6 +71,9 @@
6871
<property name="decimals">
6972
<number>6</number>
7073
</property>
74+
<property name="minimum">
75+
<double>-99.989999999999995</double>
76+
</property>
7177
</widget>
7278
</item>
7379
<item row="2" column="0">
@@ -82,6 +88,9 @@
8288
<property name="decimals">
8389
<number>6</number>
8490
</property>
91+
<property name="minimum">
92+
<double>-99.989999999999995</double>
93+
</property>
8594
</widget>
8695
</item>
8796
</layout>
@@ -370,6 +379,9 @@
370379
<property name="decimals">
371380
<number>6</number>
372381
</property>
382+
<property name="minimum">
383+
<double>-99.989999999999995</double>
384+
</property>
373385
</widget>
374386
</item>
375387
<item row="1" column="0">
@@ -384,6 +396,9 @@
384396
<property name="decimals">
385397
<number>6</number>
386398
</property>
399+
<property name="minimum">
400+
<double>-99.989999999999995</double>
401+
</property>
387402
</widget>
388403
</item>
389404
<item row="2" column="0">
@@ -398,6 +413,9 @@
398413
<property name="decimals">
399414
<number>6</number>
400415
</property>
416+
<property name="minimum">
417+
<double>-99.989999999999995</double>
418+
</property>
401419
</widget>
402420
</item>
403421
</layout>
@@ -459,22 +477,6 @@
459477
</property>
460478
</widget>
461479
</item>
462-
<item row="2" column="1">
463-
<widget class="QDoubleSpinBox" name="rotateZAxisDoubleSpinBox_">
464-
<property name="minimum">
465-
<double>-1.000000000000000</double>
466-
</property>
467-
<property name="maximum">
468-
<double>1.000000000000000</double>
469-
</property>
470-
<property name="singleStep">
471-
<double>0.010000000000000</double>
472-
</property>
473-
<property name="value">
474-
<double>1.000000000000000</double>
475-
</property>
476-
</widget>
477-
</item>
478480
<item row="3" column="0">
479481
<widget class="QLabel" name="label_22">
480482
<property name="text">
@@ -498,6 +500,22 @@
498500
</property>
499501
</widget>
500502
</item>
503+
<item row="2" column="1">
504+
<widget class="QDoubleSpinBox" name="rotateZAxisDoubleSpinBox_">
505+
<property name="minimum">
506+
<double>-1.000000000000000</double>
507+
</property>
508+
<property name="maximum">
509+
<double>1.000000000000000</double>
510+
</property>
511+
<property name="singleStep">
512+
<double>0.010000000000000</double>
513+
</property>
514+
<property name="value">
515+
<double>1.000000000000000</double>
516+
</property>
517+
</widget>
518+
</item>
501519
</layout>
502520
</widget>
503521
</item>
@@ -539,6 +557,9 @@
539557
<property name="decimals">
540558
<number>6</number>
541559
</property>
560+
<property name="minimum">
561+
<double>-99.989999999999995</double>
562+
</property>
542563
</widget>
543564
</item>
544565
<item row="1" column="0">
@@ -553,6 +574,9 @@
553574
<property name="decimals">
554575
<number>6</number>
555576
</property>
577+
<property name="minimum">
578+
<double>-99.989999999999995</double>
579+
</property>
556580
</widget>
557581
</item>
558582
<item row="2" column="0">
@@ -567,6 +591,9 @@
567591
<property name="decimals">
568592
<number>6</number>
569593
</property>
594+
<property name="minimum">
595+
<double>-99.989999999999995</double>
596+
</property>
570597
</widget>
571598
</item>
572599
</layout>

src/Interface/Modules/Render/ES/CoreBootstrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class CoreBootstrap : public es::EmptySystem
157157

158158
// Add static world light.
159159
StaticWorldLight worldLight;
160-
worldLight.lightDir = glm::vec3(1.0f, 0.0f, 0.0f);
160+
//worldLight.lightDir = glm::vec3(1.0f, 0.0f, 0.0f);
161161
core.addStaticComponent(worldLight);
162162
core.addExemptComponent<StaticWorldLight>();
163163

src/Interface/Modules/Render/ES/SRInterface.cc

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ namespace SCIRun {
109109
// Construct ESCore. We will need to bootstrap the core. We should also
110110
// probably add utility static classes.
111111
setupCore();
112+
setupLights();
112113
}
113114

114115
//------------------------------------------------------------------------------
@@ -153,6 +154,18 @@ namespace SCIRun {
153154

154155
}
155156

157+
void SRInterface::setupLights()
158+
{
159+
//mLightPosition;
160+
mLightsOn.push_back(true);
161+
mLightPosition.push_back(glm::vec3(0, 0, 1));
162+
for (int i = 1; i < LIGHT_NUM; ++i)
163+
{
164+
mLightsOn.push_back(false);
165+
mLightPosition.push_back(glm::vec3(0, 0, 1));
166+
}
167+
}
168+
156169
//------------------------------------------------------------------------------
157170
void SRInterface::setMouseMode(MouseMode mode)
158171
{
@@ -1365,15 +1378,86 @@ namespace SCIRun {
13651378
//------------------------------------------------------------------------------
13661379
void SRInterface::updateWorldLight()
13671380
{
1381+
/*
1382+
getWorldToProjection() const;
1383+
getWorldToView() const;
1384+
getViewToWorld() const;
1385+
getViewToProjection() const;
1386+
*/
13681387
glm::mat4 viewToWorld = mCamera->getViewToWorld();
1388+
//glm::mat4 viewToWorld = mCamera->getWorldToView();
1389+
1390+
// Set directional light source (in world space).
1391+
StaticWorldLight* light = mCore.getStaticComponent<StaticWorldLight>();
1392+
if (light)
1393+
{
1394+
for (int i = 0; i < LIGHT_NUM; ++i)
1395+
{
1396+
/*
1397+
glm::vec3 viewDir = glm::vec3(0.0, 0.0, -1.0) - mLightPosition[i];
1398+
glm::vec4 newDir(viewDir.x, viewDir.y, viewDir.z, 1.0);
1399+
viewToWorld *= newDir;
1400+
glm::vec3 lightDir = viewToWorld[4].xyz();
1401+
*/
1402+
1403+
glm::vec3 viewDir = viewToWorld[2].xyz();
1404+
viewDir = -viewDir; // Cameras look down -Z.
1405+
light->lightDir[i] = mLightsOn[i] ? viewDir - mLightPosition[i] : glm::vec3(0.0, 0.0, 0.0);
1406+
//light->lightDir[i] = mLightsOn[i] ? lightDir : glm::vec3(0.0, 0.0, 0.0);
1407+
}
1408+
}
1409+
}
1410+
1411+
void SRInterface::setLightColor(int index, float r, float g, float b)
1412+
{
1413+
if (index >= LIGHT_NUM)
1414+
return;
1415+
StaticWorldLight* light = mCore.getStaticComponent<StaticWorldLight>();
1416+
if (light)
1417+
{
1418+
light->lightColor[index] = glm::vec3(r, g, b);
1419+
}
1420+
}
1421+
1422+
1423+
void SRInterface::setLightPosition(int index, float x, float y)
1424+
{
1425+
if (index >= LIGHT_NUM)
1426+
return;
13691427

1428+
glm::mat4 viewToWorld = mCamera->getViewToWorld();
1429+
glm::vec3 position = glm::vec3(x, y, 0);
1430+
if (mLightPosition.size() > 0)
1431+
{
1432+
mLightPosition[index] = glm::vec3(x, y, 0.0);
1433+
}
1434+
/*
13701435
// Set directional light source (in world space).
13711436
StaticWorldLight* light = mCore.getStaticComponent<StaticWorldLight>();
13721437
if (light)
13731438
{
13741439
glm::vec3 viewDir = viewToWorld[2].xyz();
1375-
viewDir = -viewDir; // Cameras look down -Z.
1376-
light->lightDir = viewDir;
1440+
viewDir = -viewDir; // Cameras look down -Z.
1441+
light->lightDir[index] = mLightsOn[index] ? viewDir-position : glm::vec3(0.0, 0.0, 0.0);
1442+
1443+
glm::vec3 view1 = viewToWorld[0].xyz();
1444+
glm::vec3 view2 = viewToWorld[1].xyz();
1445+
glm::vec3 view4 = viewToWorld[3].xyz();
1446+
std::cout << "size: " << viewToWorld.length() << std::endl;
1447+
std::cout << "view1x: " << view1.x << " view1y: " << view1.y << " view1z: " << view1.z << std::endl;
1448+
std::cout << "view2x: " << view2.x << " view2y: " << view2.y << " view2z: " << view2.z << std::endl;
1449+
std::cout << "view3x: " << viewDir.x << " view3y: " << viewDir.y << " view3z: " << viewDir.z << std::endl;
1450+
std::cout << "view4x: " << view4.x << " view4y: " << view4.y << " view4z: " << view4.z << std::endl;
1451+
std::cout << "x: " << x << " y: " << y << " z: " << 0 << std::endl;
1452+
}
1453+
*/
1454+
}
1455+
1456+
void SRInterface::setLightOn(int index, bool value)
1457+
{
1458+
if (mLightsOn.size() > 0 && index < LIGHT_NUM)
1459+
{
1460+
mLightsOn[index] = value;
13771461
}
13781462
}
13791463

0 commit comments

Comments
 (0)