2D/3D DICOM viewer with backend and frontend
node
&npm
docker
python
- Navigate to the
./database
directory. - Start the database container by running the following command:
cd ./database
docker-compose up -d
- To populate the database, the backend has to be started at least once.
Go to the
../backend
directory and execute the following commands:
cd ../backend
npm i
npm start
- To migrate, go to
/backend/src
and run :
cd src
npx sequelize-cli db:migrate
Your database should be up and ready for the backend.
Since we’ve already installed the backend dependencies during the database setup, there’s no need to repeat that step. However, depending on your Python installation, you might need to make a small adjustment. Check if the command python --version
works in your terminal.
If it does, you're all set. Otherwise modify the line 48
in the file:
\backend\src\dicoms\dicom_slice.js
as follows:
var process = spawn("[AnyPythonExecutable]", [
Replace [AnyPythonExecutable]
with the appropriate Python interpreter (e.g., python3
, py
, etc.) that works on your system.
Go to /dicom-viewer/backend
and run:
npm start
To install all dependencies go to /dicom-viewer/frontend
and run:
npm i
Depending on your operating system:
npm start
npm run start-pc
The component diagram below offers a broad overview of the frontend architecture.
The DICOM viewer provides several interactions to help you examine the images. The following table shows how these interactions can be carried out.
Action | Instruction | Description |
---|---|---|
Read Coordinates/Grayscale Value | Hover | Displays coordinates and greyscale value in the top left corner. |
Panning | Shift + Left Click + Drag | Shift + Move the camera (i. e. image is being moved). |
Zooming | Two Fingers (Mac) or Right Click (Linux/Windows) + Drag Up/Down | Zoom in and out. |
Rotating (Plane) | Ctrl + Left Click + Drag | Ctrl + Rotate the image within its plane. |
Measuring | Measure Button + Left Click(s) | Measure Measure distances between points (one button click for each new line). |
Rotating (3D Space) | 3D Rotation Button + Left Click + Drag | Rotate the image in 3D space (not intended for 2D data but helpful for debugging and 3D data). |
Reset to Standard 2D | Pan Button | Switch back to standard 2D interactions. |
Scrolling | Scroll Button (Disabled) | Functionality not implemented. |
Painting | Paint Button (Disabled) | Functionality not implemented. |