Skip to content

Commit 74e9e0c

Browse files
committed
Merge branch 'master' into matlabIO
2 parents 648da2f + b6efab8 commit 74e9e0c

File tree

10 files changed

+359
-0
lines changed

10 files changed

+359
-0
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<!DOCTYPE boost_serialization>
3+
<boost_serialization signature="serialization::archive" version="10">
4+
<networkFile class_id="0" tracking_level="0" version="2">
5+
<networkInfo class_id="1" tracking_level="0" version="0">
6+
<modules class_id="2" tracking_level="0" version="0">
7+
<count>2</count>
8+
<item_version>0</item_version>
9+
<item class_id="3" tracking_level="0" version="0">
10+
<first>NetworkNotes:0</first>
11+
<second class_id="4" tracking_level="0" version="0">
12+
<module class_id="5" tracking_level="0" version="0">
13+
<package_name_>SCIRun</package_name_>
14+
<category_name_>String</category_name_>
15+
<module_name_>NetworkNotes</module_name_>
16+
</module>
17+
<state class_id="6" tracking_level="0" version="0">
18+
<stateMap class_id="7" tracking_level="0" version="0">
19+
<count>1</count>
20+
<item_version>0</item_version>
21+
<item class_id="8" tracking_level="0" version="0">
22+
<first class_id="9" tracking_level="0" version="0">
23+
<name>InputString</name>
24+
</first>
25+
<second class_id="10" tracking_level="0" version="0">
26+
<name>InputString</name>
27+
<value class_id="11" tracking_level="0" version="0">
28+
<which>2</which>
29+
<value>For simple bulleted lists use the * character after a newline.
30+
1
31+
2
32+
3
33+
4</value>
34+
</value>
35+
</second>
36+
</item>
37+
</stateMap>
38+
</state>
39+
</second>
40+
</item>
41+
<item>
42+
<first>PrintDatatype:1</first>
43+
<second>
44+
<module>
45+
<package_name_>SCIRun</package_name_>
46+
<category_name_>DataIO</category_name_>
47+
<module_name_>PrintDatatype</module_name_>
48+
</module>
49+
<state>
50+
<stateMap>
51+
<count>0</count>
52+
<item_version>0</item_version>
53+
</stateMap>
54+
</state>
55+
</second>
56+
</item>
57+
</modules>
58+
<connections class_id="12" tracking_level="0" version="0">
59+
<count>1</count>
60+
<item_version>0</item_version>
61+
<item class_id="13" tracking_level="0" version="0">
62+
<moduleId1_>NetworkNotes:0</moduleId1_>
63+
<port1_ class_id="14" tracking_level="0" version="0">
64+
<name>NewString</name>
65+
<id>0</id>
66+
</port1_>
67+
<moduleId2_>PrintDatatype:1</moduleId2_>
68+
<port2_>
69+
<name>Input</name>
70+
<id>0</id>
71+
</port2_>
72+
</item>
73+
</connections>
74+
</networkInfo>
75+
<modulePositions class_id="15" tracking_level="0" version="0">
76+
<count>2</count>
77+
<item_version>0</item_version>
78+
<item class_id="16" tracking_level="0" version="0">
79+
<first>NetworkNotes:0</first>
80+
<second class_id="17" tracking_level="0" version="0">
81+
<first>-684</first>
82+
<second>-760</second>
83+
</second>
84+
</item>
85+
<item>
86+
<first>PrintDatatype:1</first>
87+
<second>
88+
<first>-684</first>
89+
<second>-608</second>
90+
</second>
91+
</item>
92+
</modulePositions>
93+
<moduleNotes class_id="18" tracking_level="0" version="0">
94+
<count>0</count>
95+
<item_version>0</item_version>
96+
</moduleNotes>
97+
<connectionNotes>
98+
<count>0</count>
99+
<item_version>0</item_version>
100+
</connectionNotes>
101+
</networkFile>
102+
</boost_serialization>
103+

src/Interface/Modules/Factory/ModuleDialogFactory.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <Interface/Modules/Math/ConvertMatrixTypeDialog.h>
4646
#include <Interface/Modules/Math/GetMatrixSliceDialog.h>
4747
#include <Interface/Modules/String/CreateStringDialog.h>
48+
#include <Interface/Modules/String/NetworkNotesDialog.h>
4849
#include <Interface/Modules/String/PrintDatatypeDialog.h>
4950
#include <Interface/Modules/Fields/CreateLatVolDialog.h>
5051
#include <Interface/Modules/Fields/GetDomainBoundaryDialog.h>
@@ -107,6 +108,7 @@ void ModuleDialogFactory::addDialogsToMakerMap1()
107108
ADD_MODULE_DIALOG(AppendMatrix, AppendMatrixDialog)
108109
ADD_MODULE_DIALOG(CreateMatrix, CreateMatrixDialog)
109110
ADD_MODULE_DIALOG(CreateString, CreateStringDialog)
111+
ADD_MODULE_DIALOG(NetworkNotes, NetworkNotesDialog)
110112
ADD_MODULE_DIALOG(PrintDatatype, PrintDatatypeDialog)
111113
ADD_MODULE_DIALOG(ReportMatrixInfo, ReportMatrixInfoDialog)
112114
ADD_MODULE_DIALOG(ReportFieldInfo, ReportFieldInfoDialog)

src/Interface/Modules/String/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@
3030
SET(Interface_Modules_String_FORMS
3131
CreateString.ui
3232
PrintDatatypeDialog.ui
33+
NetworkNotes.ui
3334
)
3435

3536
SET(Interface_Modules_String_HEADERS
3637
share.h
3738
CreateStringDialog.h
3839
PrintDatatypeDialog.h
40+
NetworkNotesDialog.h
3941
)
4042

