This is described in this topic: Load DICOM series using python - #2 by cpinter
Use Segment Editor module instead (the legacy Editod module is being phased out). See example for simple thresholding and model generation here (in particular, skin surface extraction example shows everything you need):
Probably the simplest is to specify a Python script that Slicer will execute.