insight-viewer
A React component for DICOM images
Install
npm install --save @lunit/insight-viewer
Usage
import React, { Component } from 'react'
import Viewer, { HeatmapLayer, MagnifyLayer } from '@lunit/insight-viewer'
class Example extends Component {
constructor (props) {
super(props)
this.state = {
controls: {
mouseMode: 'pan',
invert: false,
fliped: false
},
resetFlag: false,
imageId: 'wadouri:[dicom file uri]',
heatmapEnabled: false,
posMap: [[]],
threshold: 0.1,
magnifyEnabled: false
}
}
render () {
return (
<Viewer imageId={this.state.imageId} controlState={this.state.controls}
resetFlag={this.state.resetFlag}>
<HeatmapLayer enabled={this.state.heatmapEnabled}
posMap={this.state.posMap} threshold={this.state.threshold} />
<MagnifyLayer enabled={this.state.magnifyEnabled} />
</Viewer>
)
}
}
See Insight MMG for more usages.
Author
@syyu