-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
levelset: surface smoothing #461
Conversation
b3817e5
to
d4da8ee
Compare
Since it's still a draft, I've only made some random comments without actually testing the changes. |
df82ab6
to
b3d50c9
Compare
I changed function
to allow the user to modify the surface smoothing order of object LevelSetSegmentationObject after its creation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've still two main concerns:
- I don't see any documentation of how the high order smoothing is evaluated. Did I miss it or it's not there yet?
- I don't understand how the code for updating cell cache could still work if fillCellGeometricNarrowBandLocationCache can return an UNKNOWN location for cells inside the narrow band.
b3d50c9
to
7c98677
Compare
Rebased to the current master |
7c98677
to
4040cdd
Compare
I added a detailed documentation for functions "evalHighOrderProjectionOnLine" and "evalHighOrderProjectionOnTriangle". |
I'm answering to the question of @andrea-iob about why I removed the assert from function
Let's have a look at one of the new integration tests I've added which is not working without removing the assert. The test is the following:
In this case the size of the narrow band is zero. Thus, function "fillCellGeometricNarrowBandLocationCache" finds valoid cell support only for intersected cells. For the rest returns an UNKNOWN location:
However, when a smoothed geometry is used, there are cells like the one with id=2824 which are intersected by the discretized geometry but not by the smoothed geometry. These cells have a valid cell support, so the function continues its process by checking if the location is NARROW_BAND_INTERSECTED or NARROW_BAND_DISTANCE in line
Cells like the one mentioned above don't belong to any of these two categories meaning that the assert that follows will throw an error. By removing the assert, the code still functions normally, because the location of these cells is declared later in function "fillCartesianCellZoneCache". Either these cells are neighboring the narrow band and detected in line
or belong to the bulk and are detected in line
More specifically, cell 2824 belongs to the second category. Consequently, the removal of the assert is necessary and does not harm the code. |
Ok. Let's avoid caching unknown cell locations (like we already do in
|
If you address the last two comments the pull request can be merged. |
This assert may return false alarm when high order surface smoothing is used. Function fillCellGeometricNarrowBandLocationCache cannot prevent all the unknown locations in the early return part.
4040cdd
to
db57bd5
Compare
Done |
Should I squash the commits before merging? |
Keep the commits separate. |
This pull request introduces a new tool which smooths out a discretized surface (polygon or polyhedral). The smoothed surface is continuous and is equipped with a continuous normal. Also, it passes form the discretized geometry's vertices and respects the normal vectors corresponding to each vertex. The new level set computes the projection point and normal based on the new continuous surface.
This pull request completes task IMM-770.