UNPKG

dicom-microscopy-viewer

Version:
252 lines (209 loc) 8.56 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: segment.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: segment.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>const _attrs = Symbol('attrs') /** * A segment. * * Describes an item of the Segment Sequence of a DICOM Segmentation instance. * * @class * @memberof segment */ class Segment { /** * @param {Object} options - Options for construction of Segment * @param {string} options.uid - Unique tracking identifier * @param {number} options.number - Segment Number (one-based index value) * @param {string} options.label - Segment Label * @param {string} options.algorithmName - Segment Algorithm Name * @param {Object} options.algorithmType - Segment Algorithm Type * @param {Object} options.propertyCategory - Segmented Property Category Code * @param {Object} options.propertyType - Segmented Property Type Code * @param {string} options.studyInstanceUID - Study Instance UID of DICOM * Segmentation instances * @param {string} options.seriesInstanceUID - Series Instance UID of DICOM * Segmentation instances * @param {string[]} options.sopInstanceUIDs - SOP Instance UIDs of DICOM * Segmentation instances * @param {string|undefined} options.paletteColorLookupTableUID - Palette * Color Lookup Table UID */ constructor ({ uid, number, label, propertyCategory, propertyType, algorithmType, algorithmName, studyInstanceUID, seriesInstanceUID, sopInstanceUIDs, paletteColorLookupTableUID }) { this[_attrs] = {} if (uid === undefined) { throw new Error('Unique Tracking Identifier is required.') } else { this[_attrs].uid = uid } if (number === undefined) { throw new Error('Segment Number is required.') } this[_attrs].number = number if (label === undefined) { throw new Error('Segment Label is required.') } this[_attrs].label = label if (propertyCategory === undefined) { throw new Error('Segmented Property Category Code is required.') } this[_attrs].propertyCategory = propertyCategory if (propertyType === undefined) { throw new Error('Segmented Property Type Code is required.') } this[_attrs].propertyType = propertyType if (algorithmName === undefined) { throw new Error('Segment Algorithm Name is required.') } this[_attrs].algorithmType = algorithmType if (algorithmType === undefined) { throw new Error('Segment Algorithm Type is required.') } this[_attrs].algorithmName = algorithmName if (studyInstanceUID === undefined) { throw new Error('Study Instance UID is required.') } this[_attrs].studyInstanceUID = studyInstanceUID if (seriesInstanceUID === undefined) { throw new Error('Series Instance UID is required.') } this[_attrs].seriesInstanceUID = seriesInstanceUID if (sopInstanceUIDs === undefined) { throw new Error('SOP Instance UIDs are required.') } this[_attrs].sopInstanceUIDs = sopInstanceUIDs this[_attrs].paletteColorLookupTableUID = paletteColorLookupTableUID Object.freeze(this) } /** * Unique Tracking Identifier * * @type string */ get uid () { return this[_attrs].uid } /** * Segment Number. * * @type number */ get number () { return this[_attrs].number } /** * Segment Label * * @type string */ get label () { return this[_attrs].label } /** * Segment Algorithm Name * * @type string */ get algorithmName () { return this[_attrs].algorithmName } /** * Segment Algorithm Type * * @type object */ get algorithmType () { return this[_attrs].algorithmType } /** * Segmented Property Category Code * * @type object */ get propertyCategory () { return this[_attrs].propertyCategory } /** * Segmented Property Type Code * * @type object */ get propertyType () { return this[_attrs].propertyType } /** * Study Instance UID of DICOM Segmentation instances. * * @type string */ get studyInstanceUID () { return this[_attrs].studyInstanceUID } /** * Series Instance UID of DICOM Segmentation instances. * * @type string */ get seriesInstanceUID () { return this[_attrs].seriesInstanceUID } /** * SOP Instance UIDs of DICOM Segmentation instances. * * @type string[] */ get sopInstanceUIDs () { return this[_attrs].sopInstanceUIDs } /** * Palette Color Lookup Table UID. * * @type string */ get paletteColorLookupTableUID () { return this[_attrs].paletteColorLookupTableUID } } export { Segment } </code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annotation.html">annotation</a></li><li><a href="api.html">api</a></li><li><a href="color.html">color</a></li><li><a href="events.html">events</a></li><li><a href="mapping.html">mapping</a></li><li><a href="metadata.html">metadata</a></li><li><a href="opticalPath.html">opticalPath</a></li><li><a href="roi.html">roi</a></li><li><a href="scoord3d.html">scoord3d</a></li><li><a href="segment.html">segment</a></li><li><a href="utils.html">utils</a></li><li><a href="viewer.html">viewer</a></li></ul><h3>Classes</h3><ul><li><a href="annotation.AnnotationGroup.html">AnnotationGroup</a></li><li><a href="color.PaletteColorLookupTable.html">PaletteColorLookupTable</a></li><li><a href="mapping.ParameterMapping.html">ParameterMapping</a></li><li><a href="mapping.Transformation.html">Transformation</a></li><li><a href="metadata.Comprehensive3DSR.html">Comprehensive3DSR</a></li><li><a href="metadata.MicroscopyBulkSimpleAnnotations.html">MicroscopyBulkSimpleAnnotations</a></li><li><a href="metadata.ParametricMap.html">ParametricMap</a></li><li><a href="metadata.Segmentation.html">Segmentation</a></li><li><a href="metadata.SOPClass.html">SOPClass</a></li><li><a href="metadata.VLWholeSlideMicroscopyImage.html">VLWholeSlideMicroscopyImage</a></li><li><a href="module.exports_module.exports.html">exports</a></li><li><a href="opticalPath.OpticalPath.html">OpticalPath</a></li><li><a href="roi.ROI.html">ROI</a></li><li><a href="scoord3d.Ellipse.html">Ellipse</a></li><li><a href="scoord3d.Ellipsoid.html">Ellipsoid</a></li><li><a href="scoord3d.Multipoint.html">Multipoint</a></li><li><a href="scoord3d.Point.html">Point</a></li><li><a href="scoord3d.Polygon.html">Polygon</a></li><li><a href="scoord3d.Polyline.html">Polyline</a></li><li><a href="scoord3d.Scoord3D.html">Scoord3D</a></li><li><a href="segment.Segment.html">Segment</a></li><li><a href="viewer.LabelImageViewer.html">LabelImageViewer</a></li><li><a href="viewer.OverviewImageViewer.html">OverviewImageViewer</a></li><li><a href="viewer.VolumeImageViewer.html">VolumeImageViewer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addTask">addTask</a></li><li><a href="global.html#cancelTask">cancelTask</a></li><li><a href="global.html#decode">decode</a></li><li><a href="global.html#getStatistics">getStatistics</a></li><li><a href="global.html#handleMessageFromWorker">handleMessageFromWorker</a></li><li><a href="global.html#initialize">initialize</a></li><li><a href="global.html#loadWebWorkerTask">loadWebWorkerTask</a></li><li><a href="global.html#setTaskPriority">setTaskPriority</a></li><li><a href="global.html#spawnWebWorker">spawnWebWorker</a></li><li><a href="global.html#startTaskOnWebWorker">startTaskOnWebWorker</a></li><li><a href="global.html#terminateAllWebWorkers">terminateAllWebWorkers</a></li><li><a href="global.html#transform">transform</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Sep 29 2022 16:54:54 GMT-0400 (Eastern Daylight Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>