Skip to content

Commit c67b83d

Browse files
committed
fixing link errors and algorithm
1 parent 73035b8 commit c67b83d

File tree

6 files changed

+41
-31
lines changed

6 files changed

+41
-31
lines changed

src/Core/Algorithms/Legacy/Fields/CreateMesh/ConvertMatricesToMeshAlgo.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ using namespace SCIRun::Core::Algorithms::Fields::Parameters;
4646
using namespace SCIRun::Core::Datatypes;
4747
using namespace SCIRun;
4848

49-
ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeName)
50-
ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeTypeName)
51-
ALGORITHM_PARAMETER_DEF(Fields, OutputMeshDataType)
52-
ALGORITHM_PARAMETER_DEF(Fields, OutputFieldDatatype)
49+
//ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeName)
50+
//ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeTypeName)
51+
//ALGORITHM_PARAMETER_DEF(Fields, OutputMeshDataType)
52+
//ALGORITHM_PARAMETER_DEF(Fields, OutputFieldDatatype)
5353

5454
ConvertMatricesToMeshAlgo::ConvertMatricesToMeshAlgo()
5555
{
56-
add_option(Parameters::OutputMeshDataType, "TetVol", "Curve|HexVol|PointCloud|PrismVol|QuadSurf|TetVol|TriSurf");
57-
add_option(Parameters::OutputFieldDataType, "double", "unsigned char|unsigned short|unsigned int|char|short|int|float|double|Vector|Tensor");
56+
//add_option(Parameters::OutputMeshDataType, "TetVol", "Curve|HexVol|PointCloud|PrismVol|QuadSurf|TetVol|TriSurf");
57+
//add_option(Parameters::OutputFieldDataType, "double", "unsigned char|unsigned short|unsigned int|char|short|int|float|double|Vector|Tensor");
5858
}
5959

6060
bool