4143
SET(Interface_Modules_String_SOURCES
4244
CreateStringDialog.cc
4345
PrintDatatypeDialog.cc
46+
NetworkNotesDialog.cc
4447
)
4548

4649
QT4_WRAP_UI(Interface_Modules_String_FORMS_HEADERS ${Interface_Modules_String_FORMS})
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>NetworkNotes</class>
4+
<widget class="QDialog" name="NetworkNotes">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>400</width>
10+
<height>300</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>Dialog</string>
15+
</property>
16+
<layout class="QHBoxLayout" name="horizontalLayout">
17+
<item>
18+
<widget class="QTextEdit" name="networkNotesTextEdit_">
19+
<property name="autoFormatting">
20+
<set>QTextEdit::AutoAll</set>
21+
</property>
22+
</widget>
23+
</item>
24+
</layout>
25+
</widget>
26+
<resources/>
27+
<connections/>
28+
</ui>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2012 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/String/NetworkNotesDialog.h>
30+
#include <Modules/String/NetworkNotes.h>
31+
32+
using namespace SCIRun::Gui;
33+
using namespace SCIRun::Dataflow::Networks;
34+
using namespace SCIRun::Modules::StringProcessing;
35+
36+
NetworkNotesDialog::NetworkNotesDialog(const std::string& name, ModuleStateHandle state,
37+
QWidget* parent /* = 0 */)
38+
: ModuleDialogGeneric(state, parent)
39+
{
40+
setupUi(this);
41+
setWindowTitle(QString::fromStdString(name));
42+
fixSize();
43+
44+
addTextEditManager(networkNotesTextEdit_, NetworkNotesModule::InputString);
45+
}
46+
47+
void NetworkNotesDialog::pull()
48+
{
49+
pull_newVersionToReplaceOld();
50+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2012 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_NETWORK_NOTES_H
30+
#define INTERFACE_MODULES_NETWORK_NOTES_H
31+
32+
#include "Interface/Modules/String/ui_NetworkNotes.h"
33+
#include <Interface/Modules/Base/ModuleDialogGeneric.h>
34+
#include <Interface/Modules/String/share.h>
35+
36+
namespace SCIRun {
37+
namespace Gui {
38+
39+
class SCISHARE NetworkNotesDialog : public ModuleDialogGeneric,
40+
public Ui::NetworkNotes
41+
{
42+
Q_OBJECT
43+
44+
public:
45+
NetworkNotesDialog(const std::string& name,
46+
SCIRun::Dataflow::Networks::ModuleStateHandle state,
47+
QWidget* parent = 0);
48+
virtual void pull();
49+
};
50+
51+
}
52+
}
53+
54+
#endif

src/Modules/Factory/ModuleFactoryImpl1.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ DEALINGS IN THE SOFTWARE.
8080
#include <Modules/DataIO/ReadField.h>
8181
#include <Modules/DataIO/WriteField.h>
8282
#include <Modules/String/CreateString.h>
83+
#include <Modules/String/NetworkNotes.h>
8384
#include <Modules/Visualization/ShowString.h>
8485
#include <Modules/Visualization/ShowField.h>
8586
#include <Modules/Visualization/CreateBasicColorMap.h>
@@ -118,6 +119,7 @@ void ModuleDescriptionLookup::addEssentialModules()
118119
addModuleDesc<CreateMatrixModule>("CreateMatrix", "Math", "SCIRun", "Functional, needs GUI work.", "...");
119120
addModuleDesc<SolveLinearSystemModule>("SolveLinearSystem", "Math", "SCIRun", "Four multi-threaded algorithms available.", "...");
120121
addModuleDesc<CreateStringModule>("CreateString", "String", "SCIRun", "Functional, needs GUI work.", "...");
122+
addModuleDesc<NetworkNotesModule>("NetworkNotes", "String", "SCIRun", "Functional, needs GUI work.", "...");
121123
//addModuleDesc<ShowStringModule>("ShowString", "String", "SCIRun", "...", "...");
122124
addModuleDesc<ShowFieldModule>("Some basic options available, still work in progress.", "...");
123125
addModuleDesc<CreateLatVol>("CreateLatVol", "NewField", "SCIRun", "Official ported v4 module.", "...");

src/Modules/String/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828

2929
SET(Modules_String_SRCS
3030
CreateString.cc
31+
NetworkNotes.cc
3132
)
3233

3334
SET(Modules_String_HEADERS
3435
CreateString.h
36+
NetworkNotes.h
3537
share.h
3638
)
3739

src/Modules/String/NetworkNotes.cc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2012 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+
/// @todo Documentation Modules/String/CreateString.cc
30+
31+
#include <iostream>
32+
#include <Modules/String/NetworkNotes.h>
33+
#include <Core/Datatypes/String.h>
34+
35+
using namespace SCIRun::Modules::StringProcessing;
36+
using namespace SCIRun::Core::Datatypes;
37+
using namespace SCIRun::Dataflow::Networks;
38+
using namespace SCIRun::Core::Algorithms;
39+
40+
AlgorithmParameterName NetworkNotesModule::InputString("InputString");
41+
42+
NetworkNotesModule::NetworkNotesModule() : Module(ModuleLookupInfo("NetworkNotes", "String", "SCIRun"))
43+
{
44+
INITIALIZE_PORT(NewString);
45+
}
46+
47+
void NetworkNotesModule::setStateDefaults()
48+
{
49+
auto state = get_state();
50+
state->setValue(InputString, std::string());
51+
}
52+
53+
void NetworkNotesModule::execute()
54+
{
55+
stringValue_ = get_state()->getValue(InputString).toString();
56+
57+
sendOutput(NewString, boost::make_shared<String>(stringValue_));
58+
}

0 commit comments

Comments
 (0)