-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix issue #40. Edited meshing module 2-8 pages. #41
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,147 @@ | ||
= The Center line Editing Graphical Tool | ||
|
||
The Centerline Editing Graphical Tool's (CEGT) purpose is to assist the user in centerlines creation and edition. | ||
At this time (november 2016), it essentially remains a manual task, and a critical step in the pipeline (see the Center lines definition section in link:Meshing_Module_Description.adoc[the Meshing Module Description page].) | ||
The Centerline Editing Graphical Tool's (CEGT) purpose is to assist the user in | ||
centerlines creation and edition. | ||
At this time (November 2016), it essentially remains a manual task, and a | ||
critical step in the pipeline (see the Center lines definition section in | ||
xref:Meshing_Module_Description.adoc[the Meshing Module Description page].) | ||
|
||
== Overview | ||
|
||
Although the CEGT is started using command line (and outputs useful messages there too), all operations are performed in its GUI (graphical user interface.) | ||
Although the CEGT is started using command line (and outputs useful messages | ||
there too), all operations are performed in its GUI (graphical user interface.) | ||
|
||
The user is presented with the initial blood vessels mesh generated in the previous step. | ||
The user is presented with the initial blood vessels mesh generated in the | ||
previous step. | ||
|
||
The goal is to define center lines for each vein/artery. | ||
To define a center line, the user has to define key points along the desired center line, and pair them along the way, in order to create a polygonal chain through the blood vessel. | ||
To define a center line, the user has to define key points along the desired | ||
center line, and pair them along the way, in order to create a polygonal chain | ||
through the blood vessel. | ||
|
||
During this process, the user also adjusts the radius of the inscribed sphere for each key point. | ||
During this process, the user also adjusts the radius of the inscribed sphere | ||
for each key point. | ||
|
||
When all the center lines keypoints are well defined, the next pipeline module generates the center lines and carries on automatically. | ||
When all the center lines keypoints are well defined, the next pipeline module | ||
generates the center lines and carries on automatically. | ||
|
||
== Starting command line | ||
|
||
The CEGT is located in `$INSTALL/Modules/Meshing/bin/meshing_centerlinesmanagergui`. | ||
An optional but helping first step is to export all environment variables using the appropriate supplied bash script located at `$INSTALL/bin/setupAngioTKEnvironment.sh.` | ||
The CEGT is located in | ||
`$INSTALL/Modules/Meshing/bin/meshing_centerlinesmanagergui`. | ||
An optional but helping first step is to export all environment variables | ||
using the appropriate supplied bash script located at | ||
`$INSTALL/bin/setupAngioTKEnvironment.sh.` | ||
|
||
Here again,`INSTALL` refers to the path where AngioTK was installed (see link:Building.adoc[the building page]) | ||
Here again,`INSTALL` refers to the path where AngioTK was installed | ||
(see xref:Building.adoc[the building page]) | ||
|
||
Simply run this command or put it in your `.bashrc` (which is more convenient for repeated use). | ||
Run the following command or add it to `$HOME/.bashrc` | ||
|
||
`source $INSTALL/bin/setupAngioTKEnvironment.sh` | ||
[source, sh] | ||
---- | ||
source $INSTALL/bin/setupAngioTKEnvironment.sh | ||
---- | ||
|
||
Now, the exectutable `meshing_centerlinesmanagergui` can be launched directly. | ||
|
||
The arguments to provide are: | ||
|
||
- `--input.surface.path` (mandatory) specifies the surface file to work on. | ||
- `--input.point-pair.path` (optional) specifies the point pairs file (typically: previously saved work) | ||
- `--input.point-pair.path` (optional) specifies the point pairs file | ||
(typically: previously saved work) | ||
|
||
Thus, the typical command shoud be: | ||
Thus, the typical command reads: | ||
|
||
`meshing_centerlinesmanagergui --input.surface.path model.stl --input.point-pair.path pointpair.data` | ||
[source, sh] | ||
---- | ||
meshing_centerlinesmanagergui \ | ||
--input.surface.path model.stl \ | ||
--input.point-pair.path pointpair.data | ||
---- | ||
|
||
for example, using the provided Phantom example: | ||
|
||
`meshing_centerlinesmanagergui --input.surface.path Phantom/angiotk/surfacefromimage/model.stl --input.point-pair.path pointpair.data` | ||
[source, sh] | ||
---- | ||
meshing_centerlinesmanagergui \ | ||
--input.surface.path Phantom/angiotk/surfacefromimage/model.stl \ | ||
--input.point-pair.path pointpair.data | ||
---- | ||
|
||
IMPORTANT: when no point-pair file is specified, saving your progress will result is creation of two files: `<home>/feel/meshing_centerlinesmanagergui/np_1/<model-name>_pointpair.data` | ||
IMPORTANT: Saving your progress will result in the creation of two files: | ||
`<home>/feel/meshing_centerlinesmanagergui/np_1/<model-name>_pointpair.data` | ||
`<home>/feel/meshing_centerlinesmanagergui/np_1/<model-name>_pointset.data` | ||
*This means that your original file will NOT be modified, unless you manually | ||
replace it!* | ||
|
||
|
||
== Recommended workflow | ||
|
||
At this time (May 2016), center line generation is completely dependent and very sensitive to the provided pointsets. | ||
Therefore, a cautious stepwise workflow is strongly advised, and you should frequently check you progress with the center line generator and ParaView: | ||
At this time (May 2016), center line generation is completely dependent and very | ||
sensitive to the provided pointsets. | ||
Therefore, a cautious stepwise workflow is strongly advised, and you should | ||
frequently check you progress with the center line generator and ParaView: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check your progress with the centerline generator and ParaView |
||
|
||
- (optional) Prepare 2 different terminals, one for the CEGT, one for the center line generator. | ||
- (optional) Prepare 2 different terminals, one for the CEGT, one for the | ||
center line generator. | ||
|
||
=== In the center line editing graphical tool | ||
- Start the GUI in one terminal | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest that the keys appears first in the item or make a table with 3 columns: key, description and optional/required |
||
- (optional) Press the 'h' key to display help (this should toggle an on-screen list of commands) | ||
- (optional) Press the 'h' key to display help (this should toggle an on-screen | ||
list of commands) | ||
- Use click&drag to rotate the mesh around, identify a blood vessel to work on. | ||
- Press the '2' key to switch to _point insertion mode_ | ||
* Click on the mesh near the end of the chosen blood vessel. This should create a sphere which center is the key point. | ||
* Adjust the position and size of the sphere using the following keys: left/right, up/down, o/l and p/m (all of which are also visible in the on-screen help) | ||
* Press 'y' to validate the sphere parameters. To further modify these, simply click back on the sphere and proceed as if it was a newly created one. | ||
* Click on the mesh near the end of the chosen blood vessel. | ||
This should create a sphere which center is the key point. | ||
* Adjust the position and size of the sphere using the following keys: | ||
left/right, up/down, o/l and p/m (all of which are also visible in the | ||
on-screen help) | ||
* Press 'y' to validate the sphere parameters. | ||
To further modify these, simply click back on the sphere and proceed as if | ||
it was a newly created one. | ||
* To connect or disconnect two points, click on both of them and press 'd'. | ||
- After adding/connecting a few points, you should save your work by pressing 's'. This will write two files: a point-pair file a point-set file. Now you can check center line generation. | ||
- After adding/connecting a few points, you should save your work by pressing | ||
's'. | ||
This will write two files: a point-pair file a point-set file. | ||
Now you can check center line generation. | ||
|
||
=== In the center line generator | ||
|
||
- Launch the center line generator with the relevant options to test your center line definition points: | ||
|
||
`meshing_centerlines` | ||
|
||
`--input.surface.filename=model.stl` | ||
this is the model used in the CEGT. | ||
|
||
==== Command line | ||
Launch the center line generator with the relevant options to test your center | ||
line definition points: | ||
|
||
`--input.pointpair.filename=pointpair.data` | ||
use this option to use a point-pair file (recommended), or the next one to use a point-set file. | ||
[source,sh] | ||
---- | ||
meshing_centerlines \ | ||
--input.surface.filename=model.stl \ <1> | ||
--input.pointpair.filename=pointpair.data \ <2> | ||
--input.pointset.filename=pointset.data \ <3> | ||
--output.directory=<outputpath> \ <4> | ||
---- | ||
<1> This is the 3D model used in the CEGT. | ||
<2> Use a point-pair file (recommended), | ||
<3> or a point-set file. | ||
<4> Your desired output path | ||
|
||
`--input.pointset.filename=pointset.data` | ||
==== Troubleshooting | ||
|
||
`--output.directory=` | ||
your desired output path | ||
Pay attention to the following error, during the `Computing centerlines` step: | ||
|
||
- Pay attention to the following errors: | ||
* During the `Computing centerlines `step: | ||
`Warning: In /data/software/src/vmtk/vtkVmtk/ComputationalGeometry/` | ||
`vtkvmtkSteepestDescentLineTracer.cxx, line 240` | ||
`vtkvmtkSteepestDescentLineTracer (0x24ef850): ` | ||
`Degenerate descent detected. Target not reached.` | ||
[source,sh] | ||
---- | ||
Warning: In /data/software/src/vmtk/vtkVmtk/ComputationalGeometry/ | ||
vtkvmtkSteepestDescentLineTracer.cxx, line 240 | ||
vtkvmtkSteepestDescentLineTracer (0x24ef850): | ||
Degenerate descent detected. Target not reached. | ||
---- | ||
|
||
This means the center line is invalid and won't be used. | ||
Try changing the positions of the input points or adding more points in between. | ||
This means the center line is invalid and won't be used. | ||
Try changing the positions of the input points or adding more points in between. | ||
|
||
|
||
=== In ParaView | ||
|
||
- Check your results by opening the produced `model_centerlines.vtk` in ParaView. Go back to the CEGT to edit your points if necessary, or to create new ones. | ||
- Check your results by opening the produced `model_centerlines.vtk` in ParaView. | ||
Go back to the CEGT to edit your points if necessary, or to create new ones. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
= Center lines computing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computing center lines |
||
|
||
We first need to compute each center line using both the extracted surface and the corresponding point pairs (which shoud have been defined in the first place, using link:Module_3_CenterlinesGUITool.adoc[the center lines editing tool]) | ||
We first need to compute each center line using both the extracted surface and | ||
the corresponding point pairs (which have been defined using xref:Module_3_CenterlinesGUITool.adoc[the center lines editing tool]). | ||
|
||
The executable we use is named `meshing_centerlines`. | ||
The executable we use is named `angiotk_meshing_centerlines`. | ||
|
||
== Supported file formats | ||
|
||
- input: a 3 model in STereoLithography (.stl) and a text file containing point pairs (pointpair.data) or a gmsh-readable file (.geo or 1D mesh (.msh)) | ||
- input: a 3D model in STereoLithography (.stl) and a text file containing point | ||
pairs (pointpair.data) or a gmsh-readable file (.geo or 1D mesh (.msh)) | ||
- output: a VTK file (.vtk) | ||
|
||
== Parameters | ||
|
@@ -15,7 +17,9 @@ The executable we use is named `meshing_centerlines`. | |
- `--input.pointpair.filename`: (string) Input point pairs text file | ||
- `--output.directory`: (string) Output directory for the VTK file | ||
- `--config-file`: (string) Configuration file | ||
- `--force-rebuild=1`: (int) 0 to avoid computing if target file already exists, 1 to overwrite it | ||
- `--delaunay-tessellation.output.directory`: (string) Output directory for the Delaunay tessellation | ||
- `--delaunay-tessellation.force-rebuild=1`: (int) 0 to avoid computing if target file already exists, 1 to overwrite it | ||
|
||
- `--force-rebuild=1`: (int) 0 to avoid computing if target file already exists, | ||
1 to overwrite it | ||
- `--delaunay-tessellation.output.directory`: (string) Output directory for the | ||
Delaunay tessellation | ||
- `--delaunay-tessellation.force-rebuild=1`: (int) 0 to avoid computing if | ||
target file already exists, 1 to overwrite it |
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.
Center line generation is very sensitive to the provided pointset