Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hackermd committed Sep 13, 2022
1 parent ab7216e commit 8af5b3a
Show file tree
Hide file tree
Showing 56 changed files with 1,136 additions and 295 deletions.
24 changes: 12 additions & 12 deletions docs/annotation.AnnotationGroup.html
Expand Up @@ -402,7 +402,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line17">line 17</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line14">line 14</a>
</li></ul></dd>


Expand Down Expand Up @@ -506,7 +506,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line129">line 129</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line126">line 126</a>
</li></ul></dd>


Expand Down Expand Up @@ -578,7 +578,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line138">line 138</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line135">line 135</a>
</li></ul></dd>


Expand Down Expand Up @@ -650,7 +650,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line120">line 120</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line117">line 117</a>
</li></ul></dd>


Expand Down Expand Up @@ -722,7 +722,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line111">line 111</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line108">line 108</a>
</li></ul></dd>


Expand Down Expand Up @@ -794,7 +794,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line147">line 147</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line144">line 144</a>
</li></ul></dd>


Expand Down Expand Up @@ -866,7 +866,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line156">line 156</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line153">line 153</a>
</li></ul></dd>


Expand Down Expand Up @@ -938,7 +938,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line174">line 174</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line171">line 171</a>
</li></ul></dd>


Expand Down Expand Up @@ -1010,7 +1010,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line183">line 183</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line180">line 180</a>
</li></ul></dd>


Expand Down Expand Up @@ -1082,7 +1082,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line165">line 165</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line162">line 162</a>
</li></ul></dd>


Expand Down Expand Up @@ -1154,7 +1154,7 @@ <h5>Type:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line102">line 102</a>
<a href="annotation.js.html">annotation.js</a>, <a href="annotation.js.html#line99">line 99</a>
</li></ul></dd>


Expand Down Expand Up @@ -1194,7 +1194,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/annotation.html
Expand Up @@ -131,7 +131,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
79 changes: 72 additions & 7 deletions docs/annotation.js.html
Expand Up @@ -26,10 +26,7 @@ <h1 class="page-title">Source: annotation.js</h1>

<section>
<article>
<pre class="prettyprint source linenums"><code>import {
_fetchBulkdata,
getContentItemNameCodedConcept
} from './utils.js'
<pre class="prettyprint source linenums"><code>import { _fetchBulkdata } from './utils.js'

const _attrs = Symbol('attrs')

