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', 
           'spinal_cord']
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'),
                             "TotalSegmentator")]
  ttSegCode += ['-i', f'{inputFile}', 
                '-o', f'{outFile}', 
                '--fast',
                '--device', 'cpu',]
  if isinstance(taSb, list):
    ttSegCode += ['--ml', '--roi_subset', *taSb]
  else: # [TODO]: 无法完成`taSb='vertebrae_body'`
    ttSegCode += ["--task", taSb]
  print(ttSegCode)
  pros = ut.launchConsoleProcess(ttSegCode).wait()
  print(pros)
  return

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: