# How to change number of points and cells in a surface model?

**URL:** <https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630>\
**Category:** Development\
**Created:** [April 19, 2018, 9:03am UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630 "2018-04-19T09:03:19Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 19, 2018, 9:03am UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/1 "2018-04-19T09:03:19Z")

</div>

Hello Dear Developers and Users

I have several surface models. Specifications of one of these surface models are:

Surface Area: 3492.57 mm^2  
Volume: 10828.02 mm^3  
Number of Points: 1029  
Number of Cells: 336

I want to be able to change these specifications especially Number of Points and Number of Cells. How can I do that?

For example, I want to change these specifications in all my surface models to the following:  
Number of Points: 1200  
Number of Cells: 400

What modules should I use in Slicer or SlicerSALT?

In summary, My ultimate goal is to same number of points and number of cells in surface models. Please guide me as soon as possible.

Thanks a lot,  
Shahrokh

---

<div class="post-metadata">

**Author:** ![nirotu](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@nirotu](https://discourse.slicer.org/u/nirotu)\
**Post date:** [April 19, 2018, 1:05pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/2 "2018-04-19T13:05:08Z")

</div>

If no of cells is,same as no of triangles, you can use reduce option in meshmixer, a standalone softwate.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 19, 2018, 1:33pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/3 "2018-04-19T13:33:14Z")

</div>

The easiest way to achieve matching number of points is to add duplicate points to all models that have less points than the others. Would that be acceptable? Why do you need exact match of number of points?

Do you need correspondence between mesh points (do you expect 123th point in mesh A to be at the same anatomical location as point 123th in mesh B)? If yes, then what you need is a spatial correspondence between meshes: transformation that transforms points of one mesh to the other. This transformation is computed by spatial registration algorithms. Once you have transform between mesh A to B, you can apply that to points of mesh A and get a mesh that has the same shape as mesh B, but contains exactly the same number of points and cells, in the same order, as mesh A.

There are several ways of registering meshes in Slicer. For example, you can import your meshes to Segmentation node and use the methods described in this post: [align two segments to each other](https://discourse.slicer.org/t/align-two-segments-to-each-other/2570/4?u=lassoan).

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 19, 2018, 1:33pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/4 "2018-04-19T13:33:17Z")

</div>

You can try to use the Decimation option in the Surface Toolbox module, however there you cannot exactly specify the number of triangles, only a reduction factor. It might still be possible to make them match.

What exactly you want to achieve with having exactly the same number of cells and points?

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 22, 2018, 10:36am UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/5 "2018-04-22T10:36:06Z")

</div>

> [@lassoan](#):
>
> spatial correspondence

Hello  
Dear Anil, Andras and Csaba

Thank you very much for your advice.  
My tomographic images (MRI) are nifti format. Before, I convert region segmented (using itk-snap) to binary images.  
I convert these binary images to the model by “Grayscale Model Maker” module using Threshold equal to 1. For example, I have given the specifications of one of theses models in the my first message.

Unfortunately, I can not work with SlicerIGT and If I did not get it wrong, as Andras pointed out, I used “Surface Registration” in “CMF Registration”module to register these models .  
In this module, I select “Surface Registration” for “Type of Registration”.  
I select one of the models as the Fixed Model and the other model as Moving Model.  
The outputs of this module are the “Transform” matrix and the transmitted model.  
If I did not get it wrong, how can I use this matrix to integrate the number of points and cells between models? In other words, what Slicer module should I use for this purpose.

Your sincerely;  
Shahrokh

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 22, 2018, 12:41pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/6 "2018-04-22T12:41:44Z")

</div>

Please try doing the segmentation using Slicer’s Segment Editor module. It is a relatively new, much improved segmentation module that I think you will find at least as good as ITK-Snap.

Then you can register the segmentations using the Segment Registration module, for which you need to install the Segment Registration extension from Extension Manager.

Let us know how it goes.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 22, 2018, 1:28pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/7 "2018-04-22T13:28:01Z")

</div>

If you already have a segmentation then you can load it into Slicer as a labelmap volume node and import that into a segmentation node (using Segmentations module).

After registration is completed, apply and harden the transform to the first model to get another model that has the same number of points and cells as the first model, but the shape of the second model.

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 23, 2018, 11:47am UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/8 "2018-04-23T11:47:41Z")

</div>

Hello  
Dear Andras and Csaba

Sorry about that I can not to do it.  
At firstly, I mentioned that I did the steps that Andras pointed out, but unfortunately I did not succeed.  
I will explain all the processes that I do.

Process #1: Add Data  
At it, I add sample1\_C1\_group04.nii and sample1\_C1\_group05.nii. For doing it, I choose these files and tick “LabelMap”option in the window of “Add data into the scene”. I think that I do these step as mentioned Andras.

Process #2: “Model Maker” module  
In “Model Maker”, I do the following steps:  
1- In Input Volume, I select my first LabelMapVolume with the name ample1\_C1\_group04  
2- I create new ModelHierarchy  
3- I named it to ModelS1C1G4  
4- I set “Start Label” and “End Label” to 1  
5- I set “Smooth” to 0 and then “Apply”.  
6- I do steps above for my second LabelMapVolume with the name ample1\_C1\_group05  
After doing it, I have two models with the names of ModelS1C1G4 and ModelS1C1G5 with the following specifications:  
ModelS1C1G4:  
Surface Area: 3816.23 mm^2  
Volume: 133300.13 mm^3  
Number of Points: 1479  
Number of Cells: 541  
ModelS1C1G5:  
Surface Area: 2940.01 mm^2  
Volume: 9805.02 mm^3  
Number of Points: 1168  
Number of Cells: 449  
After doing, I can clearly see these two models, seperately.  
Note: I want that “Number of Points” and “Number of Cells” of ModelS1C1G5 are same as ModelS1C1G4.

Process #3: “Model Registration” module  
At it, as mentioned Andras it, I want to calculate transform matrix; so I do the following steps:  
1- In “Input fixed (dense) model”, I select ModelS1C1G4.  
2- In “Input moving (sparse) model”, I select ModelS1C1G5.  
3- I create new LinearTransorm with the name of “LinearTransform\_3”  
4- In part of “Advanced”, I select “Rigid” for “Transform type”.  
5- I click “Apply”.  
6- After doing it, I get 1.18665655941 in “Mean distance after registration”.

Process #4: “Transforms” module;  
1- I select “LinearTransform\_3” in “Active Transform”  
2- In the part of “Apply transform”, firstly I select ModelS1C1G4 and apply “LinearTransform\_3” to it.  
3- In “Data” module, I select ModelS1C1G4 and then right click and select “Harden Transform”

After doing these steps, I expect to be equal to “Number of Points” and “Number of Cells” of ModelS1C1G5 with ModelS1C1G4; but unfortunately, that did not happen.

I’m really confused. Please guide me to solve it.

Thanks a lot;  
Shahrokh.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 23, 2018, 1:08pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/9 "2018-04-23T13:08:56Z")

</div>

The main point is that when you apply a transform to a model, number of points or cells of that model does not change (compared to the original, non-transformed model).

I would recommend to not use Model Maker (unnecessary, Segmentations take care of conversions between various representations) and use Segment Registration for alignment (since it can do non-linear warping to better match the meshes).

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 23, 2018, 1:38pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/10 "2018-04-23T13:38:22Z")

</div>

Thanks a lot Andras.

Also,Csaba had also mentioned to use “Segment Registration” module in his message; but unfortunately, I can not find “Segment Registration” module; even I search “Segment Registration” in “Extension Manager” on Slicer. It was not.  
I work with Slicer version 4.6.2 r25516.  
Should I install this module (Segment Registration)?  
OR  
is it installed by default on Slicer? If Ok, what version is there?

Thanks a lot.  
Shahrokh

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 23, 2018, 1:45pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/11 "2018-04-23T13:45:00Z")

</div>

Wow, Slicer 4.6 - that was released two years ago! We are making huge improvements to Slicer week by week, so a two-year-old version is completely outdated. You should always use at least the latest stable version(currently Slicer-4.8), and if you don’t find something there or something is not working as expected then try a recent nightly (not older than 1-2 weeks).

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 23, 2018, 1:54pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/12 "2018-04-23T13:54:30Z")

</div>

😊

Dear Andras and Csaba,

Really excuse me, I download Slicer-4.9.0-2018-01-10-linux-amd64 and install “Segment Registration” module. I really hope that my problems will be solved.  
Thanks thanks thanks  
Shahrokh

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 23, 2018, 2:38pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/13 "2018-04-23T14:38:39Z")

</div>

Excellent, thanks for the update! I also hope it will work for your use case. Let us know if not.

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 25, 2018, 9:36am UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/14 "2018-04-25T09:36:55Z")

</div>

😥

Hello  
Dear Andras and Csaba

As mentioned you, at now, I work with Slicer-4.8.1-linux-amd64 and install “Segment Registration” module. Unfortunately I can not same “Number of Points” and “Number of Cells” between two models.

This may be better to point out my purpose. Please look at my post with titled “Shape analysis between non-similar objects?” in “3D Slicer Forum”.  
Briefly, suppose I have 5 groups with names A, B, C, D and E and in each group there are 8 meat samples (with size 2x2x2 cm^3 each sample, approximately). Each group was subjected to different laboratory procedures (physicochemical methods) and these procedures had a significant effect on the surface of the samples that it is recognizable by any observer.  
I get MRI images from these samples separately. I put meat samples from each group on the flat surface (one chess score sheet) and after MRI acquisition, I cropped sample slice images and convert to binary segmented images using softwares such as itksnap, Seg3D and Slicer. Now I want to 3D surface analysis the effects of these procedures on the surface of these meat samples using SlicerSALT (SPHARM). At that time, Beatriz guide me that I have to check if correspondence is good across all meat samples. (I thank Beatriz for all patiently guidance). Unfortunately, I did not understand how I can match meat samples.

At now, I want to same number of points and cells between two extracted models from MRI samples.

As mentioned Andras and Csaba, I download Slicer-4.8.1-linux-amd64 and install “Segment Registration” module.

For example, I do the following steps for two samples (binary segmented images):

**#1: Load data as LabelMap (WITH tick “LabelMap”) :**  
File menu → Add data → Choose File(s) to Add: sample1\_C1\_group04.nii and sample1\_C1\_group04.nii

**#2: Load data as volume (WITHOUT tick “LabelMap”):**  
File menu → Add data → Choose File(s) to Add: sample1\_C1\_group04.nii and sample1\_C1\_group04.nii  
Rename sample1\_C1\_group04.nii to Volume\_sample1\_C1\_group04  
Rename sample1\_C1\_group05.nii to Volume\_sample1\_C1\_group05

**#3: Segmentations module:**  
In “Active segmentation” → Create new Segmentation with the name MySegmentation  
In “Export/import models and labelmaps” → in “Operation”, choose “Import” and in “Input type”choose “Labelmap” and select sample1\_C1\_group04 and in “Input node” and finally click on “Import” and again select sample1\_C1\_group05 in “Input node” and finally click on “Import”

**#4: “Data” module:**  
In “Subject hierarchy” tab → right click on “MySegmentation” and click on “Export visible segments to models”

**#5: “Segment Registration” module:**  
In “Fixed image” select Volume\_sample1\_C1\_group04  
In “Fixed segmentation” select MySegmentation  
In “Fixed segment” select sample1\_C1\_group04  
In “Moving image” select Volume\_sample1\_C1\_group05  
In “Moving segmentation” select MySegmentation  
In “Moving segment” select sample1\_C1\_group05

in “Results” and “Applied registration on moving study, select “Deformable” defult and I can not changed it.  
Click on “Perform registration”  
After doing it, the options of “Applied registration on moving study” in “Results” could be changed.  
At this time, I get messages in “Log messages” window; as following:

_Performing registration workflow_  
_Cropping moving volume_  
_Pre-aligning segmentations_  
_Fixed segment bounds: [16.945327758789062, 59.18786621093749, -94.15547943115234, -79.90632629394531, -141.16146850585938, -102.09896850585938]_  
_Moving segment bounds: [158.5375518798828, 200.83857727050778, -95.2843017578125, -77.4457015991211, -124.57463836669922, -100.2640151977539]_  
_Moving to fixed segment translation: [-141.62146759033203, -0.6659011840820312, -9.210891723632812]_  
_Resampling fixed volume_  
_Creating contour labelmaps_  
_Performing distance based registration_  
_Setting up result visualization_  
_Performing registration workflow_  
_Cropping moving volume_  
_Pre-aligning segmentations_  
_Fixed segment bounds: [16.945327758789062, 59.18786621093749, -94.15547943115234, -79.90632629394531, -141.16146850585938, -102.09896850585938]_  
_Moving segment bounds: [158.5375518798828, 200.83857727050778, -95.2843017578125, -77.4457015991211, -124.57463836669922, -100.2640151977539]_  
_Moving to fixed segment translation: [-141.62146759033203, -0.6659011840820312, -9.210891723632812]_  
_Warning: In /home/kitware/Dashboards/Package/Slicer-481/Libs/MRML/Core/vtkMRMLTransformNode.cxx, line 1515_  
_vtkMRMLLinearTransformNode (0x6932680): vtkMRMLTransformNode::SetAndObserveMatrixTransformToParent method is deprecated. Use vtkMRMLTransformNode::SetMatrixTransformToParent instead_

\_DeserializeImageGeometry: Failed to de-serialize geometry string \_

_ApplyTransformOnReferenceImageGeometry: Failed to get reference image geometry_

_Resampling fixed volume_  
\_Found CommandLine Module, target is /home/sn/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/cli-modules/ResampleScalarVolume \_  
\_ModuleType: CommandLineModule \_  
\_Resample Scalar Volume command line: \_

\_/home/sn/Slicer-4.8.1-linux-amd64/lib/Slicer-4.8/cli-modules/ResampleScalarVolume --spacing 1,1,1 --interpolation lanczos /tmp/Slicer/CCJDG\_vtkMRMLScalarVolumeNodeB.nrrd /tmp/Slicer/CCJDG\_vtkMRMLScalarVolumeNodeE.nrrd \_  
\_ \_  
_Resample Scalar Volume completed without errors_  
\_ \_  
_Loaded volume from file: /tmp/Slicer/CCJDG\_vtkMRMLScalarVolumeNodeE.nrrd. Dimensions: 47x20x44. Number of components: 1. Pixel type: unsigned short._

_Creating contour labelmaps_  
_Performing distance based registration_  
_Traceback (most recent call last):_  
\_ File “/home/sn/.config/NA-MIC/Extensions-26813/SlicerProstate/lib/Slicer-4.8/qt-scripted-modules/DistanceMapBasedRegistration.py”, line 249, in onApplyButton\_  
\_ logic.run(self.parameterNode)\_  
\_ File “/home/sn/.config/NA-MIC/Extensions-26813/SlicerProstate/lib/Slicer-4.8/qt-scripted-modules/DistanceMapBasedRegistration.py”, line 356, in run\_  
\_ (bbMin,bbMax) = self.getBoundingBox(fixedLabelNodeID, movingLabelNodeID)\_  
\_ File “/home/sn/.config/NA-MIC/Extensions-26813/SlicerProstate/lib/Slicer-4.8/qt-scripted-modules/DistanceMapBasedRegistration.py”, line 501, in getBoundingBox\_  
\_ unionLabelImage = (cast.Execute(fixedLabelImage) + cast.Execute(movingLabelImage)) \> 0\_  
\_ File “/home/sn/Slicer-4.8.1-linux-amd64/lib/Python/lib/python2.7/site-packages/SimpleITK/SimpleITK.py”, line 4254, in **add** \_  
\_ return Add( self, other )\_  
\_ File “/home/sn/Slicer-4.8.1-linux-amd64/lib/Python/lib/python2.7/site-packages/SimpleITK/SimpleITK.py”, line 11002, in Add\_  
\_ return _SimpleITK.Add(\*args)_  
_RuntimeError: Exception thrown in SimpleITK Add: /home/kitware/Dashboards/Package/Slicer-481-package/ITKv4/Modules/Core/Common/include/itkImageToImageFilter.hxx:241:_  
_itk::ERROR: AddImageFilter(0x6675f10): Inputs do not occupy the same physical space! \_  
 InputImage Origin: [1.2437664e+02, 9.9558647e+01, -1.4970284e+02], InputImage\_1 Origin: [-1.7810860e+01, 9.4871147e+01, -1.3251534e+02]  
\_ Tolerance: 1.5625000e-06_

_Setting up result visualization_

**#5: “Data” module:**  
In “Transform hierarchy” and in “Deformable Transform” list, right click on “Volume\_sample1\_C1\_group05” and select “Harden transform”

**#6: “Models” module:**  
Unfortunately, I see that “Number of Points” and “Number of Cells” are NOT the same. Why?!

Please guide me;  
Shahrokh

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 25, 2018, 4:27pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/15 "2018-04-25T16:27:19Z")

</div>