Expand Down Expand Up @@ -242,11 +239,13 @@ <h1 class="page-title">Source: annotation.js</h1>
)
} else {
if ('PointCoordinatesData' in bulkdataItem) {
console.info(`fetch point coordinate data of annotation group "${uid}"`)
return await _fetchBulkdata({
client,
reference: bulkdataItem.PointCoordinatesData
})
} else if ('DoublePointCoordinatesData' in bulkdataItem) {
console.info(`fetch point coordinate data of annotation group "${uid}"`)
return await _fetchBulkdata({
client,
reference: bulkdataItem.DoublePointCoordinatesData
Expand Down Expand Up @@ -294,6 +293,7 @@ <h1 class="page-title">Source: annotation.js</h1>
}
} else {
if ('LongPrimitivePointIndexList' in bulkdataItem) {
console.info(`fetch point index list of annotation group "${uid}"`)
return await _fetchBulkdata({
client,
reference: bulkdataItem.LongPrimitivePointIndexList
Expand Down Expand Up @@ -352,6 +352,11 @@ <h1 class="page-title">Source: annotation.js</h1>
measurementBulkdataItem.MeasurementValuesSequence[0]
)
if ('FloatingPointValues' in valuesBulkdataItem) {
const nameItem = measurementMetadataItem.ConceptNameCodeSequence[0]
const name = nameItem.CodeMeaning
console.info(
`fetch measurement values for measurement #${index} "${name}"`
)
return await _fetchBulkdata({
client,
reference: valuesBulkdataItem.FloatingPointValues
Expand Down Expand Up @@ -408,6 +413,11 @@ <h1 class="page-title">Source: annotation.js</h1>
.MeasurementValuesSequence[0]
)
if ('AnnotationIndexList' in valuesBulkdataItem) {
const nameItem = measurementMetadataItem.ConceptNameCodeSequence[0]
const name = nameItem.CodeMeaning
console.info(
`fetch measurement indices for measurement #${index} "${name}"`
)
return await _fetchBulkdata({
client,
reference: valuesBulkdataItem.AnnotationIndexList
Expand All @@ -420,7 +430,7 @@ <h1 class="page-title">Source: annotation.js</h1>
}

/**
* Fetch measurements of an annotation group.
* Fetch all measurements of an annotation group.
*
* @param {object} options
* @param {object} options.metadataItem - Metadata of Annotation Group Sequence item
Expand All @@ -440,7 +450,8 @@ <h1 class="page-title">Source: annotation.js</h1>
if (metadataItem.MeasurementsSequence !== undefined) {
for (let i = 0; i &lt; metadataItem.MeasurementsSequence.length; i++) {
const item = metadataItem.MeasurementsSequence[i]
const name = getContentItemNameCodedConcept(item)
const name = item.ConceptNameCodeSequence[0]
const unit = item.MeasurementUnitsCodeSequence[0]
const values = await _fetchMeasurementValues({
metadataItem,
bulkdataItem,
Expand All @@ -455,6 +466,7 @@ <h1 class="page-title">Source: annotation.js</h1>
})
measurements.push({
name,
unit,
values,
indices
})
Expand All @@ -463,6 +475,58 @@ <h1 class="page-title">Source: annotation.js</h1>
return measurements
}

/**
* Fetch an individual measurement of an annotation group.
*
* @param {object} options
* @param {object} options.metadataItem - Metadata of Annotation Group Sequence item
* @param {object} options.bulkdataItem - Bulkdata of Annotation Group Sequence item
* @param {object} options.index - Index of the Measurements Sequence item
* @param {object} options.client - DICOMweb client
*
* @returns {Promise&lt;Array&lt;object>>} Name, values, and indices of measurements
*
* @private
*/
async function _fetchMeasurement ({
metadataItem,
bulkdataItem,
index,
client
}) {
if (metadataItem.MeasurementsSequence == null) {
throw new Error(
'Measurements Sequence element is not contained in metadata.'
)
}
if (metadataItem.MeasurementsSequence.length === 0) {
throw new Error(
'Measurements Sequence element in empty.'
)
}
const item = metadataItem.MeasurementsSequence[index]
if (item == null) {
throw new Error(
`Measurements Sequence does not contain an item #${index}.`
)
}
const name = item.ConceptNameCodeSequence[0]
const unit = item.MeasurementUnitsCodeSequence[0]
const values = await _fetchMeasurementValues({
metadataItem,
bulkdataItem,
index,
client
})
const indices = await _fetchMeasurementIndices({
metadataItem,
bulkdataItem,
index,
client
})
return { name, unit, values, indices }
}

/**
* Get dimensionality of coordinates.
*
Expand Down Expand Up @@ -753,6 +817,7 @@ <h1 class="page-title">Source: annotation.js</h1>
_fetchGraphicData,
_fetchGraphicIndex,
_fetchMeasurements,
_fetchMeasurement,
_getCentroid,
_getCommonZCoordinate,
_getCoordinateDimensionality
Expand All @@ -773,7 +838,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/annotations__AnnotationManager.js.html
Expand Up @@ -230,7 +230,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/annotations_markups__MarkupManager.js.html
Expand Up @@ -567,7 +567,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/api.html
Expand Up @@ -125,7 +125,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/color.PaletteColorLookupTable.html
Expand Up @@ -707,7 +707,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/color.html
Expand Up @@ -662,7 +662,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/color.js.html
Expand Up @@ -462,7 +462,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/dicom-microscopy-viewer.js.html
Expand Up @@ -238,7 +238,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="annota
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 05 2022 22:09:47 GMT-0400 (Eastern Daylight Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 22:55:18 GMT-0400 (Eastern Daylight Time)
</footer>

<script> prettyPrint(); </script>
Expand Down

0 comments on commit 8af5b3a

Please sign in to comment.