extensions/xnat/src/utils/IO/classes/_tempDCMJSFork/Segmentation_4X_fork.js
/**
 * generateSegmentation - Generates cornerstoneTools brush data, given a stack of
 * imageIds, images and the cornerstoneTools brushData.
 *
 * @param  {object[]} images An array of cornerstone images that contain the source
 *                           data under `image.data.byteArray.buffer`.
 * @param  {Object|Object[]} inputLabelmaps3D The cornerstone `Labelmap3D` object, or an array of objects.
 * @param  {Object} userOptions Options to pass to the segmentation derivation and `fillSegmentation`.
 * @returns {Blob}
 */
Generates cornerstoneTools brush data, given a stack of
imageIds, images and the cornerstoneTools brushData.

@param  {object[]} images An array of cornerstone images that contain the source
data under `image.data.byteArray.buffer`.
@param  {Object|Object[]} inputLabelmaps3D The cornerstone `Labelmap3D` object, or an array of objects.
@param  {Object} userOptions Options to pass to the segmentation derivation and `fillSegmentation`.
@returns {Blob}
Generates cornerstoneTools brush data given a stack of imageIds images and the cornerstoneTools brushData . @param { object [] } images An array of cornerstone images that contain the source data under ` image . data . byteArray . buffer ` . @param { Object|Object [] } inputLabelmaps3D The cornerstone ` Labelmap3D ` object or an array of objects . @param { Object } userOptions Options to pass to the segmentation derivation and ` fillSegmentation ` . @returns { Blob }
function generateSegmentation(images, inputLabelmaps3D, userOptions = {}) {
  const isMultiframe = images[0].imageId.includes('?frame');
  const segmentation = _createSegFromImages(images, isMultiframe, userOptions);
  return fillSegmentation(segmentation, inputLabelmaps3D, userOptions);
}
function generateSegmentation ( images , inputLabelmaps3D , userOptions = { } ) { const isMultiframe = images [ 0 ] . imageId . includes ( '?frame' ) ; const segmentation = _createSegFromImages ( images , isMultiframe , userOptions ) ; return fillSegmentation ( segmentation , inputLabelmaps3D , userOptions ) ; }
generateSegmentation - Generates cornerstoneTools brush data, given a stack of
 imageIds, images and the cornerstoneTools brushData.
generateSegmentation - Generates cornerstoneTools brush data given a stack of imageIds images and the cornerstoneTools brushData .