Skip to content

Commit

Permalink
fix: missing tool handling in updateViewportData (#314)
Browse files Browse the repository at this point in the history
* fix: missing tool handling in updateViewportData

* Update docs

* logs removed + docs fixed

* Update docs

* error in WS and exportImageToBase64OriginalSizes fixed

* Update docs

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: laura-borghesi-lum00n <[email protected]>
  • Loading branch information
3 people authored Feb 26, 2024
1 parent 9f9e81b commit d54f1cf
Show file tree
Hide file tree
Showing 37 changed files with 1,338 additions and 1,301 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.0
### Current version: 2.4.1

### Latest Published Release: 2.4.0
### Latest Published Release: 2.4.1

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
5 changes: 3 additions & 2 deletions dist/imaging/imageRendering.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ export declare const resetViewports: (elementIds: string[], keys?: Array<"contra
* Update viewport data in store
* @instance
* @function updateViewportData
* @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
* @param {Object} viewportData - The new viewport data
* @param {string} elementId - The html div id used for rendering or its DOM HTMLElement
* @param {Viewport} viewportData - The new viewport data
* @param {string} activeTool - The active tool on the viewport
*/
export declare const updateViewportData: (elementId: string, viewportData: Viewport, activeTool: string) => void;
/**
Expand Down
733 changes: 368 additions & 365 deletions 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.

2 changes: 1 addition & 1 deletion docs/documentation/Tools.Annotation.LengthTool.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ <h4 class="name" id="LengthTool"><span class="type-signature"></span>new LengthT

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line164119">line 164119</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line164122">line 164122</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/Tools.Brush.WSTool.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h4 class="name" id="WSTool"><span class="type-signature"></span>new WSTool<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line165269">line 165269</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line165272">line 165272</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/cornerstoneTools.LengthPlotTool.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h4 class="name" id="LengthPlotTool"><span class="type-signature"></span>new Len

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line163653">line 163653</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line163656">line 163656</a>
</li></ul></dd>


Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,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.0">Current version: 2.4.0</h3>
<h3 id="latest-published-release%3A-2.4.0">Latest Published Release: 2.4.0</h3>
<h3 id="current-version%3A-2.4.1">Current version: 2.4.1</h3>
<h3 id="latest-published-release%3A-2.4.1">Latest Published Release: 2.4.1</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
733 changes: 368 additions & 365 deletions docs/documentation/larvitar.js.html

Large diffs are not rendered by default.

48 changes: 36 additions & 12 deletions docs/documentation/module-imaging_imageRendering.html
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ <h4 class="name" id="flipImageHorizontal"><span class="type-signature"></span>fl

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159052">line 159052</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159055">line 159055</a>
</li></ul></dd>


Expand Down Expand Up @@ -600,7 +600,7 @@ <h4 class="name" id="flipImageVertical"><span class="type-signature"></span>flip

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159074">line 159074</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159077">line 159077</a>
</li></ul></dd>


Expand Down Expand Up @@ -735,7 +735,7 @@ <h4 class="name" id="getSeriesData"><span class="type-signature"></span>getSerie

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159205">line 159205</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159208">line 159208</a>
</li></ul></dd>


Expand Down Expand Up @@ -917,7 +917,7 @@ <h4 class="name" id="getTemporalSeriesData"><span class="type-signature"></span>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159176">line 159176</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159179">line 159179</a>
</li></ul></dd>


Expand Down Expand Up @@ -1075,7 +1075,7 @@ <h4 class="name" id="invertImage"><span class="type-signature"></span>invertImag

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159030">line 159030</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159033">line 159033</a>
</li></ul></dd>


Expand Down Expand Up @@ -2742,7 +2742,7 @@ <h4 class="name" id="rotateImageLeft"><span class="type-signature"></span>rotate

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159096">line 159096</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159099">line 159099</a>
</li></ul></dd>


Expand Down Expand Up @@ -2877,7 +2877,7 @@ <h4 class="name" id="rotateImageRight"><span class="type-signature"></span>rotat

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159118">line 159118</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159121">line 159121</a>
</li></ul></dd>


Expand Down Expand Up @@ -3012,7 +3012,7 @@ <h4 class="name" id="storeViewportData"><span class="type-signature"></span>stor

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line158941">line 158941</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line158944">line 158944</a>
</li></ul></dd>


Expand Down Expand Up @@ -3586,7 +3586,7 @@ <h4 class="name" id="updateTemporalViewportData"><span class="type-signature"></

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159140">line 159140</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159143">line 159143</a>
</li></ul></dd>


Expand Down Expand Up @@ -3729,7 +3729,7 @@ <h5 class="h5-parameters">Parameters:</h5>



<h4 class="name" id="updateViewportData"><span class="type-signature"></span>updateViewportData<span class="signature">(elementId, viewportData)</span><span class="type-signature"></span></h4>
<h4 class="name" id="updateViewportData"><span class="type-signature"></span>updateViewportData<span class="signature">(elementId, viewportData, activeTool)</span><span class="type-signature"></span></h4>



Expand Down Expand Up @@ -3823,7 +3823,7 @@ <h5 class="h5-parameters">Parameters:</h5>
<td class="type">


<span class="param-type">String</span>
<span class="param-type">string</span>



Expand All @@ -3847,7 +3847,7 @@ <h5 class="h5-parameters">Parameters:</h5>
<td class="type">


<span class="param-type">Object</span>
<span class="param-type">Viewport</span>



Expand All @@ -3862,6 +3862,30 @@ <h5 class="h5-parameters">Parameters:</h5>
</tr>



<tr>

<td class="name"><code>activeTool</code></td>


<td class="type">


<span class="param-type">string</span>




</td>





<td class="description last"><p>The active tool on the viewport</p></td>
</tr>


</tbody>
</table>

Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/module-imaging_imageReslice.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1 class="page-title">imaging/imageReslice</h1>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159312">line 159312</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159315">line 159315</a>
</li></ul></dd>


Expand Down Expand Up @@ -194,7 +194,7 @@ <h4 class="name" id="resliceSeries"><span class="type-signature"></span>resliceS

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159332">line 159332</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159335">line 159335</a>
</li></ul></dd>


Expand Down
32 changes: 16 additions & 16 deletions docs/documentation/module-imaging_imageStore.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1 class="page-title">imaging/imageStore</h1>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159384">line 159384</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159387">line 159387</a>
</li></ul></dd>


Expand Down Expand Up @@ -194,7 +194,7 @@ <h4 class="name" id="formatDate"><span class="type-signature"></span>formatDate<

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159778">line 159778</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159781">line 159781</a>
</li></ul></dd>


Expand Down Expand Up @@ -354,7 +354,7 @@ <h4 class="name" id="formatDateTime"><span class="type-signature"></span>formatD

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159791">line 159791</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159794">line 159794</a>
</li></ul></dd>


Expand Down Expand Up @@ -514,7 +514,7 @@ <h4 class="name" id="getDICOMTag"><span class="type-signature"></span>getDICOMTa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159984">line 159984</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159987">line 159987</a>
</li></ul></dd>


Expand Down Expand Up @@ -674,7 +674,7 @@ <h4 class="name" id="getDICOMTagCode"><span class="type-signature"></span>getDIC

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159966">line 159966</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159969">line 159969</a>
</li></ul></dd>


Expand Down Expand Up @@ -835,7 +835,7 @@ <h4 class="name" id="getTagValue"><span class="type-signature"></span>getTagValu

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line160252">line 160252</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line160255">line 160255</a>
</li></ul></dd>


Expand Down Expand Up @@ -1025,7 +1025,7 @@ <h4 class="name" id="isStringVr"><span class="type-signature"></span>isStringVr<

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159939">line 159939</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159942">line 159942</a>
</li></ul></dd>


Expand Down Expand Up @@ -1185,7 +1185,7 @@ <h4 class="name" id="isValidDate"><span class="type-signature"></span>isValidDat

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159817">line 159817</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159820">line 159820</a>
</li></ul></dd>


Expand Down Expand Up @@ -1345,7 +1345,7 @@ <h4 class="name" id="parseAgeTag"><span class="type-signature"></span>parseAgeTa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159902">line 159902</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159905">line 159905</a>
</li></ul></dd>


Expand Down Expand Up @@ -1505,7 +1505,7 @@ <h4 class="name" id="parseDateTag"><span class="type-signature"></span>parseDate

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159827">line 159827</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159830">line 159830</a>
</li></ul></dd>


Expand Down Expand Up @@ -1665,7 +1665,7 @@ <h4 class="name" id="parseDateTimeTag"><span class="type-signature"></span>parse

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159848">line 159848</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159851">line 159851</a>
</li></ul></dd>


Expand Down Expand Up @@ -1825,7 +1825,7 @@ <h4 class="name" id="parseDICOMFileIDTag"><span class="type-signature"></span>pa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159920">line 159920</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159923">line 159923</a>
</li></ul></dd>


Expand Down Expand Up @@ -1985,7 +1985,7 @@ <h4 class="name" id="parsePatientNameTag"><span class="type-signature"></span>pa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159890">line 159890</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159893">line 159893</a>
</li></ul></dd>


Expand Down Expand Up @@ -2145,7 +2145,7 @@ <h4 class="name" id="parseTag"><span class="type-signature"></span>parseTag<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line160002">line 160002</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line160005">line 160005</a>
</li></ul></dd>


Expand Down Expand Up @@ -2353,7 +2353,7 @@ <h4 class="name" id="parseTimeTag"><span class="type-signature"></span>parseTime

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159873">line 159873</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159876">line 159876</a>
</li></ul></dd>


Expand Down Expand Up @@ -2513,7 +2513,7 @@ <h4 class="name" id="~setValue"><span class="type-signature type-signature-inner

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159479">line 159479</a>
<a href="larvitar.js.html">larvitar.js</a>, <a href="larvitar.js.html#line159482">line 159482</a>
</li></ul></dd>


Expand Down
Loading

0 comments on commit d54f1cf

Please sign in to comment.