I’m not familiar with the shape analysis methods you’re trying to use, but ensuring an exact match between number of vertices seems like a very unrealistic goal.

Surface models are mostly used for 3D visualization, and analysis is almost always done on labelmaps, so such limitations have not been needed. But even if you achieve the same number of vertices somehow, it’s very hard to ensure that if you set a correspndence between each pair of vertex, they will really correspond spatially. As the shape and size of triangles is not a priority to keep consistent, there will be a “drift” eventually when you want to set up correspondence.  
You can use regularization methods to keep triangles the same size and shape, but then the smallest difference in your samples will result in a difference in number of vertices.

Have you considered using labelmaps or even other representations such as simplex meshes?

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [April 29, 2018, 8:32am UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/16 "2018-04-29T08:32:40Z")

</div>

Hello  
Dear Csaba and Andras

Thanks a lot for your replies. According with your guidance, I want to use labelmap volumes. I have some questions about it.  
1- Can I do comparison the surfaces of labelmaps between several groups?  
2- Can I create a average labmap volume from existing labmaps in a group?  
3- Can I compare between surface features of MRI (meat) samples such as shrinkage?  
4- Can I compute distance between two labelmaps just like as “ModelToModelDistance” module?

The point I should mention is that MRI images taken from meat samples are in following conditions:  
a- The dimensions of the meat samples are not exactly the same. Their volume is almost equal to 8.0 cm^3 but certainly their dimensions are not same.  
b- The orientation of meat fibers is not the same.  
However, I think as two signals can be different in the frequency spectra, two surfaces can also be different in features such as spherical harmonics. In other words, I imagine MRI meat samples like as 3D signals that I want to extract fundamental frequencies and compare between them. How can I do it?

Also you mention to use simplex mesh. Please guide me to understand difference between simplex mesh and mesh available in 3DSlicer. At it, please give me more guidance.

Thanks a lot;  
Shahrokh

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 29, 2018, 1:57pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/17 "2018-04-29T13:57:15Z")

</div>

> [@shahrokh](#):
>
> 1- Can I do comparison the surfaces of labelmaps between several groups?

Segment statistics module provides surface area measurement for each individual segment.

> [@shahrokh](#):
>
> 2- Can I create a average labmap volume from existing labmaps in a group?

You can, for example by aligning segments to each other, export them to labelmap, computing distance map (using Simple Filters module), average distance maps, and threshold it at 0.

> [@shahrokh](#):
>
> 3- Can I compare between surface features of MRI (meat) samples such as shrinkage?

Segment statistics gives you segment volume, so you can easily compute shrinkage.

> [@shahrokh](#):
>
> 4- Can I compute distance between two labelmaps just like as “ModelToModelDistance” module?

Yes, I think difference of distance maps should provide that. Or, apply model to model distance on the segment exported to a model node.

Check out [SlicerSalt shape analysis toolbox](http://salt.slicer.org/). You may also experiment with simple PCA-based modeling, but for that you need to wrap ITK filters in a Slicer CLI module, as I don’t seem to find any module that wraps ITK’s PCA filters ([ITK: itk::ImagePCAShapeModelEstimator\< TInputImage, TOutputImage \> Class Template Reference](https://itk.org/Doxygen/html/classitk_1_1ImagePCAShapeModelEstimator.html) and others).

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 30, 2018, 3:30pm UTC](https://discourse.slicer.org/t/how-to-change-number-of-points-and-cells-in-a-surface-model/2630/18 "2018-04-30T15:30:31Z")

</div>

> [@shahrokh](#):
>
> 4- Can I compute distance between two labelmaps just like as “ModelToModelDistance” module?

You can also use the [Segment Comparison module](https://www.slicer.org/wiki/Documentation/Nightly/Modules/SegmentComparison) from the SlicerRT extension.  
Of course it only makes sense after you established spatial correspondence, for example using the [Segment Registration extension](https://github.com/SlicerRt/SegmentRegistration).

Simplex mesh is a very special class of mesh that has been developed at Inria. It is a hexagon-based mesh that is designed to be regular. As far as I know there is no support for it in Slicer at this point, and it never became a standard representation, but if you like its features then it may be of interest. Keep in mind that adding its support in Slicer might be a huge project. Here’s a [paper about it](https://hal.inria.fr/inria-00074456/PDF/RR-2214.pdf).
