Access to List of Segmented Organs

Hello everyone.
After applying the “totalSegmentator” module to my volume, I obtain a list of all segmented structures with their respective names, as shown in the figure. I would like to know how, through a Python script, I can access this list of structures by the name of the organ I am interested in (for example, “liver”), in order to get its corresponding index. This will be useful for then entering it as the “Label Value” in the “Mask Scalar Volume” module, allowing me to treat that object as an independent volume.
Thanks a lot!!

What would you like to achieve? Create a fake CT from a segmentation so that you can import the segmentation into some clinical software?

I needed access to the list so I could use the index related to the name of the organ of interest to set it as an input parameter for the “Mask Scalar Volume” module, specifically as the value of the Label Map to use in creating a new node. However, I might be able to work around this and solve it differently.

The aspect I need the most at the moment is the one discussed in this other topic:

I would be very grateful for any help with this!
Thanks a lot!

Mask scalar volume is no longer relevant. Masking is now available in Segment Editor module (Mask volume effect).