However, since they are new weights, I think I need to adjust the TotalSegmentator.py code in “…AppData\Local\NA-MIC\Slicer 5.2.2\NA-MIC\Extensions-31382\TotalSegmentator\lib\Slicer-5.2\qt-scripted-modules”.
Is this correct?
I see where I can add new tasks to the GUI (lines 307-314) but I do not see where I can link the weights file for that task.
However, they are not listed in the TotalSegmentator file in the Python>scripts folder in Slicer3D. I just tried reinstalling Slicer but that also did not update the subtasks.
If I replace the TotalSegmentator file in the Python>scripts folder with the updated version from the github repo of Jakob Wasserthal, the 3D Slicer installation directory, I get an error that there are too many arguments.
Furthermore, I assume I need to not only add the new tasks in lines 207-315 in the TotalSegmentator.py script in the Slicer Total Segmentator folder, but also make sure all the label terminologies are included.
Could you advise me in
how to add the new subtask arguments in the TotalSegmentator file in the Slicer Python scrips folder
how to adjust TotalSegmentator.py in the Slicer Total Segmentator extensions folder to add these subtasks and their corresponding labels?
The next problem is that the TotelSegmentator 3D Slicer extension does not know yet about the newly installed tasks.
See the next post. @lassoan and I will find a way to integrate new test tasks as well as implement a way to add new or licensed weights in the extension. Until then, you can use my workaround.
I am having trouble reinstalling TotalSegmentator due to a permission error:
Could not install packages due to an OSError: [WinError 5] Access is denied: ‘C:\Users\[myname]\AppData\Local\NA-MIC\Slicer 5.2.2\lib\Python\Lib\site-packages\~harset_normalizer\md.cp39-win_amd64.pyd’
Consider using the --user option or check the permissions.
I guess this is because of not having admin rights for our work computers.
I’ll try to get temp admin access (not sure how to implement the --user option).
Thanks again, I will keep you updated whether it works!
EDIT: I do get a warning now when I open Slicer that says:
C:\Users.…\AppData\Local\NA-MIC\Slicer 5.2.2\lib\Python\Lib\site-packages\requests_init_.py:102: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn’t match a supported version!
warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn’t match a supported "
Hi!
I’m trying to do the same thing as Eva, and I’m slightly confused.
Should I do everything that is in the above post, and replace the Totalsegmentator.py?
Or is it suffice to just repalce Totalsegmentator.py?
Or is it now in the official extension, and should I wait for any update schedules?
Thanks in advance.
In the latest TotalSegmentator extension, we have implemented a checkbox “use latest development version” and a button “Import weights”.
When you add additional weights, you should make a "“Force reinstall” with “use latest development version” checked. Then press the “Import weights” button and search the zipped weight file on your hard drive. Select it and it will be automatically installed.
Please update the TotalsSegmentator extension or uninstall/reinstall it. @lassoan For some reason, this does not work in 5.3.0 yet (I see the older extension after a reinstall)
Extensions are only updated for the latest Slicer Stable Release and the latest Slicer Preview Release. If you want to get the latest extension version for a Slicer Preview Release then you need to download and install the latest Slicer Preview Release.
The best way would be to display a message box as soon as the user tries to load an extension from the extension manager:
“You are loading a possibly outdated extension because you are not using the latest stable (x.x.x) or the preview (y.y.y) version of 3D Slicer”