Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@alireza-beta-monorepo/dicom-image-loader-new
Advanced tools
Readme
This package provides a DICOM image loader for the Cornerstone library. This is the successor to the [cornerstoneDICOMImageLoader] which provides the following added features:
A cornerstone Image Loader for DICOM P10 instances over HTTP (WADO-URI) or DICOMWeb (WADO-RS) and Local filedisk. This can be used to integrate cornerstone with WADO-URI servers, DICOMWeb servers or any other HTTP based server that returns DICOM P10 instances (e.g. Orthanc or custom servers)
yarn add @alireza-test-monorepo/dicom-image-loader
Specify the cornerstone instance you want to register the loader with.
cornerstoneDICOMImageLoader.external.cornerstone = cornerstone;
Have your code configure the web worker framework:
var config = {
maxWebWorkers: navigator.hardwareConcurrency || 1,
startWebWorkersOnDemand: true,
};
cornerstoneDICOMImageLoader.webWorkerManager.initialize(config);
See the web workers documentation for more details on configuring.
To be able to use the dynamic import feature for CDIL, instead of
import cornerstoneDICOMImageLoader from '@alireza-test-monorepo/dicom-image-loader';
you need to do:
import cornerstoneDICOMImageLoader from '@alireza-test-monorepo/dicom-image-loader/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js';
This way, codecs are loaded dynamically when needed. You have another option to create an alias in the webpack config file:
resolve: {
alias: {
'@alireza-test-monorepo/dicom-image-loader':
'@alireza-test-monorepo/dicom-image-loader/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js',
},
},
In addition WASM builds of the codec files should be made available in the build
folder. You can use CopyWebpackPlugin
to copy the WASM files to the build folder.
plugins: [
new CopyWebpackPlugin([
{
from:
'../../../node_modules/@alireza-test-monorepo/dicom-image-loader/dist/dynamic-import',
to: DIST_DIR,
},
]),
Note 1: You need to give the correct path in the CopyWebpackPlugin
, the above
path is relative to the node_modules
folder in the OHIF Viewer.
Note 2: For other http servers like IIS, you need to configure it to serve WASM files with the correct MIME type.
Why is this a separate library from cornerstone?
Mainly to avoid adding a dependency to cornerstone for the DICOM parsing library. While cornerstone is intended to be used to display medical images that are stored in DICOM, cornerstone aims to simplify the use of medical imaging and therefore tries to hide some of the complexity that exists within DICOM. It is also desirable to support display of non DICOM images so a DICOM independent image model makes sense.
How do I build this library myself?
See the documentation here
How do I add my own custom web worker tasks?
See the documentation here
How do I create imageIds that work with this image loader?
See the documentation here
FAQs
Cornerstone Image Loader for DICOM WADO-URI and WADO-RS and Local file
The npm package @alireza-beta-monorepo/dicom-image-loader-new receives a total of 0 weekly downloads. As such, @alireza-beta-monorepo/dicom-image-loader-new popularity was classified as not popular.
We found that @alireza-beta-monorepo/dicom-image-loader-new demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.