VMTKSURFACETOBINARYIMAGE(1)

πŸ“¦ version 1.5.0, in ubuntu stonking

πŸ’– NAME πŸ’–

vmtksurfacetobinaryimage β€” bestie, it's the vmtk script vmtksurfacetobinaryimage, and yes the name is a whole mouthful, we love her anyway 🫢


✨ DESCRIPTION ✨

okay so first things first, the vibes: this script does automatic piping for vmtksurfacetobinaryimage and it's also busy parsing options, all on its own, main character energy fr fr. Then:

vmtksurfacetobinaryimage : Convert a surface to a binary image mask

where voxels are labeled if they lie inside the surface or not. Like, that's the whole gig πŸ’…

πŸ“₯ Input arguments

these are the things you can hand her on the way in 🌸

  • -id Id (str,1); default=0 β€” the script id. it's giving "who am I" but for scripts.
  • -handle Self (self,1) β€” a handle to self. self-love, literally πŸ’–
  • -disabled Disabled (bool,1); default=0 β€” turns execution and piping OFF. set it and she simply will not run, no cap.
  • -i Surface (vtkPolyData,1) β€” the input surface. the star of the show πŸ‘‘
  • -ifile SurfaceInputFileName (str,1) β€” filename for the default Surface reader. so you can just point her at a file bestie.
  • -invalue InsideValue (int,1) >= 0 and <= 255; default=1 β€” the value used to label voxels which contain points inside the surface.
  • -outvalue OutsideValue (int,1) >= 0 and <= 255; default=0 β€” the value to label voxels which contain points inside the surface. (yes, that's literally what the manpage says, I'm not editing her words, only reporting them πŸ™ˆ)
  • -imagespacing PolyDataToImageDataSpacing (float,3) >= 0.0; default=[0.3, 0.3, 0.3] β€” the sample spacing for the polydata to image data conversion. three floats, three chances to slay.
  • -ofile ImageOutputFileName (str,1) β€” filename for the default Image writer. where the glow-up gets saved ✨

πŸ“€ Output arguments

and these are what she gives you back, iconic behavior:

  • -id Id (str,1); default=0 β€” script id, again, because consistency is a vibe.
  • -handle Self (self,1) β€” handle to self. still self-love.
  • -o Image (vtkImageData,1) β€” the binary surface image. the moment we've all been waiting for πŸŽ€
heads up bestie: -invalue and -outvalue are both strictly in the 0–255 range and -imagespacing has to be >= 0.0. no negative spacing, we do not do that here πŸ¦‹

omg and a lil sign-off to close the loop: this is vmtksurfacetobinaryimage version 1.5, dated April 2026. periodt πŸ’œ

πŸ“¦ where this page comes from