Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Boeckel
iMSTK
Commits
88112631
Commit
88112631
authored
3 years ago
by
Harald Scheirich
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Fix comments
parent
e0b18fc9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Filtering/imstkSurfaceMeshDistanceTransform.cpp
+3
-2
3 additions, 2 deletions
Source/Filtering/imstkSurfaceMeshDistanceTransform.cpp
Source/Filtering/imstkSurfaceMeshDistanceTransform.h
+9
-8
9 additions, 8 deletions
Source/Filtering/imstkSurfaceMeshDistanceTransform.h
with
12 additions
and
10 deletions
Source/Filtering/imstkSurfaceMeshDistanceTransform.cpp
+
3
−
2
View file @
88112631
...
...
@@ -227,7 +227,7 @@ SurfaceMeshDistanceTransform::setBounds(const Vec6d& bounds)
m_Bounds
=
bounds
;
if
(
m_Bounds
.
isZero
())
{
LOG
(
WARNING
)
<<
"Bounds are zero, the image bounds will be used instead."
;
LOG
(
WARNING
)
<<
"Bounds are zero, the image bounds
+ "
<<
m_BoundsMargin
<<
"percent
will be used instead."
;
}
}
...
...
@@ -237,7 +237,7 @@ SurfaceMeshDistanceTransform::setBounds(const Vec3d& min, const Vec3d& max)
m_Bounds
<<
min
.
x
(),
max
.
x
(),
min
.
y
(),
max
.
y
(),
min
.
z
(),
max
.
z
();
if
(
m_Bounds
.
isZero
())
{
LOG
(
WARNING
)
<<
"Bounds are zero, the image bounds will be used instead."
;
LOG
(
WARNING
)
<<
"Bounds are zero, the image bounds
+ "
<<
m_BoundsMargin
<<
"percent
will be used instead."
;
}
}
...
...
@@ -268,6 +268,7 @@ SurfaceMeshDistanceTransform::requestUpdate()
Vec3d
max
;
inputSurfaceMesh
->
computeBoundingBox
(
min
,
max
,
m_BoundsMargin
);
bounds
<<
min
.
x
(),
max
.
x
(),
min
.
y
(),
max
.
y
(),
min
.
z
(),
max
.
z
();
LOG
(
WARNING
)
<<
"Bounds are zero, the image bounds + "
<<
m_BoundsMargin
<<
"percent will be used instead."
;
}
const
Vec3d
size
=
Vec3d
(
bounds
[
1
]
-
bounds
[
0
],
bounds
[
3
]
-
bounds
[
2
],
bounds
[
5
]
-
bounds
[
4
]);
...
...
This diff is collapsed.
Click to expand it.
Source/Filtering/imstkSurfaceMeshDistanceTransform.h
+
9
−
8
View file @
88112631
...
...
@@ -32,11 +32,13 @@ class SurfaceMesh;
/// \class SurfaceMeshDistanceTransform
///
/// \brief This filter computes exact signed distance fields using octrees
/// and ps
u
edonormal computations. One might need to adjust the tolerance
/// and pse
u
donormal computations. One might need to adjust the tolerance
/// depending on dataset scale.
///
/// Note that when setting the bounding box, a margin should be applied to the
/// bounds otherwise vertices or triangles on the bounds may be ignored
/// The bounds for the image can be set in the filter, when none are set
/// the bounding box of the mesh plus a small margin is used, the margin is
/// necessary to prevent issues with triangles that are parallel to the major
/// planes. When providing your own bounds a box larger than the original object
/// might be necessary depending on shape
class
SurfaceMeshDistanceTransform
:
public
GeometryAlgorithm
{
public:
...
...
@@ -71,9 +73,8 @@ public:
///@}
///
/// \brief The margin used when the bounds are not set explicit
e
ly
/// \brief The margin
in percent,
used when the bounds are not set explicitly
///
imstkSetMacro
(
BoundsMargin
,
double
);
imstkGetMacro
(
BoundsMargin
,
double
);
///
...
...
@@ -103,9 +104,9 @@ private:
Vec6d
m_Bounds
=
Vec6d
::
Zero
();
double
m_Tolerance
=
1.0e-10
;
int
m_DilateSize
=
4
;
///
>
Only for narrow banded
int
m_DilateSize
=
4
;
///
<
Only for narrow banded
bool
m_NarrowBanded
=
false
;
double
m_BoundsMargin
=
10
.0
;
double
m_BoundsMargin
=
5
.0
;
///< Margin in percent
};
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment