Howto `totalSegment` vertebrae_body with python?

From SlicerTotalSegmentator, I extract a function (see :point_down:t2:) for segment the vertebrae.

_subset = ['vertebrae_S1', 'vertebrae_L5', 'vertebrae_L4', 
           'vertebrae_L3', 'vertebrae_L2', 'vertebrae_L1', 
           'vertebrae_T12', 'vertebrae_T11', 'vertebrae_T10', 
           'vertebrae_T9', 'vertebrae_T8', 'vertebrae_T7', 
def ttSegVert(inputFile, mNam,  taSb=_subset):
#   if isinstance(taSb, list):
  outFile = rf'output/{mNam}.nii.gz'
#   else:
#     outFile = rf'{TMP}/{mNam}'
  import shutil
  ttSegCode = [shutil.which('PythonSlicer'),]
  import sysconfig
  ttSegCode += [os.path.join(sysconfig.get_path('scripts'),
  ttSegCode += ['-i', f'{inputFile}', 
                '-o', f'{outFile}', 
                '--device', 'cpu',]
  if isinstance(taSb, list):
    ttSegCode += ['--ml', '--roi_subset', *taSb]
  else: # [TODO]: 无法完成`taSb='vertebrae_body'`
    ttSegCode += ["--task", taSb]
  pros = ut.launchConsoleProcess(ttSegCode).wait()

Well, run ttSegVert(input, 'ttSegVert', _subset) , got :point_down: a good result.

However, runttSegVert(inputFile, 'ttSegVert, ‘vertebrae_body’)`, got None…

@lassoan @jamesobutler @vertebra

Howto totalsegment vertebrae_body? Or :point_up_2:t2: what’s wrong?

Also, I made some modifications to this code as :point_down::

            # SampleData.downloadSample('CTLiver')
            logic.process(inputVolume, outputSegmentation, cpu=True, fast = True, task="vertebrae_body")

I can get a good result too! :point_down: