RT Viewer
- Can overlay CT IMAGE, DOSE, and RT STRUCTURE
- This project based on TEST849
- Git Clone : https://github.com/choijinkyung/DICOM-RT-VIEWER
- Installing Node.js
- Installing npm or yarn
- Run Scripts
4-1) npm run install or yarn install
-> install package json - For start
5-1 ) npm run start or yarn start
-> Create a Web page through the local host and port 3000
-
PreKnowledge
1) Coordinate transformation
We can get two matrices.
1-1) Dose - > Patient matrix
1-2) CT -> Patient matrix
In other words, to convert coordinates to Dose -> CT, Dose -> Patient -> CT is required.
-> To obtain -> Patient -> CT, CT -> Patient matrix must be inverse.
-> Dose2CT transformation matrix = (Dose 2Patient) * (Patinet2CT)
-> Dose2CT * (x, y, z, 1) converts the coordinates (x, y, z).
-> 1 is the vector and 0 is the point.
-> See c7.6.2.1.1 of DICOM standard for more information.
(requires knowledge of the transform or scaling side of a three-dimensional matrix)2) Obtain Dose Value
-> RT DOSE pixelData(x7fe00010)
-> RT DOSE Dose Grid Scaling (x3004000e)
-> DOSE Value = pixelData * DoseGridScaling
3) Import Sub-Data in DICOM file
-> Original : DB import & use Class
-> Present : cornerstone.js (GitHub) - > dicomParser -> liveExample -> DICOM DUMP
-> https://rawgit.com/cornerstonejs/dicomParser/master/examples/index.html
-> click F12 & show developer tool
-> We analyzed this source and imported the data in the hierarchy.
-> In Project, Referenced Code Like getROIList -> structFile , ROIListHierarchy , getContourData
(Output to output shows hierarchical)
4) Cornerstone
-> Github : https://github.com/cornerstonejs
-> Example : https://cornerstonejs.org/
5) Zoom, pan event
-> Use React-map-Interaction opensource
-> After, Divided mouse event
6) Open Source
-> Dcmjs : DICOM parser library like cornerstone
-> Mathjs : Can be used like python for matrix operations
-> Jsdoc : Documentation Tool
7) Document
-> Word : WebViewer_API_document
-> JSDOC API documentation (Recommended)
: Easier to see when Developing
- Environment setting
1) Window
2) Webstorm
3) Node.js
- Version :12.18.3 4) Package Manager 1) yarn
- version : 1.22.5 2) npm
- version : 6.14.6
- npm install cornerstone
- npm install cornerstone-core
version : "cornerstone-core": "^2.3.0" - npm install cornerstone-math
version : "cornerstone-math": "^0.1.9" - npm install cornetstone-tools
version : "cornerstone-tools": "^5.0.0" - npm install conrnerstone-wado-image-loader
version : "cornerstone-wado-image-loader": "^3.1.2" - npm install hammerjs
version :"hammerjs": "^2.0.8" - npm install mathjs
version :"mathjs": "^8.0.1" - npm install cross
version : "cross": "^1.0.0" - npm install gh-pages
version : "gh-pages" : "^3.1.0" - npm install react
version : "react": "^16.14.0" - npm install react-dom
version : "react-dom": "^16.14.0" - npm install react-map-interatcion
version : "react-map-interaction": "^2.0.0" - npm install react scripts
version : "react-scripts": "^3.4.3" - npm install webkit
version :"webkit": "^0.0.0" - npm install jsdoc docdash
version :"jsdoc" : "^3.6.6" - npm install jquery
version : "jquery" : "^3.5.1"
To install at once
-> npm install or yarn install
- npm install gh-pages
- In package.json,
"scripts": {
"build": "react-scripts build",
"deploy": "gh-pages -d build"
}
"devDependencies": {
"gh-pages": "^3.1.0"
}, "homepage": "https://choijinkyung.github.io/RT-VIEWER/"
Use JSDOC Install : npm install jsdoc template : docdash Update : npm run jsdoc
In package.json
"scripts": {
"jsdoc": "jsdoc -c jsdoc.json"
}
How to open API docs?
-> './API_document/index.html'
-> open this use web browser
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
Deploy the project on your github page (Your Repository will be public)
npm install gh-pages
In package.json
"scripts": {
"build": "react-scripts build",
"deploy": "gh-pages -d build"
}
"devDependencies": {
"gh-pages": "^3.1.0"
}, "homepage": "https://choijinkyung.github.io/RT-VIEWER/"
Each code can be annotated into jsdoc. Running this script updates.
- Modify Check Event
-> Draw / reset as soon as check - Dose Overlay
-> Find the contour point and trace it. - Modify the mouse button to activate the zoom event
-> mouseButton = 3 on the wheel - Modifying the import of Contour Data
-> import in class - Rotate 90 degrees, flip simultaneously and modify to make it possible
- Import RT PLAN File
- Separate each file using DB and import
- Add Button for Reset x,y coords
- DVH
- TreeView
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
CONTRIBUTING.md 를 읽고 이에 맞추어 pull request 를 해주세요.
- Name : Choi Jin Kyung
- E-mail : [email protected]
- GitHub : https://github.com/choijinkyung
This project is licensed under the MIT License - see the [LICENSE.md]
Copyright (c) 2020 j_iky
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.