Skip to content

Commit

Permalink
fixed mouse cursor for FreeHandRoi tool and make it draggable (#338)
Browse files Browse the repository at this point in the history
* fixed mouse cursor for FreeHandRoi tool

* Update docs

* fixed handles color and radius

* Update docs

* config handle radius in freehandRoi

* Update docs

* fixed poly feature freehandRoiTool

TODO:
check movement handles
check movement Roi

* Update docs

* test Edit Modify

* fixed movement handles

* Update docs

* translation implemented and fixed

* build+ docs + fixes

* Update docs

* adapted to touch

* Update docs

* Update docs

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent bbfc2f7 commit f9352ff
Show file tree
Hide file tree
Showing 9 changed files with 401 additions and 108 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

## Dicom Image Toolkit for CornerstoneJS

### Current version: 2.4.19
### Current version: 2.4.20

### Latest Published Release: 2.4.19
### Latest Published Release: 2.4.20

This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.

Expand Down
63 changes: 63 additions & 0 deletions dist/imaging/tools/custom/FreehandRoiUSTool.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default class FreehandRoiTool {
_dragging: boolean;
_modifying: boolean;
modality: any;
index: any;
pointNear: number | boolean | Object | null;
/**
* Event handler for MOUSE_DOWN during drawing event loop.
*
Expand Down Expand Up @@ -69,6 +71,30 @@ export default class FreehandRoiTool {
* @returns {undefined}
*/
_editMouseDragCallback(evt: Object): undefined;
/**
* Event handler for MOUSE_UP during lines drag event loop.
*
* @private
* @param {Object} evt - The event.
* @returns {undefined}
*/
private _editMouseUpAllCallback;
/**
* Event handler for MOUSE_DRAG during lines drag event loop (Roi translation).
*
* @event
* @param {Object} evt - The event.
* @returns {undefined}
*/
_editMouseDragAllCallback(evt: Object): undefined;
/**
* Event handler for TOUCH_DRAG during lines drag event loop (Roi translation).
*
* @event
* @param {Object} evt - The event.
* @returns {undefined}
*/
_editTouchDragAllCallback(evt: Object): undefined;
/**
* Event handler for TOUCH_START during drawing event loop.
*
Expand Down Expand Up @@ -107,10 +133,15 @@ export default class FreehandRoiTool {
active: boolean;
invalidated: boolean;
color: undefined;
canComplete: boolean;
handles: {
points: never[];
};
} | undefined;
newMeasur: boolean | undefined;
finished: boolean | undefined;
modifying: any;
modifyingAll: any;
/**
*
*
Expand All @@ -120,6 +151,17 @@ export default class FreehandRoiTool {
* @returns {Boolean}
*/
pointNearTool(element: any, data: any, coords: any): boolean;
uuid: any;
dataAll: any;
/**
*
*
* @param {*} element element
* @param {*} data data
* @param {*} coords coords
* @returns {Boolean}
*/
_pointNearLine(element: any, data: any, coords: any): boolean;
/**
* @param {*} element
* @param {*} data
Expand Down Expand Up @@ -156,6 +198,7 @@ export default class FreehandRoiTool {
* @returns {undefined}
*/
renderToolData(evt: any): undefined;
data: any;
addNewMeasurement(evt: any): void;
preMouseDownCallback(evt: any): boolean;
handleSelectedCallback(evt: any, toolData: any, handle: any, interactionType?: string): void;
Expand All @@ -167,6 +210,7 @@ export default class FreehandRoiTool {
* @returns {null}
*/
public completeDrawing(element: Object): null;
dragged: boolean | undefined;
/**
* Returns the previous handle to the current one.
* @param {Number} currentHandle - the current handle index
Expand Down Expand Up @@ -360,6 +404,16 @@ export default class FreehandRoiTool {
* @returns {undefined}
*/
private _activateModify;
element: Object | undefined;
/**
* Adds modify loop event listeners for Roi translation.
*
* @private
* @param {Object} element - The viewport element to add event listeners to.
* @modifies {element}
* @returns {undefined}
*/
private _activateModifyAll;
/**
* Removes modify loop event listeners.
*
Expand All @@ -369,6 +423,15 @@ export default class FreehandRoiTool {
* @returns {undefined}
*/
private _deactivateModify;
/**
* Removes modify loop event listeners for Roi translation.
*
* @private
* @param {Object} element - The viewport element to add event listeners to.
* @modifies {element}
* @returns {undefined}
*/
private _deactivateModifyAll;
passiveCallback(element: any): void;
enabledCallback(element: any): void;
disabledCallback(element: any): void;
Expand Down
2 changes: 1 addition & 1 deletion dist/larvitar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/larvitar.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ <h3> </h3>
<h1 id="larvitar">Larvitar</h1>
<p><a href="https://github.com/dvisionlab/Larvitar"><img src="https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&amp;prefix=%E2%89%A5&amp;suffix=%25&amp;query=$.typeCoverage.atLeast&amp;uri=https%3A%2F%2Fraw.githubusercontent.com%2Fplantain-00%2Ftype-coverage%2Fmaster%2Fpackage.json" alt="type-coverage"></a></p>
<h2 id="dicom-image-toolkit-for-cornerstonejs">Dicom Image Toolkit for CornerstoneJS</h2>
<h3 id="current-version%3A-2.4.19">Current version: 2.4.19</h3>
<h3 id="latest-published-release%3A-2.4.19">Latest Published Release: 2.4.19</h3>
<h3 id="current-version%3A-2.4.20">Current version: 2.4.20</h3>
<h3 id="latest-published-release%3A-2.4.20">Latest Published Release: 2.4.20</h3>
<p>This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.</p>
<h2 id="features%3A">Features:</h2>
<ul>
Expand Down
1 change: 0 additions & 1 deletion docs/examples/defaultTools.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
</pre>
</div>
</div>

<script src="./larvitar.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/larvitar.js

Large diffs are not rendered by default.

Loading

0 comments on commit f9352ff

Please sign in to comment.