Skip to content

Commit 4039b2a

Browse files
committed
Merge branch 'master' into pythonSetData
2 parents cf1e4ea + 1e2700b commit 4039b2a

File tree

11 files changed

+1109
-64
lines changed

11 files changed

+1109
-64
lines changed

src/ExampleNets/regression/convert_mesh2pointcloud.srn5

Lines changed: 785 additions & 0 deletions
Large diffs are not rendered by default.

src/Interface/Modules/Fields/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ SET(Interface_Modules_Fields_FORMS
5252
calculatedistancetofieldboundary.ui #TODO: fix case
5353
MapFieldDataOntoElems.ui
5454
ConvertIndicesToFieldData.ui
55+
ConvertMeshToPointCloudDialog.ui
5556
MapFieldDataOntoNodes.ui
5657
ClipFieldByFunction.ui
5758
GenerateSinglePointProbeFromField.ui
@@ -97,6 +98,7 @@ SET(Interface_Modules_Fields_HEADERS
9798
ClipFieldByFunctionDialog.h
9899
RefineMeshDialog.h
99100
ConvertFieldBasisDialog.h
101+
ConvertMeshToPointCloudDialog.h
100102
share.h
101103
SwapFieldDataWithMatrixEntriesDialog.h
102104
EditMeshBoundingBoxDialog.h
@@ -142,6 +144,7 @@ SET(Interface_Modules_Fields_SOURCES
142144
RefineMeshDialog.cc
143145
EditMeshBoundingBoxDialog.cc
144146
ConvertIndicesToFieldDataDialog.cc
147+
ConvertMeshToPointCloudDialog.cc
145148
ExtractSimpleIsosurfaceDialog.cc
146149
RegisterWithCorrespondencesDialog.cc
147150
GeneratePointSamplesFromFieldDialog.cc
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2015 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/Fields/ConvertMeshToPointCloudDialog.h>
30+
#include <Core/Algorithms/Base/AlgorithmVariableNames.h>
31+
#include <Core/Algorithms/Legacy/Fields/ConvertMeshType/ConvertMeshToPointCloudMeshAlgo.h>
32+
#include <Dataflow/Network/ModuleStateInterface.h>
33+
#include <QtGui>
34+
35+
using namespace SCIRun::Gui;
36+
using namespace SCIRun::Dataflow::Networks;
37+
using namespace SCIRun::Core::Algorithms;
38+
39+
ConvertMeshToPointCloudDialog::ConvertMeshToPointCloudDialog(const std::string& name, ModuleStateHandle state,
40+
QWidget* parent/* = 0*/)
41+
: ModuleDialogGeneric(state, parent)
42+
{
43+
setupUi(this);
44+
setWindowTitle(QString::fromStdString(name));
45+
fixSize();
46+
47+
streamlineMethod_.insert(StringPair("Extract Node Locations", "node"));
48+
streamlineMethod_.insert(StringPair("Extract Data Locations", "data"));
49+
50+
addComboBoxManager(option_, Fields::ConvertMeshToPointCloudMeshAlgo::Location,streamlineMethod_);
51+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
For more information, please see: http://software.sci.utah.edu
3+
4+
The MIT License
5+
6+
Copyright (c) 2015 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_FIELDS_ConvertMeshToPointCloudDIALOG_H
30+
#define INTERFACE_MODULES_FIELDS_ConvertMeshToPointCloudDIALOG_H 1
31+
32+
#include "Interface/Modules/Fields/ui_ConvertMeshToPointCloudDialog.h"
33+
#include <Interface/Modules/Base/ModuleDialogGeneric.h>
34+
#include <Interface/Modules/Fields/share.h>
35+
36+
namespace SCIRun {
37+
namespace Gui {
38+
class SCISHARE ConvertMeshToPointCloudDialog : public ModuleDialogGeneric,
39+
public Ui::ConvertMeshToPointCloudDialog
40+
{
41+
Q_OBJECT
42+
43+
public:
44+
ConvertMeshToPointCloudDialog(const std::string& name,
45+
SCIRun::Dataflow::Networks::ModuleStateHandle
46+
state, QWidget* parent = 0);
47+
private:
48+
GuiStringTranslationMap streamlineMethod_;
49+
};
50+
}
51+
}
52+
53+
#endif
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>ConvertMeshToPointCloudDialog</class>
4+
<widget class="QDialog" name="ConvertMeshToPointCloudDialog">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>250</width>
10+
<height>150</height>
11+
</rect>
12+
</property>
13+
<property name="minimumSize">
14+
<size>
15+
<width>250</width>
16+
<height>150</height>
17+
</size>
18+
</property>
19+
<property name="windowTitle">
20+
<string>ConvertMeshToPointCloud</string>
21+
</property>
22+
<widget class="QGroupBox" name="formGroupBox">
23+
<property name="geometry">
24+
<rect>
25+
<x>20</x>
26+
<y>20</y>
27+
<width>211</width>
28+
<height>111</height>
29+
</rect>
30+
</property>
31+
<layout class="QFormLayout" name="formLayout">
32+
<property name="fieldGrowthPolicy">
33+
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
34+
</property>
35+
<property name="labelAlignment">
36+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
37+
</property>
38+
<item row="0" column="0">
39+
<spacer name="verticalSpacer">
40+
<property name="orientation">
41+
<enum>Qt::Vertical</enum>
42+
</property>
43+
<property name="sizeHint" stdset="0">
44+
<size>
45+
<width>20</width>
46+
<height>10</height>
47+
</size>
48+
</property>
49+
</spacer>
50+
</item>
51+
<item row="1" column="0">
52+
<widget class="QLabel" name="label">
53+
<property name="text">
54+
<string>Locations to Extract</string>
55+
</property>
56+
</widget>
57+
</item>
58+
<item row="2" column="0">
59+
<widget class="QComboBox" name="option_">
60+
<property name="mouseTracking">
61+
<bool>false</bool>
62+
</property>
63+
<property name="focusPolicy">
64+
<enum>Qt::WheelFocus</enum>
65+
</property>
66+
<property name="currentIndex">
67+
<number>0</number>
68+
</property>
69+
<property name="frame">
70+
<bool>true</bool>
71+
</property>
72+
<item>
73+
<property name="text">
74+
<string>Extract Node Locations</string>
75+
</property>
76+
</item>
77+
<item>
78+
<property name="text">
79+
<string>Extract Data Locations</string>
80+
</property>
81+
</item>
82+
</widget>
83+
</item>
84+
</layout>
85+
</widget>
86+
</widget>
87+
<layoutdefault spacing="6" margin="11"/>
88+
<resources/>
89+
<connections/>
90+
</ui>

src/Interface/Modules/Fields/registerwithcorrespondences.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
</rect>
4848
</property>
4949
<layout class="QFormLayout" name="formLayout">
50+
<property name="labelAlignment">
51+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
52+
</property>
5053
<item row="1" column="0">
5154
<widget class="QRadioButton" name="morphRadioButton_">
5255
<property name="text">

src/Interface/Modules/Math/ReportMatrixSliceMeasureDialog.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@
3434
#include <Interface/Modules/Math/share.h>
3535

3636
namespace SCIRun {
37-
namespace Gui {
38-
class SCISHARE ReportMatrixSliceMeasureDialog : public ModuleDialogGeneric,
39-
public Ui::ReportMatrixSliceMeasureDialog
40-
{
41-
Q_OBJECT
42-
43-
public:
44-
ReportMatrixSliceMeasureDialog(const std::string& name,
45-
SCIRun::Dataflow::Networks::ModuleStateHandle state,
46-
QWidget* parent = 0);
47-
};
48-
}
37+
namespace Gui {
38+
class SCISHARE ReportMatrixSliceMeasureDialog : public ModuleDialogGeneric,
39+
public Ui::ReportMatrixSliceMeasureDialog
40+
{
41+
Q_OBJECT
42+
43+
public:
44+
ReportMatrixSliceMeasureDialog(const std::string& name,
45+
SCIRun::Dataflow::Networks::ModuleStateHandle state,
46+
QWidget* parent = 0);
47+
};
48+
}
4949
}
5050

5151
#endif
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"module": {
3+
"name": "ConvertMeshToPointCloud",
4+
"namespace": "Fields",
5+
"status": "Ported module",
6+
"description": "Converts a mesh to a point cloud.",
7+
"header": "Modules/Legacy/Fields/ConvertMeshToPointCloud.h"
8+
},
9+
"algorithm": {
10+
"name": "ConvertMeshToPointCloudMeshAlgo",
11+
"namespace": "Fields",
12+
"header": "Core/Algorithms/Legacy/Fields/ConvertMeshType/ConvertMeshToPointCloudMeshAlgo.h"
13+
},
14+
"UI": {
15+
"name": "ConvertMeshToPointCloudDialog",
16+
"header": "Interface/Modules/Fields/ConvertMeshToPointCloudDialog.h"
17+
}
18+
}

src/Modules/Legacy/Fields/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ SET(Modules_Legacy_Fields_HEADERS
5353
ClipFieldByFunction3.h
5454
ClipFieldByMesh.h
5555
ConvertQuadSurfToTriSurf.h
56+
ConvertMeshToPointCloud.h
5657
AlignMeshBoundingBoxes.h
5758
SetFieldNodes.h
5859
SetFieldData.h
@@ -159,7 +160,7 @@ SET(Modules_Legacy_Fields_SRCS
159160
GeneratePointSamplesFromField.cc
160161
#SelectFieldROIWithBoxWidget.cc
161162
SetFieldOrMeshStringProperty.cc
162-
#ConvertMeshToPointCloud.cc
163+
ConvertMeshToPointCloud.cc
163164
#ConvertMeshToIrregularMesh.cc
164165
#ConvertMeshToUnstructuredMesh.cc
165166
CalculateFieldData5.cc

0 commit comments

Comments
 (0)