allow being called via Imaris or Matlab directly