- View dicom(.dcm) files
- Use cornerstonejs plugins and features
$ npm install ngx-dicom
$ npm install cornerstone-core
$ npm install cornerstone-math
$ npm install cornerstone-tools
$ npm install cornerstone-wado-image-loader
$ npm install hammerjs
"scripts": [
"./node_modules/hammerjs/hammer.js",
"./node_modules/cornerstone-math/dist/cornerstoneMath.js",
"./node_modules/cornerstone-tools/dist/cornerstoneTools.js",
"./node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.bundle.min.js",
"./node_modules/dicom-parser/dist/dicomParser.js"
]
imports: [
NgxDicomModule,
]
config: IDicomConfig = {
fileUrl: 'http://localhost:4200/assets/0002.DCM',
tools: [
{
name: 'DragProbe',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'Eraser',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'Magnify',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'StackScrollMouseWheel',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Active
},
{
name: 'Rotate',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'Pan',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'ZoomMouseWheel',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'Length',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'Angle',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'FreehandRoi',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
},
{
name: 'Wwwc',
options: { mouseButtonMask: 1 },
mode: ToolModeEnum.Passive
}
],
classList: 'canvas-container'
};
<ngx-dicom [config]="config" (initialized)="viewerProvider = $event"></ngx-dicom>
You can manage features by viewerProvider.
Library based on: https://github.com/cornerstonejs/cornerstoneTools