Exported segment file size is quite large

I’m using scripted module to export segmentation in obj format, today i have updated the slicer latest nightly build version. and now the size is increased again.
Do we have any code or method to reduce or compress the 3D object file size while exporting.

You can apply decimation to reduce number of mesh points without decreasing important details:

  • Go to Segmentations modul
  • In Representations section, click Update in Closed surface row
  • Click Binary labelmap->Closed surface rule
  • Change Decimation factor value to 0.8 to reduce number of points by 80%. You can try values up to about 0.99, the higher the value, the more points are removed.