react-cornerstone-viewport-adrian
v0.2.44
Published
Cornerstone medical image viewport component for React (with extra debug)
Downloads
13
Readme
react-cornerstone-viewport
This is a clone of the official react-cornerstone-viewport package with custom code changes for ATX. This project creates an NPM package which can be used as a dependency in the ItxViewer project.
Setup New Developer Environment (once only)
Clone this Git repository into a different top-level folder to your other projects. Open a terminal window and run this command:
npm ci
npm adduser
You will need to log onto registry.npmjs.org and log in with your npm user account
Publish updated package to NPM
- Increment the version number in package.json (it doesn't matter how many times you have to update the version number)
- Then publish the new package uisng this command in a terminal window:
npm publish
- Switch to your other project in VSCode (itxviewer2)
- Open a command line.
- type 'cd atx-frontend'
- type 'npm install react-cornerstone-viewport-adrian' to get the new NPM package you just published.
You can check you have the latest version by looking for the correct version number for react-cornerstone-viewport-adrian in package.json
You should also check your changes into Git once you are finished for the day.
Using in another project
import React, { Component } from 'react'
import CornerstoneViewport from 'react-cornerstone-viewport-adrian'
class Example extends Component {
render () {
return (
<CornerstoneViewport />
)
}
}
License
MIT © OHIF