Principal components analysis in SlicerMorph

Is there a limit to the number of points that the principal components can be calculated for using SlicerMorph? Also, if possible, could we create a method for SlicerMorph for iterative closest points in addition to the principal axes? That would probably improve performance on more complex shapes, I believe, and given the inherent nature of SlicerMorph for landmarking and the PseudoLM generator, this doesn’t seem all that infeasible.

No, there is no limit to the number of points as PCA input. Although the more points you have, the bigger VCV matrix and longer it will take for its decomposition.

For SlicerMorph feature suggestions, please use SlicerMorph’s github issues page and provide a detailed description of feature request. It will be great if there is an existing implementation you can refer to for us to better understand what you want to do.

We need to keep track of these in a central location.

Just to check, the module you helped make is part of SLicerMorph now right? I am having a difficult time downloading it if it is.

No, it is not part of the SlicerMorph. AFAIK, at this point it only exists as a script. It needs to be converted to a module, and then we can incorporate as part of the utilities group.
You are welcomed to send PR for it.

Oh ok. @smrolfe had said that you were going to plan on adding this as a utility to the SlicerMorph extension. Is there anything I can do to help with that process?

That’s great news. Your previous Slicer installation was much older than the current stable. There have been many bug fixes and new features added since then, so is a good idea to update (either the preview or stable). Thanks for the feedback, we will plan to add this as a utility to the SlicerMorph extension.

There are bunch of things we are working on, and this is not a high priority for us.

But if you want to take on turning it to a module (you can follow the IDAVLMConverter example SlicerMorph/IDAVLMConverter at master · SlicerMorph/SlicerMorph · GitHub), send a PR with changes that will be great.

Didn’t we do this already? I am able to use the module within my 3D Slicer window that has buttons and text options to enter information into it?

That’s only the python code. For a module to be included into the extension, you need an icon located resources/Icon, you need to specify that it need to be build as part of the extension.
Look at the example I sent above for IDAVLandmarkEditor. For MorphoJExporter to be a module, you need to have the same structure.

Fork the latest SlicerMorph repo, create a branch for your MorphoJ utility, add the existing python file, create cmakelist and icon, and send a PR.

So I think I managed to do everything. Is this workable: GitHub - stevenagl12/SlicerMorph-additions: Additional SlicerMorph Extensions

Sorry, missed that last step.

Ok, so I am sorry. I am very confused. I forked the latest SlicerMorph repo, created a branch called additional-extensions, and added in the necessary information, but for some reason it is not only saying that the branch I have is identical to the master repo, but it is also saying that smrolfe edited it 2 days ago…

Looks like you kept your MorphoJ module as a separate repo. Your fork doesn’t contain any changes:

You need to create a folder for the module in SlicerMorph (e.g., ExportMorphoJFile) copy the contents you kept at this repository GitHub - stevenagl12/SlicerMorph-additions: Additional SlicerMorph Extensions into that folder.

Then commit and do PR.

So, I had done that already. Here’s a screenshot of the repository on my computer:

OK. that’s only on your computer.

You need to commit those changes under a new branch, push to your remote repository on GH then request PR.

This might be helpful: Contributing to Slicer — 3D Slicer documentation
Step #2 is not relevant for our case.

I think I managed to do it, and create a pull request. Please let me know if i did it right or if I need to make more changes.

Looks like it worked :+1:

I apologize for being so unfamiliar with all this. I never had any formal programming or computer science training, besides MATLAB and LabView, so it is all being picked up as I go along. But thank you for all of your help.

Np. It is part of the learning. Now you know :slight_smile: