Skip to content

Commit

Permalink
fix(release): try to release nifti loader (#772)
Browse files Browse the repository at this point in the history
* fix(release): try to release nifti loader

* update docs order

* fix docs
  • Loading branch information
sedghi committed Sep 7, 2023
1 parent 412a909 commit 74bbde0
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 49 deletions.
1 change: 1 addition & 0 deletions packages/core/src/RenderingEngine/RenderingEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const VIEWPORT_MIN_SIZE = 2;
* trigger a render on a specific viewport(s). Each viewport also has a `.render` method which can be used to trigger a render on that
* viewport.
*
*
* Rendering engine uses `detect-gpu` external library to detect if GPU is available and
* it has minimum requirement to be able to render a volume with vtk.js. If GPU is not available
* RenderingEngine will throw an error if you try to render a volume; however, for StackViewports
Expand Down
3 changes: 3 additions & 0 deletions packages/nifti-volume-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"directories": {
"test": "test"
},
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"scripts": {
"build:esm": "tsc --project ./tsconfig.esm.json",
Expand Down
108 changes: 59 additions & 49 deletions utils/ExampleRunner/example-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
"description": "Basic usage"
},
"tools-basic": {
"description": "Basic usage of Tools library"
"description": "Tools library"
},
"tools-segmentation": {
"description": "Segmentation usage"
},
"core-advanced": {
"description": "Advanced usage"
"description": "Segmentation"
},
"tools-advanced": {
"description": "Advanced usage of Tools library"
"description": "Advanced Tools library"
},
"dicom-image-loader": {
"description": "usage of cornerstone dicom image loader"
"description": "Cornerstone dicom image loader"
},
"adapters": {
"description": "usage of cornerstone adapters"
"description": "Cornerstone adapters"
},
"nifti": {
"description": "Nifti Volume loader"
}
},
"examplesByCategory": {
Expand Down Expand Up @@ -99,16 +99,22 @@
"changeColorMap": {
"name": "Change the colormap and adjusting the opacity",
"description": "Demonstrate how to interact with a fusion viewport, specifically by changing the colormap and adjusting the opacity."
}
},
"core-advanced": {
},
"volumePriorityLoading": {
"name": "Prioritizing Slices during Volume Loading",
"description": "Demonstrates how to customize the slice loading order using the streaming-image volume loader"
},
"programaticPanZoom": {
"name": "Programmatic Pan/Zoom",
"description": "Demonstrates how to programmatically pan/zoom a stack viewport. It can be used for setting initial display area and presentation state."
},
"local": {
"name": "DICOM P10 from the local file system",
"description": "Provides an interface to load a DICOM P10 image from your local file system to the Cornerstone3D"
},
"localCPU": {
"name": "DICOM P10 from the local file system using CPU",
"description": "Cornerstone3D uses WebGL for rendering by default (if available) and a fallback to CPU. This example force rendering on CPU for debugging purposes."
}
},
"tools-basic": {
Expand All @@ -128,14 +134,6 @@
"name": "Annotation Tool Modes",
"description": "Demonstrates the various tool modes for annotation tools (active, passive, enabled, disabled)"
},
"local": {
"name": "DICOM P10 from the local file system",
"description": "Provides an interface to load a DICOM P10 image from your local file system to the Cornerstone3D"
},
"localCPU": {
"name": "DICOM P10 from the local file system using CPU",
"description": "Cornerstone3D uses WebGL for rendering by default (if available) and a fallback to CPU. This example force rendering on CPU for debugging purposes."
},
"stackAnnotationTools": {
"name": "Stack Annotation Tools",
"description": "Demonstrates usage of various annotation tools (Probe, Rectangle ROI, Elliptical ROI, Bidirectional measurements) on a Stack Viewport."
Expand Down Expand Up @@ -172,6 +170,32 @@
"name": "CINE Tool",
"description": "Demonstrates the usage of the CINE tool"
},
"planarFreehandROITool": {
"name": "Freehand ROI Tool",
"description": "Demonstrates drawing of both open and closed freehand ROIs (contour tool) on stack and volume viewports"
},
"polyDataActorManipulationTools": {
"name": "Manipulation Tools with Poly Data in a Volume Viewport API",
"description": "Demonstrates how to interact with a Volume viewport (Pan, Zoom, Rotate) by mouse events"
},
"volumeViewportOrientation": {
"name": "Volume Viewport Orientation",
"description": "Demonstrates you can switch between different orientation of a volume viewport"
},
"referenceCursors": {
"name": "Referencing Cursors",
"description": "Demonstrates how to synchronize the cursor between multiple viewports"
},
"doubleClickWithStackAnnotationTools": {
"name": "Double Click With Stack Annotation Tools",
"description": "Demonstrates double click detection before/during/after using various annotation tools on a stack viewport."
},
"dynamicPetCt": {
"name": "Load a petCT data where PT series is 4D",
"description": "Demonstrates how to render a 4D data into multiple viewports and fuse them"
}
},
"tools-segmentation" : {
"labelmapRendering": {
"name": "Labelmap Segmentation Rendering",
"description": "Demonstrates how to add a Labelmap to the viewports for rendering"
Expand All @@ -184,10 +208,6 @@
"name": "Labelmap Segmentation Swapping",
"description": "Demonstrate how to display segmentations on a volume viewport, and swap which segmentation is being displayed"
},
"planarFreehandROITool": {
"name": "Freehand ROI Tool",
"description": "Demonstrates drawing of both open and closed freehand ROIs (contour tool) on stack and volume viewports"
},
"labelmapGlobalConfiguration": {
"name": "Global Labelmap Segmentation Configuration",
"description": "Demonstrates how to set a global configuration for segmentation representations"
Expand All @@ -212,25 +232,13 @@
"name": "Labelmap Segmentation Swapping",
"description": "Demonstrate how a segment can be locked such that it cannot be edited by segmentation tools"
},
"polyDataActorManipulationTools": {
"name": "Manipulation Tools with Poly Data in a Volume Viewport API",
"description": "Demonstrates how to interact with a Volume viewport (Pan, Zoom, Rotate) by mouse events"
},
"volumeViewportOrientation": {
"name": "Volume Viewport Orientation",
"description": "Demonstrates you can switch between different orientation of a volume viewport"
},
"referenceCursors": {
"name": "Referencing Cursors",
"description": "Demonstrates how to synchronize the cursor between multiple viewports"
},
"doubleClickWithStackAnnotationTools": {
"name": "Double Click With Stack Annotation Tools",
"description": "Demonstrates double click detection before/during/after using various annotation tools on a stack viewport."
"labelmapRenderingDifferentResolutions": {
"name": "Rendering Labelmap with Different Resolutions",
"description": "Demonstrates that the segmentation resolution need not to be the same as the source data"
},
"dynamicPetCt": {
"name": "Load a petCT data where PT series is 4D",
"description": "Demonstrates how to render a 4D data into multiple viewports and fuse them"
"rectangleROIThreshold": {
"name": "Rectangle ROI Threshold Segmentation",
"description": "Demonstrates how to use the rectangle roi tool to perform threshold segmentation"
}
},
"tools-advanced": {
Expand Down Expand Up @@ -262,14 +270,6 @@
"name": "Volume Viewport Synchronization",
"description": "Demonstrates how to set up synchronization between viewports for viewport-level (e.g. camera) and actor-level (e.g. VOI) properties."
},
"labelmapRenderingDifferentResolutions": {
"name": "Rendering Labelmap with Different Resolutions",
"description": "Demonstrates that the segmentation resolution need not to be the same as the source data"
},
"rectangleROIThreshold": {
"name": "Rectangle ROI Threshold Segmentation",
"description": "Demonstrates how to use the rectangle roi tool to perform threshold segmentation"
},
"cancelAnnotationDrawing": {
"name": "Cancel Annotation Drawing",
"description": "Demonstrates how to use the keyboard (ESC) key to cancel annotation drawing."
Expand All @@ -294,6 +294,16 @@
"name": "DICOM SEG export",
"description": "Demonstrates how to export a segmentation to DICOM SEG"
}
},
"nifti": {
"niftiBasic": {
"name": "Load Nifti Volume",
"description": "Demonstrates how to load and render a nifti volume"
},
"niftiWithTools": {
"name": "Tool Usage in Nifti",
"description": "Demonstrates how to use manipulation and annotation tools on a nifti volume"
}
}
}
}
5 changes: 5 additions & 0 deletions utils/ExampleRunner/template-multiexample-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const csStreamingBasePath = path.resolve(
const csDICOMImageLoaderDistPath = path.resolve(
'./packages/dicomImageLoader/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js'
);
const csNiftiPath = path.resolve('packages/nifti-volume-loader/src/index');

module.exports = function buildConfig(names, exampleBasePaths, destPath, root) {
let multiExampleEntryPoints = '';
Expand Down Expand Up @@ -109,6 +110,10 @@ module.exports = {
/\\/g,
'/'
)}'
'@cornerstonejs/nifti-volume-loader': '${csNiftiPath.replace(
/\\/g,
'/'
)}',
},
modules,
extensions: ['.ts', '.tsx', '.js', '.jsx'],
Expand Down

0 comments on commit 74bbde0

Please sign in to comment.