Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
16ac7272
Commit
16ac7272
authored
Jul 26, 2012
by
Stefan Philips
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] Show all three transformation matrixes as information properties
parent
e61caac6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
src/core/dataHandler/WGridRegular3D.h
src/core/dataHandler/WGridRegular3D.h
+0
-4
src/modules/data/WMData.cpp
src/modules/data/WMData.cpp
+37
-1
src/modules/data/WMData.h
src/modules/data/WMData.h
+3
-0
No files found.
src/core/dataHandler/WGridRegular3D.h
View file @
16ac7272
...
@@ -1194,10 +1194,6 @@ void WGridRegular3DTemplate< T >::initInformationProperties()
...
@@ -1194,10 +1194,6 @@ void WGridRegular3DTemplate< T >::initInformationProperties()
WPropDouble
zOffset
=
m_infoProperties
->
addProperty
(
"Z offset: "
,
WPropDouble
zOffset
=
m_infoProperties
->
addProperty
(
"Z offset: "
,
"The distance between samples in z direction"
,
"The distance between samples in z direction"
,
static_cast
<
double
>
(
getOffsetZ
()
)
);
static_cast
<
double
>
(
getOffsetZ
()
)
);
WPropMatrix4X4
transformation
=
m_infoProperties
->
addProperty
(
"Transformation"
,
"The transformation of this grid."
,
static_cast
<
WMatrix4d
>
(
getTransform
()
)
);
}
}
// +----------------------+
// +----------------------+
...
...
src/modules/data/WMData.cpp
View file @
16ac7272
...
@@ -288,7 +288,8 @@ void WMData::moduleMain()
...
@@ -288,7 +288,8 @@ void WMData::moduleMain()
// register the dataset properties
// register the dataset properties
m_properties
->
addProperty
(
m_dataSet
->
getProperties
()
);
m_properties
->
addProperty
(
m_dataSet
->
getProperties
()
);
m_infoProperties
->
addProperty
(
m_dataSet
->
getInformationProperties
()
);
m_infoProperties
->
addProperty
(
m_dataSet
->
getInformationProperties
()
);
m_infoProperties
->
addProperty
(
getTransformationProperties
()
);
// I am interested in the active property ( manually subscribe signal )
// I am interested in the active property ( manually subscribe signal )
m_active
->
getCondition
()
->
subscribeSignal
(
boost
::
bind
(
&
WMData
::
propertyChanged
,
this
,
m_active
)
);
m_active
->
getCondition
()
->
subscribeSignal
(
boost
::
bind
(
&
WMData
::
propertyChanged
,
this
,
m_active
)
);
...
@@ -450,3 +451,38 @@ std::string WMData::getDataTypeString( boost::shared_ptr< WDataSetSingle > dss )
...
@@ -450,3 +451,38 @@ std::string WMData::getDataTypeString( boost::shared_ptr< WDataSetSingle > dss )
return
result
;
return
result
;
}
}
namespace
{
// helper which gets a WMatrix< double > and returns a WMatrix4d
WMatrix4d
WMatrixDoubleToWMatrix4d
(
const
WMatrix
<
double
>&
matrix
)
{
WAssert
(
matrix
.
getNbRows
()
==
4
,
""
);
WAssert
(
matrix
.
getNbCols
()
==
4
,
""
);
WMatrix4d
result
;
for
(
size_t
i
=
0
;
i
<
4
;
++
i
)
{
for
(
size_t
j
=
0
;
j
<
4
;
++
j
)
{
result
(
i
,
j
)
=
matrix
(
i
,
j
);
}
}
return
result
;
}
}
boost
::
shared_ptr
<
WProperties
>
WMData
::
getTransformationProperties
()
const
{
boost
::
shared_ptr
<
WProperties
>
result
(
new
WProperties
(
"Transformations"
,
"Availabe transformation matrices for data-set "
)
);
WPropGroup
transformation
=
result
->
addPropertyGroup
(
"Transformation"
,
"The transformation of this grid."
);
WPropMatrix4X4
noMatrixTransformation
=
result
->
addProperty
(
"No matrix transformation"
,
"The no matrix transformation for this data set."
,
WMatrixDoubleToWMatrix4d
(
m_transformNoMatrix
)
);
WPropMatrix4X4
sformMatrixTransformation
=
result
->
addProperty
(
"sform matrix transformation"
,
"The sform matrix transformation for this data set."
,
WMatrixDoubleToWMatrix4d
(
m_transformSForm
)
);
WPropMatrix4X4
qformMatrixTransformation
=
result
->
addProperty
(
"qform matrix transformation"
,
"The qform matrix transformation for this data set."
,
WMatrixDoubleToWMatrix4d
(
m_transformQForm
)
);
return
result
;
}
src/modules/data/WMData.h
View file @
16ac7272
...
@@ -177,6 +177,9 @@ protected:
...
@@ -177,6 +177,9 @@ protected:
WMatrix
<
double
>
m_transformQForm
;
WMatrix
<
double
>
m_transformQForm
;
private:
private:
//! returns info property group with the three availabe transformation matrixes
boost
::
shared_ptr
<
WProperties
>
getTransformationProperties
()
const
;
//! a condition for the matrix selection
//! a condition for the matrix selection
boost
::
shared_ptr
<
WCondition
>
m_propCondition
;
boost
::
shared_ptr
<
WCondition
>
m_propCondition
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment