https://www.slicer.org/w/api.php?action=feedcontributions&user=Benwilson&feedformat=atomSlicer Wiki - User contributions [en]2020-11-28T19:27:46ZUser contributionsMediaWiki 1.33.0https://www.slicer.org/w/index.php?title=Documentation/Labs/Surface_Toolbox_update&diff=61323Documentation/Labs/Surface Toolbox update2019-07-30T12:14:06Z<p>Benwilson: Update WIP Modules and show implemented modules</p>
<hr />
<div><br />
<br />
== Overview ==<br />
<br />
As part of the SALT project we would like to revamp some of the existing functionality in [https://github.com/NIRALUser/SPHARM-PDM/blob/master/Modules/CLI/MetaMeshTools/MeshMath.cxx MeshMath] into the SurfaceToolbox. We will be hiring a summer intern to work on this over a couple of months this summer.<br />
<br />
== Team == <br />
* JC Fillon-Robin<br />
* Bea Paniagua<br />
* Jared Vicory<br />
* Andras Lasso<br />
* Martin Styner<br />
* Benjamin Wilson (Kitware Summer intern 2019)<br />
<br />
== Definitions ==<br />
* [http://insight-journal.org/browse/publication/106 KWMeshVisu]: Legacy mesh viewer from the Styner Lab.<br />
* Types of Mesh Operations:<br />
** Multiple Mesh (2+) <br />
** Single Mesh<br />
** MeshToVolume<br />
** MeshScalar to Mesh<br />
** MeshScalar to MeshScalar<br />
** MeshScalar Operation<br />
** Mutliple MeshScalar<br />
<br />
== Initial discussions ==<br />
<br />
We will be potentially implementing individual CLIs for each functionality in MeshMath, and those will be plugged into the Surface Toolbox.<br />
<br />
We would like to add a parameter node so if you save the scene and reload then all the node and parameter selections that you have made are not lost<br />
Enclose all functionality in C++ little CLIs that can be called from the python infrastructure, so they can be used from any modules<br />
Do the same thing for the functionality in MeshMath, creating independent CLIs and modules<br />
<br />
=== Current MeshMath functionality ===<br />
<br />
{| class="wikitable sortable"<br />
! Name<br />
! Description<br />
! Type<br />
! Keep<br />
! Note<br />
|-<br />
| subtract<br />
| Subtract mesh from inputmesh, write a KWMeshVisu readable text file<br />
| PairWiseMesh<br />
| {{Not Done}}<br />
| This functionality is currently available through [[Documentation/Nightly/Extensions/ModelToModelDistance|ModelToModelDistance]]<br />
|-<br />
| magnitude<br />
| Magnitude of the input metaArray file (mvh/mva) and writes a KWMeshVisu readable file<br />
| ?<br />
| {{Not Done}}<br />
| It seems this is very specific to a certain application<br />
|-<br />
| scaleMVA<br />
| Scales the input metaArray file (mvh/mva) and writes a KWMeshVisu readable file<br />
| ?<br />
| {{Not Done}}<br />
| It seems this is very specific to a certain application<br />
|-<br />
| scaleMesh<br />
| Scales the input mesh file<br />
| SingleMesh<br />
| {{Done}}<br />
| (Implemented)<br />
|-<br />
| avgMesh<br />
| Compute the average mesh from inputmesh file1, file2...<br />
| MultipleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| ave<br />
| Compute the average vector field from file1, file2... generated with -substract<br />
| MultipleMesh / ScalarMesh Operator<br />
| {{Done}}<br />
| Turn into a new MeshScalar operator. Given several Meshes with MeshScalars that are named the same way, it will allow averaging them and creating a new scalar map. <br />
|-<br />
| normave<br />
| Works as the \"-ave\" option, but the average vector are projected on the normal at each point<br />
| MultipleMesh / ScalarMesh Operator<br />
| {{Done}}<br />
| Turn into a new MeshScalar operator. Given several Meshes with MeshScalars that are named the same way, it will allow averaging them and creating a new scalar map. <br />
|-<br />
| InvVect<br />
| Invert all the vectors created with the -substract option and write a KWMeshVisu readable file<br />
| MeshScalar Operation <br />
| {{Done}}<br />
| <br />
|-<br />
| magdir<br />
| Compute the signed magnitude of each of the vector from the vector field.(+ if in the normal direction, - otherwise)<br />
| SingleMesh<br />
| {{Not Done}}<br />
| This functionality is currently available through [[Documentation/Nightly/Extensions/ModelToModelDistance|ModelToModelDistance]] <br />
|-<br />
| magNormdir<br />
| Compute the signed magnitude of the normal projection of the vector field<br />
| SingleMesh<br />
| {{Not Done}}<br />
| This functionality is currently available through [[Documentation/Nightly/Extensions/ModelToModelDistance|ModelToModelDistance]] <br />
|-<br />
| applyVec<br />
| Deforme the mesh according to the vector field specified as input <br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| meshValues<br />
| Find the points and cells in a mesh. The outputfile is a textfile with the values<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Export through CSV<br />
|-<br />
| avgGaussMesh<br />
| <Meshfile1> <Meshfile2> ... -gaussMeshPara <mean>,<stdev>,<val1>,<val2>,... Compute the gaussian average for mesh files. The first parameter is the average, then the standard deviation of the Gaussian model and the rest are the values associated with the files<br />
| MultipleMesh<br />
| {{Done}}<br />
| <br />
|-<br />
| avgGaussKWM<br />
| Compute the gaussian average for KWMeshVisu files. The first parameter is the average, then the standard deviation of the Gaussian model and the rest are the values associated with the files<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| See "ave"<br />
|-<br />
| alignMesh<br />
| Align all of the meshes to the inputmesh (== MeshFile0) using Procrustes alignment [-scalingOn]<br />
| MultipleMesh<br />
| {{Done}}<br />
| Fix the scaling, give an option to export the scaling factors associated with the mesh (so it can be reverted via scaleMesh)<br />
|-<br />
| alignMeshICP<br />
| Align all of the meshes to the inputmesh (== MeshFile0) using IterativeClosestPoints (no correspondence required)<br />
| MultipleMesh<br />
| {{Done}}<br />
| <br />
|-<br />
| BadTriangle<br />
| Find the bad triangles in a Mesh. The <thresh value> is the value of the threshFactor to calculate the standard deviation for the bad triangles. The output is a KWMeshVisu text file with the values of the average of the triangles of the mesh<br />
| SingleMesh<br />
| {{Not Done}}<br />
| Probably not keep since this is the same than "Clean" in the SurfaceToolbox<br />
|-<br />
| extraction<br />
| To extract an attribute.The Input is the Mesh, the extractFilename is the attribute image and the Output is a KWMeshVisu text file with the attribute extraction [-extractClosest]: extract closest attribute [-nn]: nearest neighbor interpolation (default: linear)<br />
| MeshToVolume<br />
| {{Done}}<br />
| <br />
|-<br />
| value<br />
| Extract the 5th column from a textfile and write a KWMeshVisu file with the values obtained<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Turn into "import from file" or something similar. This new operation would import a scalar field from a csv file into a mesh<br />
|-<br />
| subKWM<br />
| Difference between 2 KWMeshVisu files<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| See "ave"<br />
|-<br />
| MaxColor<br />
| Compare each point in every files, find a max for every points, keep 5% near the max, the other values will be 0<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| Transform this into a Threshold scalar map<br />
|-<br />
| dist_absolute<br />
| Absolute distance map between KWMeshVisu files<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| Transform this into something better, something that can operate over several scalar maps<br />
|-<br />
| dist_relative<br />
| Relative distance map between KWMeshVisu files (values between -1 & 1)<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| Transform this into something better, "normalize scalar map", and give the option to set up the range<br />
|-<br />
| label<br />
| Separate every labels, find the mean...<br />
| MeshScalar Operation<br />
| {{Not Done}}<br />
| This will be changed into a different module. The module will list all the scalar fields in the Mesh<br />
|-<br />
| color -val <number_of_label>,<value_label><br />
| To change the value of labels to see the evolution with KWMeshVisu.<br />
| MeshScalar Operation<br />
| {{Not Done}}<br />
| This will not be kept as it has legacy operations<br />
|-<br />
| first <textfile> <br />
| Convert a column file into a line file with a comma between each value.<br />
| Random<br />
| {{Not Done}}<br />
| This will not be kept as it should not be here.<br />
|-<br />
| MC2Origin <br />
| Convert a column file into a line file with a comma between each value.<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| avg/median/min/max/per1/per99OneKWM <br />
| Obtain descriptive statistics from scalar fields in a single VTK mesh<br />
| SingleMesh / ScalarMesh Operation<br />
| {{Done}}<br />
| Keep with modifications, arguments should be the scalar field name and the operation to perform. Might revisit later, most of this functionality is in MeshStatistics<br />
|-<br />
| FillHole<br />
| Fills up a hole in a open mesh.<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress) Slight change it should close all the open holes until there are no more <br />
|-<br />
| BordersOut<br />
| Outputs the borders of a mesh (if there)<br />
| SingleMesh <br />
| {{Done}}<br />
| (Implemented)<br />
|-<br />
| isOpen<br />
| Gives back an integer defining whether the mesh is open or not<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Probably not keep, will revisit later<br />
|-<br />
| CleanMesh<br />
| Re-mesh the input mesh and gives back a new clean mesh without degenerated triangles<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Already in the surface toolbox<br />
|-<br />
| SmoothMesh<br />
| Gives back a Laplacian smoothed surface<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Already in the surface toolbox<br />
|-<br />
| FilterNormals<br />
| Changes homogeneously normals of the polygons in a mesh<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Already in the surface toolbox<br />
|-<br />
| StatsROI<br />
| Process a KWMeshVisu file, given a ROI Mask<br />
| MeshScalar operation <br />
| {{Not Done}}<br />
| Already in Slicer through Pick and Pain and MeshStatistics<br />
|-<br />
| KWMToPolyData<br />
| Writes a KWM scalar field (N Dimensions) into a PolyData Field Data Scalar to visualize in Slicer<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications, the scalar field can be input in a csv, it does not need to be a KWM file<br />
|-<br />
| FSAscData<br />
| Extracts a curvature/thickness etc information from a FreeSurfer style scalar file and adds it as attribute to the vtk mesh for visualization. FS format is line-by-line, no header, with each line 'point-id vertex-x vertex-y vertex-z scalar-prop<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Needs to be replaced by a conversion tool that allows VTK/Slicer and GIFTI (the new surface standard that FS is using with their newest versions, connectome projects are using only GIFTI)<br />
|-<br />
| surfaceArea<br />
| Computes surface area in a txt file<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications, we should create an option to extract vtkMassProperties from a single Mesh including surface area and volume<br />
|-<br />
| variance/mean/attSTD<br />
| Compute variance across population of scalar fields<br />
| Multiple MeshScalar (multiple Mesh) <br />
| {{Done}}<br />
| Keep with modifications, we should compute variance in a scalar field given the scalar field name and a collection of meshes<br />
|-<br />
| GetCurvatures<br />
| Gets an assorted set of curvature measurements:<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications, embed the attributes as scalar fields in the mesh <br />
|-<br />
| particleConsistency<br />
| Generates new particle files where fliped particles does not appear<br />
| MultipleMesh<br />
| {{Not Done}}<br />
| ShapeWorks functionality, do not keep<br />
|-<br />
| GetDirectionFeatures<br />
| Generates three KWM loadable files that have directionality features with respect to X, Y and Z directions<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| closestPoint<br />
| Computes interpolated attribute file (output file) for second mesh using closest point interpolation between two input meshes<br />
| Multiple Mesh<br />
| {{Done}}<br />
| Keep with modifications. Two meshes, one target and one source with the source having the scalar field that needs to be transferred into target<br />
|-<br />
| extractVertices<br />
| Extract points and write 3 different files listing respectively X, Y and Z values<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications. Provide a point and a scalar field and values for that point will be output<br />
|-<br />
| cart2bary<br />
| Project each point in <vtkPointFileIn> onto the <inputmesh> and then calculate the Barycentric coordinate of the projected point, output to <OutputFileName><br />
| SingleMesh<br />
| {{Done}}<br />
| Keep with modifications. (styner: I think this can be removed)<br />
|-<br />
| VTKtoLpts<br />
| Create a particle file out of a triangulated VTK mesh<br />
| SingleMesh<br />
| {{Not Done}}<br />
| ShapeWorks functionality, do not keep<br />
|-<br />
| relaxPolygons<br />
| Mesh relaxation based in vtkWindowedSincPolyDataFilter<br />
| SingleMesh<br />
| {{Done}}<br />
| (Implemented) Check with @lasso to see if this is already included into the Surface toolbox<br />
|-<br />
| decimateMesh<br />
| Mesh decimation, reducing the number of points. Target reduction is a value from 0..1 that indicates in what % vertices should be reduced<br />
| SingleMesh<br />
| {{Not Done}}<br />
| Do not keep, already included into the Surface toolbox<br />
|-<br />
| listPointData<br />
| lists info about all the VTK point Data in the vtk file<br />
| SingleMesh<br />
| {{Done}}<br />
| Probably keep, but functionality slightly overlaps with other functionality that will be improved when ported. Will revisit later.<br />
|-<br />
| pointDataOP<br />
| threshold or subtract data<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| translateMesh<br />
| translates a mesh for a given amount<br />
| SingleMesh<br />
| {{Done}}<br />
| (Implemented)<br />
|-<br />
| lookupPointData<br />
| substitutes scalar values in a given scalar field based on an input lookup<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| volumePolyData<br />
| provides volume count for the PolyData through the std output. NOTE: Only in closed surfaces.<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Keep altogether with the surface area functionality described above (vtkMassProperties)<br />
|}<br />
<br />
=== Path forward ===<br />
<br />
==== Using vtkMRMLScriptedModuleNode ====<br />
<br />
This node is particularly useful as it helps store parameters used for computation. See [https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLScriptedModuleNode.h vtkMRMLScriptedModuleNode.h]<br />
<br />
The main idea is to have a parameter node selector allowing to choose between different set of parameters.<br />
<br />
For an example of use in a scripted module. See [https://github.com/Slicer/Slicer/blob/22f0033f92527d4e3c22e77f89384d64f8bce66b/Modules/Scripted/SegmentStatistics/SegmentStatistics.py#L60 Modules/Scripted/SegmentStatistics/SegmentStatistics.py]<br />
<br />
== Testing data ==<br />
<br />
TBD</div>Benwilsonhttps://www.slicer.org/w/index.php?title=Documentation/Labs/Surface_Toolbox_update&diff=61313Documentation/Labs/Surface Toolbox update2019-07-26T12:10:27Z<p>Benwilson: Describing which functions are being worked on.</p>
<hr />
<div><br />
<br />
== Overview ==<br />
<br />
As part of the SALT project we would like to revamp some of the existing functionality in [https://github.com/NIRALUser/SPHARM-PDM/blob/master/Modules/CLI/MetaMeshTools/MeshMath.cxx MeshMath] into the SurfaceToolbox. We will be hiring a summer intern to work on this over a couple of months this summer.<br />
<br />
== Team == <br />
* JC Fillon-Robin<br />
* Bea Paniagua<br />
* Jared Vicory<br />
* Andras Lasso<br />
* Martin Styner<br />
* Benjamin Wilson (Kitware Summer intern 2019)<br />
<br />
== Definitions ==<br />
* [http://insight-journal.org/browse/publication/106 KWMeshVisu]: Legacy mesh viewer from the Styner Lab.<br />
* Types of Mesh Operations:<br />
** Multiple Mesh (2+) <br />
** Single Mesh<br />
** MeshToVolume<br />
** MeshScalar to Mesh<br />
** MeshScalar to MeshScalar<br />
** MeshScalar Operation<br />
** Mutliple MeshScalar<br />
<br />
== Initial discussions ==<br />
<br />
We will be potentially implementing individual CLIs for each functionality in MeshMath, and those will be plugged into the Surface Toolbox.<br />
<br />
We would like to add a parameter node so if you save the scene and reload then all the node and parameter selections that you have made are not lost<br />
Enclose all functionality in C++ little CLIs that can be called from the python infrastructure, so they can be used from any modules<br />
Do the same thing for the functionality in MeshMath, creating independent CLIs and modules<br />
<br />
=== Current MeshMath functionality ===<br />
<br />
{| class="wikitable sortable"<br />
! Name<br />
! Description<br />
! Type<br />
! Keep<br />
! Note<br />
|-<br />
| subtract<br />
| Subtract mesh from inputmesh, write a KWMeshVisu readable text file<br />
| PairWiseMesh<br />
| {{Not Done}}<br />
| This functionality is currently available through [[Documentation/Nightly/Extensions/ModelToModelDistance|ModelToModelDistance]]<br />
|-<br />
| magnitude<br />
| Magnitude of the input metaArray file (mvh/mva) and writes a KWMeshVisu readable file<br />
| ?<br />
| {{Not Done}}<br />
| It seems this is very specific to a certain application<br />
|-<br />
| scaleMVA<br />
| Scales the input metaArray file (mvh/mva) and writes a KWMeshVisu readable file<br />
| ?<br />
| {{Not Done}}<br />
| It seems this is very specific to a certain application<br />
|-<br />
| scaleMesh<br />
| Scales the input mesh file<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| avgMesh<br />
| Compute the average mesh from inputmesh file1, file2...<br />
| MultipleMesh<br />
| {{Done}}<br />
|<br />
|-<br />
| ave<br />
| Compute the average vector field from file1, file2... generated with -substract<br />
| MultipleMesh / ScalarMesh Operator<br />
| {{Done}}<br />
| Turn into a new MeshScalar operator. Given several Meshes with MeshScalars that are named the same way, it will allow averaging them and creating a new scalar map. <br />
|-<br />
| normave<br />
| Works as the \"-ave\" option, but the average vector are projected on the normal at each point<br />
| MultipleMesh / ScalarMesh Operator<br />
| {{Done}}<br />
| Turn into a new MeshScalar operator. Given several Meshes with MeshScalars that are named the same way, it will allow averaging them and creating a new scalar map. <br />
|-<br />
| InvVect<br />
| Invert all the vectors created with the -substract option and write a KWMeshVisu readable file<br />
| MeshScalar Operation <br />
| {{Done}}<br />
| <br />
|-<br />
| magdir<br />
| Compute the signed magnitude of each of the vector from the vector field.(+ if in the normal direction, - otherwise)<br />
| SingleMesh<br />
| {{Not Done}}<br />
| This functionality is currently available through [[Documentation/Nightly/Extensions/ModelToModelDistance|ModelToModelDistance]] <br />
|-<br />
| magNormdir<br />
| Compute the signed magnitude of the normal projection of the vector field<br />
| SingleMesh<br />
| {{Not Done}}<br />
| This functionality is currently available through [[Documentation/Nightly/Extensions/ModelToModelDistance|ModelToModelDistance]] <br />
|-<br />
| applyVec<br />
| Deforme the mesh according to the vector field specified as input <br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| meshValues<br />
| Find the points and cells in a mesh. The outputfile is a textfile with the values<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Export through CSV<br />
|-<br />
| avgGaussMesh<br />
| <Meshfile1> <Meshfile2> ... -gaussMeshPara <mean>,<stdev>,<val1>,<val2>,... Compute the gaussian average for mesh files. The first parameter is the average, then the standard deviation of the Gaussian model and the rest are the values associated with the files<br />
| MultipleMesh<br />
| {{Done}}<br />
| <br />
|-<br />
| avgGaussKWM<br />
| Compute the gaussian average for KWMeshVisu files. The first parameter is the average, then the standard deviation of the Gaussian model and the rest are the values associated with the files<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| See "ave"<br />
|-<br />
| alignMesh<br />
| Align all of the meshes to the inputmesh (== MeshFile0) using Procrustes alignment [-scalingOn]<br />
| MultipleMesh<br />
| {{Done}}<br />
| Fix the scaling, give an option to export the scaling factors associated with the mesh (so it can be reverted via scaleMesh)<br />
|-<br />
| alignMeshICP<br />
| Align all of the meshes to the inputmesh (== MeshFile0) using IterativeClosestPoints (no correspondence required)<br />
| MultipleMesh<br />
| {{Done}}<br />
| <br />
|-<br />
| BadTriangle<br />
| Find the bad triangles in a Mesh. The <thresh value> is the value of the threshFactor to calculate the standard deviation for the bad triangles. The output is a KWMeshVisu text file with the values of the average of the triangles of the mesh<br />
| SingleMesh<br />
| {{Not Done}}<br />
| Probably not keep since this is the same than "Clean" in the SurfaceToolbox<br />
|-<br />
| extraction<br />
| To extract an attribute.The Input is the Mesh, the extractFilename is the attribute image and the Output is a KWMeshVisu text file with the attribute extraction [-extractClosest]: extract closest attribute [-nn]: nearest neighbor interpolation (default: linear)<br />
| MeshToVolume<br />
| {{Done}}<br />
| <br />
|-<br />
| value<br />
| Extract the 5th column from a textfile and write a KWMeshVisu file with the values obtained<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Turn into "import from file" or something similar. This new operation would import a scalar field from a csv file into a mesh<br />
|-<br />
| subKWM<br />
| Difference between 2 KWMeshVisu files<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| See "ave"<br />
|-<br />
| MaxColor<br />
| Compare each point in every files, find a max for every points, keep 5% near the max, the other values will be 0<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| Transform this into a Threshold scalar map<br />
|-<br />
| dist_absolute<br />
| Absolute distance map between KWMeshVisu files<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| Transform this into something better, something that can operate over several scalar maps<br />
|-<br />
| dist_relative<br />
| Relative distance map between KWMeshVisu files (values between -1 & 1)<br />
| MeshScalar Operation<br />
| {{Done}}<br />
| Transform this into something better, "normalize scalar map", and give the option to set up the range<br />
|-<br />
| label<br />
| Separate every labels, find the mean...<br />
| MeshScalar Operation<br />
| {{Not Done}}<br />
| This will be changed into a different module. The module will list all the scalar fields in the Mesh<br />
|-<br />
| color -val <number_of_label>,<value_label><br />
| To change the value of labels to see the evolution with KWMeshVisu.<br />
| MeshScalar Operation<br />
| {{Not Done}}<br />
| This will not be kept as it has legacy operations<br />
|-<br />
| first <textfile> <br />
| Convert a column file into a line file with a comma between each value.<br />
| Random<br />
| {{Not Done}}<br />
| This will not be kept as it should not be here.<br />
|-<br />
| MC2Origin <br />
| Convert a column file into a line file with a comma between each value.<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| avg/median/min/max/per1/per99OneKWM <br />
| Obtain descriptive statistics from scalar fields in a single VTK mesh<br />
| SingleMesh / ScalarMesh Operation<br />
| {{Done}}<br />
| Keep with modifications, arguments should be the scalar field name and the operation to perform. Might revisit later, most of this functionality is in MeshStatistics<br />
|-<br />
| FillHole<br />
| Fills up a hole in a open mesh.<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress) Slight change it should close all the open holes until there are no more <br />
|-<br />
| BordersOut<br />
| Outputs the borders of a mesh (if there)<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| isOpen<br />
| Gives back an integer defining whether the mesh is open or not<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Probably not keep, will revisit later<br />
|-<br />
| CleanMesh<br />
| Re-mesh the input mesh and gives back a new clean mesh without degenerated triangles<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Already in the surface toolbox<br />
|-<br />
| SmoothMesh<br />
| Gives back a Laplacian smoothed surface<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Already in the surface toolbox<br />
|-<br />
| FilterNormals<br />
| Changes homogeneously normals of the polygons in a mesh<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Already in the surface toolbox<br />
|-<br />
| StatsROI<br />
| Process a KWMeshVisu file, given a ROI Mask<br />
| MeshScalar operation <br />
| {{Not Done}}<br />
| Already in Slicer through Pick and Pain and MeshStatistics<br />
|-<br />
| KWMToPolyData<br />
| Writes a KWM scalar field (N Dimensions) into a PolyData Field Data Scalar to visualize in Slicer<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications, the scalar field can be input in a csv, it does not need to be a KWM file<br />
|-<br />
| FSAscData<br />
| Extracts a curvature/thickness etc information from a FreeSurfer style scalar file and adds it as attribute to the vtk mesh for visualization. FS format is line-by-line, no header, with each line 'point-id vertex-x vertex-y vertex-z scalar-prop<br />
| SingleMesh <br />
| {{Not Done}}<br />
| Needs to be replaced by a conversion tool that allows VTK/Slicer and GIFTI (the new surface standard that FS is using with their newest versions, connectome projects are using only GIFTI)<br />
|-<br />
| surfaceArea<br />
| Computes surface area in a txt file<br />
| SingleMesh <br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications, we should create an option to extract vtkMassProperties from a single Mesh including surface area and volume<br />
|-<br />
| variance/mean/attSTD<br />
| Compute variance across population of scalar fields<br />
| Multiple MeshScalar (multiple Mesh) <br />
| {{Done}}<br />
| Keep with modifications, we should compute variance in a scalar field given the scalar field name and a collection of meshes<br />
|-<br />
| GetCurvatures<br />
| Gets an assorted set of curvature measurements:<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications, embed the attributes as scalar fields in the mesh <br />
|-<br />
| particleConsistency<br />
| Generates new particle files where fliped particles does not appear<br />
| MultipleMesh<br />
| {{Not Done}}<br />
| ShapeWorks functionality, do not keep<br />
|-<br />
| GetDirectionFeatures<br />
| Generates three KWM loadable files that have directionality features with respect to X, Y and Z directions<br />
| SingleMesh<br />
| {{Done}}<br />
| <br />
|-<br />
| closestPoint<br />
| Computes interpolated attribute file (output file) for second mesh using closest point interpolation between two input meshes<br />
| Multiple Mesh<br />
| {{Done}}<br />
| Keep with modifications. Two meshes, one target and one source with the source having the scalar field that needs to be transferred into target<br />
|-<br />
| extractVertices<br />
| Extract points and write 3 different files listing respectively X, Y and Z values<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Keep with modifications. Provide a point and a scalar field and values for that point will be output<br />
|-<br />
| cart2bary<br />
| Project each point in <vtkPointFileIn> onto the <inputmesh> and then calculate the Barycentric coordinate of the projected point, output to <OutputFileName><br />
| SingleMesh<br />
| {{Done}}<br />
| Keep with modifications. (styner: I think this can be removed)<br />
|-<br />
| VTKtoLpts<br />
| Create a particle file out of a triangulated VTK mesh<br />
| SingleMesh<br />
| {{Not Done}}<br />
| ShapeWorks functionality, do not keep<br />
|-<br />
| relaxPolygons<br />
| Mesh relaxation based in vtkWindowedSincPolyDataFilter<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Check with @lasso to see if this is already included into the Surface toolbox<br />
|-<br />
| decimateMesh<br />
| Mesh decimation, reducing the number of points. Target reduction is a value from 0..1 that indicates in what % vertices should be reduced<br />
| SingleMesh<br />
| {{Not Done}}<br />
| Do not keep, already included into the Surface toolbox<br />
|-<br />
| listPointData<br />
| lists info about all the VTK point Data in the vtk file<br />
| SingleMesh<br />
| {{Done}}<br />
| Probably keep, but functionality slightly overlaps with other functionality that will be improved when ported. Will revisit later.<br />
|-<br />
| pointDataOP<br />
| threshold or subtract data<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| translateMesh<br />
| translates a mesh for a given amount<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| lookupPointData<br />
| substitutes scalar values in a given scalar field based on an input lookup<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress)<br />
|-<br />
| volumePolyData<br />
| provides volume count for the PolyData through the std output. NOTE: Only in closed surfaces.<br />
| SingleMesh<br />
| {{Done}}<br />
| (Work in Progress) Keep altogether with the surface area functionality described above (vtkMassProperties)<br />
|}<br />
<br />
=== Path forward ===<br />
<br />
==== Using vtkMRMLScriptedModuleNode ====<br />
<br />
This node is particularly useful as it helps store parameters used for computation. See [https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLScriptedModuleNode.h vtkMRMLScriptedModuleNode.h]<br />
<br />
The main idea is to have a parameter node selector allowing to choose between different set of parameters.<br />
<br />
For an example of use in a scripted module. See [https://github.com/Slicer/Slicer/blob/22f0033f92527d4e3c22e77f89384d64f8bce66b/Modules/Scripted/SegmentStatistics/SegmentStatistics.py#L60 Modules/Scripted/SegmentStatistics/SegmentStatistics.py]<br />
<br />
== Testing data ==<br />
<br />
TBD</div>Benwilson