Skip to content

Commit

Permalink
fix: minor jsdoc issues preventing API docs from building
Browse files Browse the repository at this point in the history
  • Loading branch information
swederik committed Jul 29, 2021
1 parent de4cb68 commit 22b9c14
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/drawing/drawArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import drawJoinedLines from './drawJoinedLines.js';
* @param {Object} end The end position.
* @param {string} color The color of the arrow.
* @param {number} lineWidth The width of the arrow line.
* @param {number[]|| undefined} [lineDash] The optional lineDash style.
* @param {number[] | undefined} [lineDash] The optional lineDash style.
* @returns {undefined}
*/
export default function(context, start, end, color, lineWidth, lineDash) {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/segmentationModule/colorLUT.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getColorForSegmentIndexColorLUT(
*
* @param {Object|number} labelmap3DOrColorLUTIndex Either a `Labelmap3D` object (who's referenced colorLUT will be changed), or a colorLUTIndex.
* @param {number} segmentIndex The segmentIndex color to change.
* @param {[number,number,number,number]} colorArray The color values in RGBA array format.
* @param {number[]} colorArray The color values in RGBA array format (required length 4).
*/
export function setColorForSegmentIndexOfColorLUT(
labelmap3DOrColorLUTIndex,
Expand Down
23 changes: 18 additions & 5 deletions src/tools/segmentation/strategies/correction.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const logger = getLogger('util:segmentation:operations:correction');
* - Stroke in-out-in: Section is added.
*
* @param {Object} evt The cornerstone event.
* @param {} operationData An object containing the `pixelData` to
* @param {Object} operationData An object containing the `pixelData` to
* modify, the `segmentIndex` and the `points` array.
*
* @returns {null}
Expand Down Expand Up @@ -462,13 +462,26 @@ function getNodesPerpendicularToPathPixel(pathPixel, nextPathPixel) {
}

/**
* Splits the path of nodes into seperate add/remove operations.
* @typedef {Object} Node
* @property {number} x - the X position
* @property {number} y - the Y position
* @property {number} segment - The segment index
*/

/**
* @typedef {Object} SegmentationOperations
* @property {boolean} additive - Whether the operation is additive or not
* @property {Node[]} nodes - The array of nodes
*/

/**
* Splits the path of nodes into separate add/remove operations.
*
* @param {Object[]} nodes The array of nodes.
* @param {number} segmentIndex The label value to replace.
* @returns {{additive: boolean, nodes: []}[]} An array of operations to perform,
* whether they are `additive` and the
* corresponding `nodes` of the operation.
* @returns {SegmentationOperations[]} An array of operations to perform,
* whether they are `additive` and the
* corresponding `nodes` of the operation.
*/
function splitLineIntoSeperateOperations(nodes, segmentIndex) {
// Check whether the first node is inside a segment of the appropriate label or not.
Expand Down

0 comments on commit 22b9c14

Please sign in to comment.