Skip to content

Commit

Permalink
Fix file manager import and example (#410)
Browse files Browse the repository at this point in the history
* resolve import issue + examples updated with renamed functions

* update version
  • Loading branch information
laura-borghesi-lum00n authored Dec 20, 2024
1 parent edac7d3 commit 9d6d629
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Dicom Image Toolkit for CornerstoneJS

### Current version: 3.0.0-beta.1
### Current version: 3.0.0-beta.2

### Latest Published Release: 2.7.3

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/4d.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];
let frameId = 0;
larvitar
Expand Down Expand Up @@ -296,7 +296,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];
let frameId = 0;
larvitar
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ <h1 style="text-align: center; color: #28b47f; font-weight: bold">
function getMetadata() {
const modal = document.getElementById("metadataModal");
const tableBody = document.querySelector("#metadataTable tbody");
const stack = larvitar.getLarvitarManager();
const stack = larvitar.getImageManager();
const seriesId = larvitar.store.get([
"viewports",
"viewer",
Expand Down Expand Up @@ -530,7 +530,7 @@ <h1 style="text-align: center; color: #28b47f; font-weight: bold">
});

function previousImage() {
const stack = larvitar.getLarvitarManager();
const stack = larvitar.getImageManager();
const seriesIds = Object.keys(stack);
const seriesId = larvitar.store.get([
"viewports",
Expand All @@ -551,7 +551,7 @@ <h1 style="text-align: center; color: #28b47f; font-weight: bold">
}

function nextImage() {
const stack = larvitar.getLarvitarManager();
const stack = larvitar.getImageManager();
const seriesIds = Object.keys(stack);
const seriesId = larvitar.store.get([
"viewports",
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/dsa.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];

let frameId = 0;
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/ecg.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];
let frameId = 0;
// check if the series has waveform data
Expand Down Expand Up @@ -201,7 +201,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];

let frameId = 0;
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/external.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
}

function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFiles(demoFiles)
.then(seriesStack => {
Expand Down Expand Up @@ -147,7 +147,7 @@
}

function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFiles(demoFiles)
.then(seriesStack => {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
let serie_2 = { ...seriesStack[seriesId] };
larvitar.populateLarvitarManager(seriesId, serie_1);
larvitar.populateLarvitarManager(seriesId, serie_2);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
console.log(manager);
layer_1 = larvitar.buildLayer(serie_1, "main");
layer_2 = larvitar.buildLayer(serie_2, "colored", {
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/masks.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
}

function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar.readFiles(demoFiles, function (seriesStack, err) {
if (seriesStack) {
// render the first series of the study
Expand Down Expand Up @@ -205,7 +205,7 @@
}

function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFiles(demoFiles)
.then(seriesStack => {
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/multiframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];

let frameId = 0;
Expand Down Expand Up @@ -177,7 +177,7 @@
let seriesId = _.keys(seriesStack)[0];
let serie = seriesStack[seriesId];
larvitar.populateLarvitarManager(seriesId, serie);
let manager = larvitar.getLarvitarManager();
let manager = larvitar.getImageManager();
let multiFrameSerie = manager[seriesId];

let frameId = 0;
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
larvitar.store.addViewport("viewer");

function renderPDF() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFile(demoFiles[0])
.then(image => {
larvitar.updateLarvitarManager(image);
let manager = larvitar.getLarvitarManager();
larvitar.updateImageManager(image);
let manager = larvitar.getImageManager();
let serie =
manager["1.2.276.0.7230010.3.1.3.296485376.1.1664404001.305752"];
larvitar.renderDICOMPDF(serie, "viewer", true).then(() => {
Expand Down Expand Up @@ -93,12 +93,12 @@
larvitar.store.addViewport("viewer");

function renderPDF() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFile(demoFiles[0])
.then(image => {
larvitar.updateLarvitarManager(image);
let manager = larvitar.getLarvitarManager();
larvitar.updateImageManager(image);
let manager = larvitar.getImageManager();
let serie =
manager["1.2.276.0.7230010.3.1.3.296485376.1.1664404001.305752"];
larvitar.renderDICOMPDF(serie, "viewer", true).then(() => {
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/segmentationTools.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
}

async function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFiles(demoFiles)
.then(seriesStack => {
Expand Down Expand Up @@ -432,7 +432,7 @@
}

async function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
const seriesStack = await larvitar.readFiles(demoFiles);
// render the first series of the study
let seriesId = _.keys(seriesStack)[0];
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/watershedSegmentationTool.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
}

async function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFiles(demoFiles)
.then(seriesStack => {
Expand Down Expand Up @@ -392,7 +392,7 @@
}

async function renderSerie() {
larvitar.resetLarvitarManager();
larvitar.resetImageManager();
larvitar
.readFiles(demoFiles)
.then(seriesStack => {
Expand Down
2 changes: 1 addition & 1 deletion imaging/loaders/fileLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

// external libraries
import { cornerstoneFileImageLoader } from "cornerstone-file-image-loader";
import cornerstoneFileImageLoader from "cornerstone-file-image-loader";

// internal libraries
import { clearImageCache } from "../imageRendering";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"medical",
"cornerstone"
],
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "typescript library for parsing, loading, rendering and interacting with DICOM images",
"repository": {
"url": "https://github.com/dvisionlab/Larvitar.git",
Expand Down

0 comments on commit 9d6d629

Please sign in to comment.