src/Core/Algorithms/Legacy/Fields/CreateMesh/ConvertMatricesToMeshAlgo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ namespace SCIRun {
3838
namespace Algorithms {
3939
namespace Fields {
4040

41-
ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeName);
42-
ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeTypeName);
43-
ALGORITHM_PARAMETER_DEF(Fields, OutputMeshDataType);
44-
ALGORITHM_PARAMETER_DEF(Fields, OutputFieldDatatype);
41+
//ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeName);
42+
//ALGORITHM_PARAMETER_DEF(Fields, InputFieldTypeTypeName);
43+
//ALGORITHM_PARAMETER_DEF(Fields, OutputMeshDataType);
44+
//ALGORITHM_PARAMETER_DEF(Fields, OutputFieldDatatype);
4545

4646
class SCISHARE ConvertMatricesToMeshAlgo : public AlgorithmBase
4747
{

src/Interface/Modules/Fields/ConvertMatricesToMesh.ui

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</widget>
7272
</item>
7373
<item row="0" column="1">
74-
<widget class="QComboBox" name="meshTypeComboBox_">
74+
<widget class="QComboBox" name="fieldBaseTypeComboBox_">
7575
<property name="currentIndex">
7676
<number>5</number>
7777
</property>
@@ -113,9 +113,6 @@
113113
</widget>
114114
</item>
115115
</layout>
116-
<zorder>inputFieldTypeGroupBox_</zorder>
117-
<zorder>label_5</zorder>
118-
<zorder>meshTypeComboBox_</zorder>
119116
</widget>
120117
</item>
121118
<item>
@@ -132,7 +129,7 @@
132129
</widget>
133130
</item>
134131
<item row="0" column="1">
135-
<widget class="QComboBox" name="fieldTypeComboBox_">
132+
<widget class="QComboBox" name="dataTypeComboBox_">
136133
<property name="currentIndex">
137134
<number>7</number>
138135
</property>

src/Interface/Modules/Fields/ConvertMatricesToMeshDialog.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ ConvertMatricesToMeshDialog::ConvertMatricesToMeshDialog(const std::string& name
4242
setWindowTitle(QString::fromStdString(name));
4343
fixSize();
4444

45-
addDynamicLabelManager(nameTextLabel_, Parameters::InputFieldTypeName);
46-
addDynamicLabelManager(typeNameTextLabel_, Parameters::InputFieldTypeTypeName);
47-
addComboBoxManager(meshTypeComboBox_, Parameters::OutputMeshDataType);
48-
addComboBoxManager(fieldTypeComboBox_, Parameters::OutputFieldDatatype);
45+
addDynamicLabelManager(nameTextLabel_, ConvertMatricesToMesh::InputFieldTypeName);
46+
addDynamicLabelManager(typeNameTextLabel_, ConvertMatricesToMesh::InputFieldTypeTypeName);
47+
addComboBoxManager(fieldBaseTypeComboBox_, ConvertMatricesToMesh::FieldBaseType);
48+
addComboBoxManager(dataTypeComboBox_, ConvertMatricesToMesh::DataType);
4949
}

src/Modules/Legacy/Fields/ConvertMatricesToMesh.cc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
#include <Modules/Legacy/Fields/ConvertMatricesToMesh.h>
3838
#include <Core/Datatypes/Matrix.h>
39+
#include <Core/Datatypes/MatrixTypeConversions.h>
3940
#include <Core/Datatypes/Legacy/Field/Field.h>
4041
#include <Core/Datatypes/Legacy/Field/Mesh.h>
4142
#include <Core/Datatypes/Legacy/Field/FieldInformation.h>
@@ -53,20 +54,27 @@ ConvertMatricesToMesh::ConvertMatricesToMesh() : Module(staticInfo_)
5354
INITIALIZE_PORT(OutputField);
5455
}
5556

57+
void ConvertMatricesToMesh::setStateDefaults()
58+
{
59+
// auto state = get_state();
60+
//state->setValue(ApplyDirichlet, 0);
61+
}
5662

5763
void ConvertMatricesToMesh::execute()
5864
{/*
59-
MatrixHandle positionshandle;
60-
MatrixHandle normalshandle;
65+
//MatrixHandle positionshandle;
66+
//MatrixHandle normalshandle;
6167
62-
get_input_handle("Mesh Positions", positionshandle,true);
63-
if (!get_input_handle("Mesh Normals", normalshandle, false))
68+
auto positionshandle = getRequiredInput(MeshPositions);
69+
auto normalshandle = getOptionalInput(MeshNormals);
70+
//get_input_handle("Mesh Positions", positionshandle,true);
71+
72+
if (!normalshandle)
6473
{
6574
remark("No input normals connected, not used.");
6675
}
6776
68-
if (inputs_changed_ || gui_fieldbasetype_.changed() ||
69-
gui_datatype_.changed() || !oport_cached("Output Field"))
77+
if (needToExecute())
7078
{
7179
update_state(Executing);
7280
@@ -146,5 +154,5 @@ void ConvertMatricesToMesh::process_elements(VMesh* mesh, size_type positionRows
146154
{
147155
error("..." + to_string(ecount - 9) + " additional bad indices found.");
148156
}
149-
} */
157+
}*/
150158
}

src/Modules/Legacy/Fields/ConvertMatricesToMesh.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,23 @@ namespace SCIRun {
5555
public:
5656
ConvertMatricesToMesh();
5757
virtual ~ConvertMatricesToMesh() {}
58-
58+
virtual void setStateDefaults();
5959
virtual void execute();
60-
61-
private:
62-
void process_elements(SCIRun::VMesh* mesh, size_type positionRows, bool required);
63-
60+
6461
INPUT_PORT(0, MeshElements, Matrix);
6562
INPUT_PORT(1, MeshPositions, Matrix);
6663
INPUT_PORT(2, MeshNormals, Matrix);
6764
OUTPUT_PORT(0, OutputField, LegacyField);
6865

6966
static const Dataflow::Networks::ModuleLookupInfo staticInfo_;
67+
68+
static const Core::Algorithms::AlgorithmParameterName InputFieldTypeName;
69+
static const Core::Algorithms::AlgorithmParameterName InputFieldTypeTypeName;
70+
static const Core::Algorithms::AlgorithmParameterName FieldBaseType;
71+
static const Core::Algorithms::AlgorithmParameterName DataType;
72+
73+
private:
74+
void process_elements(SCIRun::VMesh* mesh, size_type positionRows, bool required);
7075
};
7176
}
7277
}

0 commit comments

Comments
 (0)