Project-MONAI / MONAILabel

MONAI Label is an intelligent open source image labeling and learning tool.
https://docs.monai.io/projects/label
Apache License 2.0
610 stars 196 forks source link

MONAI Label: The OHIF flow as described in the README does not work #594

Closed patricio-astudillo closed 2 years ago

patricio-astudillo commented 2 years ago

The OHIF flow as described in the README does not work. I have followed the instructions and tried to get OHIF up and running, but it does not work. Can anyone confirm that this flow is currently not working or update the README file?

SachidanandAlle commented 2 years ago

Can you please raise this over MONAI Label github repo..

Feels like some step you have missed.. otherwise multiple people have tried running MONAI Label over OHIF (given you have setup for dicomweb e.g. orthanc)

@diazandr3s can you please help

diazandr3s commented 2 years ago

Hi @patricio-astudillo, thanks for raising this issue. Which web explorer are you using to open OHIF? I saw sometimes Firefox doesn't load OHIF? I guess it is a cookies issue. Can you please try opening OHIF with Google Chrome? http://127.0.0.1:8000/ohif Could we also make sure there are images in the DICOMWeb (Orthanc)? http://127.0.0.1:8042

patricio-astudillo commented 2 years ago

Hey, @diazandr3s I will note down my installation process:

Prepare environment: conda create --name label conda activate label python --version

Python 3.10.0

Install: pip install monailabel

fails due to:

ERROR: Cannot install monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]==0.6.0, monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]==0.7.0 and monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]==0.8.0 because these package versions have conflicting dependencies.

The conflict is caused by: monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm] 0.8.0 depends on torch>=1.6 monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm] 0.7.0 depends on torch>=1.5 monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm] 0.6.0 depends on torch>=1.5

Try again with a different python version:

Prepare environment: conda create --name label python=3.7 conda activate label python --version

Python 3.7.11

pip install monailabel pip show monailabel

Name: monailabel Version: 0.3.1 Summary: Active Learning Toolkit for Healthcare Imaging Home-page: https://monai.io/ Author: MONAI Consortium Author-email: monai.contact@gmail.com License: Apache License 2.0 Location: /home/admin/miniconda3/envs/label/lib/python3.7/site-packages Requires: monai, filelock, pydantic, pynetdicom, watchdog, aiofiles, pydicom, uvicorn, python-dotenv, pydicom-seg, expiringdict, timeloop, dicomweb-client, simplecrf, httpx, python-multipart, fastapi, schedule, requests-toolbelt, pyyaml Required-by:

monailabel apps --download --name deepedit --output apps

Using PYTHONPATH=/home/admin/miniconda3/envs: deepedit is copied at: /home/admin/apps/deepedit

monailabel datasets --download --name Task09_Spleen --output datasets

Using PYTHONPATH=/home/admin/miniconda3/envs: Task09_Spleen.tar: 1.50GB [01:42, 15.7MB/s]
2022-01-25 12:40:28,399 - INFO - Downloaded: datasets/Task09_Spleen.tar 2022-01-25 12:40:31,000 - INFO - Verified 'Task09_Spleen.tar', md5: 410d4a301da4e5b2f6f86ec3ddba524e. 2022-01-25 12:40:31,000 - INFO - Writing into directory: /home/admin/datasets. Task09_Spleen is downloaded at: datasets/Task09_Spleen

Now I can go to 127.0.0.1:8000 and see; image

sudo apt-get install orthanc orthanc-dicomweb Now I can go to 127.0.0.1:8042/dicom-web

monailabel start_server --app apps/deepedit --studies http://127.0.0.1:8042/dicom-web

Now I can go to 127.0.0.1:8000/ohif and see; image

But if I would like to inspect a study I can see; image

diazandr3s commented 2 years ago

Hi @patricio-astudillo,

Thanks for the detailed response, this is helpful :) From what I can see the only step missing is adding DICOM studies to the Orthanc server. Please go to http://127.0.0.1:8042/ and upload some DICOM images/studies.

You've already downloaded the dataset in NIFTI format. But if you'd like to use OHIF, they need to be uploaded in Orthanc.

Here are the instructions to convert images from NIFTI to DICOM: https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/ohif

This is essentially the reason you can't see studies in OHIF. Once you load them in Orthanc, you should be able to see them in OHIF.

Please let us know how this goes :)

patricio-astudillo commented 2 years ago

Hi @diazandr3s,

You are welcome and thanks for your advice however, I've uploaded the DICOM of a single patient to the Orthanc server. I've blocked it with a white rectangle for privacy reasons. However, I tried to replicate the bug this morning and now the loading works for some reason.

However, when I want to enable the MONAI label panel, I receive the following error: image

diazandr3s commented 2 years ago

Hi @patricio-astudillo,

Would it be possible to see the logs? You can find them in the logs folder or at http://127.0.0.1:8000/logs

If it helps, I'm happy to schedule a meeting and talk about the use case.

Please let us know

patricio-astudillo commented 2 years ago

Dear @diazandr3s ,

Thanks for the quick response, I've contacted you through linked-in to organise a meeting.

Best regards, Patricio

diazandr3s commented 2 years ago

Superb!

patricio-astudillo commented 2 years ago

Hi, I worked with @diazandr3s on this issue and we managed to resolve this. Thanks

diazandr3s commented 2 years ago

Superb!

adwaykanhere commented 2 years ago

@patricio-astudillo @diazandr3s How did you resolve this issue? When I go to localhost:8000/ohif/ I'm seeing a blank page

I have loaded images on Orthanc and can see them at localhost:8042

diazandr3s commented 2 years ago

Hi @adwaykanhere

It is great to see you're using MONAI Label.

Can I ask you whether you're using the Docker container? I've just checked and it seems to work smoothly when using Docker:

https://user-images.githubusercontent.com/11991079/194978543-dec7d695-b92c-4faf-bd01-e1553f009ede.mp4

Please let us know

SachidanandAlle commented 2 years ago

How you have installed monailabel?

patricio-astudillo commented 2 years ago

Hi,

nice that you use Monai Label, this was caused by not following the installation procedure (and make sure all previous monai / monai label / monai deploy packages are removed or start from a vanilla environment)

Best of luck, Patricio

Op di 11 okt. 2022 om 02:47 schreef Adway Kanhere @.***

:

@patricio-astudillo https://github.com/patricio-astudillo @diazandr3s https://github.com/diazandr3s How did you resolve this issue? When I go to localhost:8000/ohif/ I'm seeing a blank page

— Reply to this email directly, view it on GitHub https://github.com/Project-MONAI/MONAILabel/issues/594#issuecomment-1273950177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4QPT2YEDPXW2Q373Q2WY3WCS2I5ANCNFSM5MVRJCEQ . You are receiving this because you were mentioned.Message ID: @.***>

SachidanandAlle commented 2 years ago

@patricio-astudillo @diazandr3s How did you resolve this issue? When I go to localhost:8000/ohif/ I'm seeing a blank page

I have loaded images on Orthanc and can see them at localhost:8042

You might be using github way of monailabel.. in that case, you have to build OHIF explicitly... https://github.com/Project-MONAI/MONAILabel#git-checkout-developer-mode

If you are using DICOM-Web + OHIF then you have to build OHIF package separate. Please refer here.

https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/ohif#development-setup

Easy way is run PIP Install MONAILabel or use MONAILabel Docker

adwaykanhere commented 2 years ago

@diazandr3s @patricio-astudillo @SachidanandAlle Thanks so much for all your help!

I'm using the docker version of MONAI, but I still can't seem to get it to work. I'm running on macOS 12.

I followed @diazandr3s procedure but when I open http://0.0.0.0/8000 I can't connect to the webpage.

SachidanandAlle commented 2 years ago

http://0.0.0.0/8000 ? First.. it's http://0.0.0.0:8000 for Server APIs.. and http://0.0.0.0:8000/ohif for OHIF interface.. If basic API page is not up then it means monailabel server is not even up.

If you can share the command which you are running to start the server and the logs... that can be more helpful for others to suggest what's wrong...

If you are using docker sometimes you need to open up the port for host container as well.. and sometimes the loopback address..

adwaykanhere commented 2 years ago

My apologies, I meant http://0.0.0.0:8000/

The commands I run are -

  1. docker run --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash (no gpus for macOS)
  2. monailabel apps --download --name radiology --output apps
  3. monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit

Connecting to http://0.0.0.0:8000/ Screen Shot 2022-10-11 at 11 56 23 AM

Connecting to http://0.0.0.0:8000/ohif/ Screen Shot 2022-10-11 at 12 03 10 PM

Connecting to http://127.0.0.1:8042 opens Orthanc where I have one patient's DICOM image data Screen Shot 2022-10-11 at 12 00 31 PM

Logs: http://0.0.0.0:8000/logs also does not connect Logs from docker terminal:



2022-10-11 15:54:53,487 - USING:: version = False
2022-10-11 15:54:53,490 - USING:: app = /opt/monai/apps/radiology
2022-10-11 15:54:53,491 - USING:: studies = http://127.0.0.1:8042/dicom-web
2022-10-11 15:54:53,491 - USING:: verbose = INFO
2022-10-11 15:54:53,492 - USING:: conf = [['models', 'deepedit']]
2022-10-11 15:54:53,492 - USING:: host = 0.0.0.0
2022-10-11 15:54:53,493 - USING:: port = 8000
2022-10-11 15:54:53,493 - USING:: uvicorn_app = monailabel.app:app
2022-10-11 15:54:53,493 - USING:: ssl_keyfile = None
2022-10-11 15:54:53,493 - USING:: ssl_certfile = None
2022-10-11 15:54:53,493 - USING:: ssl_keyfile_password = None
2022-10-11 15:54:53,494 - USING:: ssl_ca_certs = None
2022-10-11 15:54:53,495 - USING:: workers = None
2022-10-11 15:54:53,495 - USING:: limit_concurrency = None
2022-10-11 15:54:53,496 - USING:: access_log = False
2022-10-11 15:54:53,496 - USING:: log_config = None
2022-10-11 15:54:53,496 - USING:: dryrun = False
2022-10-11 15:54:53,496 - USING:: action = start_server
2022-10-11 15:54:53,503 - ENV SETTINGS:: MONAI_LABEL_API_STR = 
2022-10-11 15:54:53,503 - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_APP_DIR = 
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_STUDIES = 
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_AUTH_ENABLE = False
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_AUTH_DB = 
2022-10-11 15:54:53,505 - ENV SETTINGS:: MONAI_LABEL_APP_CONF = '{}'
2022-10-11 15:54:53,505 - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_DATASTORE = 
2022-10-11 15:54:53,507 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_URL = 
2022-10-11 15:54:53,507 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_USERNAME = 
2022-10-11 15:54:53,507 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PASSWORD = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_API_KEY = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_CACHE_PATH = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PROJECT = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_ASSET_PATH = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX = None
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX = None
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX = None
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI = True
2022-10-11 15:54:53,511 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_SEARCH_FILTER = '{"Modality": "CT"}'
2022-10-11 15:54:53,511 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_EXPIRY = 180
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT = 30.0
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_READ_TIMEOUT = 5.0
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '["*.nii.gz", "*.nii", "*.nrrd", "*.jpg", "*.png", "*.tif", "*.svs", "*.xml"]'
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = '[]'
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH = 
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
2022-10-11 15:54:53,514 - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
2022-10-11 15:54:53,514 - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
2022-10-11 15:54:53,514 - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
2022-10-11 15:54:53,515 - 
Allow Origins: ['*']
[2022-10-11 15:54:55,924] [997] [MainThread] [INFO] (uvicorn.error:75) - Started server process [997]
[2022-10-11 15:54:55,926] [997] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.
[2022-10-11 15:54:55,928] [997] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: /opt/monai/apps/radiology; studies: http://127.0.0.1:8042/dicom-web; conf: {'models': 'deepedit'}
[2022-10-11 15:54:56,023] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for MONAILabelApp Found: <class 'main.MyApp'>
[2022-10-11 15:54:56,039] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.localization_vertebra.LocalizationVertebra'>
[2022-10-11 15:54:56,041] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_vertebra.SegmentationVertebra'>
[2022-10-11 15:54:56,044] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.localization_spine.LocalizationSpine'>
[2022-10-11 15:54:56,046] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'>
[2022-10-11 15:54:56,058] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'>
[2022-10-11 15:54:56,060] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'>
[2022-10-11 15:54:56,062] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'>
[2022-10-11 15:54:56,063] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'>
[2022-10-11 15:54:56,064] [997] [MainThread] [INFO] (main:87) - +++ Adding Model: deepedit => lib.configs.deepedit.DeepEdit
[2022-10-11 15:55:20,115] [997] [MainThread] [INFO] (lib.configs.deepedit:144) - EPISTEMIC Enabled: False; Samples: 5
[2022-10-11 15:55:20,119] [997] [MainThread] [INFO] (lib.configs.deepedit:148) - TTA Enabled: False; Samples: 5
[2022-10-11 15:55:20,126] [997] [MainThread] [INFO] (main:91) - +++ Using Models: ['deepedit']
[2022-10-11 15:55:20,128] [997] [MainThread] [INFO] (monailabel.interfaces.app:129) - Init Datastore for: http://127.0.0.1:8042/dicom-web
[2022-10-11 15:55:20,129] [997] [MainThread] [INFO] (monailabel.interfaces.app:149) - Using DICOM WEB: http://127.0.0.1:8042/dicom-web
dcmqi-1.2.4-linux.tar.gz: 20.6MB [00:01, 14.7MB/s]                                                                      
2022-10-11 15:55:21,658 - INFO - Downloaded: /tmp/tmpzvhcglyz/dcmqi-1.2.4-linux.tar.gz
2022-10-11 15:55:21,658 - INFO - Expected md5 is None, skip md5 check for file /tmp/tmpzvhcglyz/dcmqi-1.2.4-linux.tar.gz.
2022-10-11 15:55:21,659 - INFO - Writing into directory: /tmp/tmp8shuq9hg.
[2022-10-11 15:55:22,877] [997] [MainThread] [INFO] (monailabel.datastore.dicom:62) - DICOMWeb Datastore (cache) Path: /root/.cache/monailabel/dicom/488fca1f7f3f98331f6f7756beca0d35; FetchByFrame: False
[2022-10-11 15:55:22,878] [997] [MainThread] [INFO] (monailabel.datastore.dicom:63) - DICOMWeb Convert To Nifti: True
[2022-10-11 15:55:22,885] [997] [MainThread] [INFO] (monailabel.datastore.local:128) - Auto Reload: True; Extensions: ('*.nii.gz', '*.nii')
[2022-10-11 15:55:22,892] [997] [MainThread] [INFO] (monailabel.datastore.local:574) - Invalidate count: 0
[2022-10-11 15:55:22,892] [997] [MainThread] [INFO] (monailabel.datastore.local:148) - Start observing external modifications on datastore (AUTO RELOAD)
[2022-10-11 15:55:22,896] [997] [MainThread] [ERROR] (monailabel.datastore.local:174) - Failed to start File watcher. Local datastore will not update if images and labels are moved from datastore location.
[2022-10-11 15:55:22,896] [997] [MainThread] [ERROR] (monailabel.datastore.local:178) - [Errno 38] Function not implemented
[2022-10-11 15:55:22,897] [997] [MainThread] [INFO] (main:117) - +++ Adding Inferer:: deepedit => <lib.infers.deepedit.DeepEdit object at 0x411437f490>
[2022-10-11 15:55:22,897] [997] [MainThread] [INFO] (main:117) - +++ Adding Inferer:: deepedit_seg => <lib.infers.deepedit.DeepEdit object at 0x411437f4f0>
[2022-10-11 15:55:22,898] [997] [MainThread] [INFO] (main:173) - {'deepedit': <lib.infers.deepedit.DeepEdit object at 0x411437f490>, 'deepedit_seg': <lib.infers.deepedit.DeepEdit object at 0x411437f4f0>, 'Histogram+GraphCut': <monailabel.scribbles.infer.HistogramBasedGraphCut object at 0x411437f9d0>, 'GMM+GraphCut': <monailabel.scribbles.infer.GMMBasedGraphCut object at 0x411438ebe0>}
[2022-10-11 15:55:22,899] [997] [MainThread] [INFO] (main:186) - +++ Adding Trainer:: deepedit => <lib.trainers.deepedit.DeepEdit object at 0x411438eee0>
[2022-10-11 15:55:22,900] [997] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: /root/.cache/monailabel/sessions
[2022-10-11 15:55:22,900] [997] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2022-10-11 15:55:22,901] [997] [MainThread] [INFO] (monailabel.interfaces.app:467) - App Init - completed
[2022-10-11 15:55:22,903] [timeloop] [INFO] Starting Timeloop..
[2022-10-11 15:55:22,903] [997] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2022-10-11 15:55:22,908] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x411ce14310>
[2022-10-11 15:55:22,908] [997] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x411ce14310>
[2022-10-11 15:55:22,909] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2022-10-11 15:55:22,909] [997] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2022-10-11 15:55:22,910] [997] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
[2022-10-11 15:55:22,913] [997] [MainThread] [INFO] (uvicorn.error:206) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)```
jlvahldiek commented 2 years ago

I can confirm that I discovered the same behavior on macOS when running:

docker run --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash

# inside docker container:
monailabel apps --download --name radiology --output apps
monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit

MONAILabel, OHIF and Orthanc all are then not reachable using 'http://127.0.0.1:8000' or 'http://127.0.0.1:8000/ohif' or 'http://127.0.0.1:8042'.

I was able to get MONAILabel up using:

docker run --rm -ti --ipc=host -p 8000:8000 -p 8042:8042 projectmonai/monailabel:latest bash

# inside docker container:
monailabel apps --download --name radiology --output apps
monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit

But in this case Orthanc and OHIF are not reachable. Investigating the container, Orthanc does not get started...

SachidanandAlle commented 2 years ago

First thing.. you need GPUS.. without that monailabel is not complete.. you can run, but at the end most of the features won't be supported without GPU..

Second.. I see you are trying 0.0.0.0 (in some cases.. you should try 127.0.0.1:8000 instead.. depends on the resolve) As i see @jlvahldiek already mentioned about port binding for docker in mac.. --ipc=host --net=host possibly won't work in Mac.. so you might have to bind the port explicitly

FYI.. monailabel is tested only for Windows and Ubunutu env..

otherwise logs are good.. 2nd thing.. when u start the server

Third.. Orthanc is not part of monailabel (its a separate thing).. due to license, it can be part of Monailabel.. Please read the docs here.. most of these are well documented.. https://github.com/Project-MONAI/MONAILabel#ohif-radiology

jlvahldiek commented 2 years ago

Thanks for clarification, @SachidanandAlle.

These lines should perhaps be removed, as they imply that the MONAILabel docker image ships with Orthanc included ... https://github.com/Project-MONAI/MONAILabel/blob/fb8d0474927ea64834ab59d200628dcd992d396b/Dockerfile#L37-L46

jlvahldiek commented 2 years ago

@adwaykanhere, my current workaround is that I am running a fully-configured Orthanc docker container next to a MONAILabel docker container. Works great...

adwaykanhere commented 2 years ago

Thanks a lot, @jlvahldiek How are you able to connect the MONAILabel docker to OHIF via Orthanc?

adwaykanhere commented 2 years ago

@SachidanandAlle 127.0.0.1:8000 also does not work for MacOS

jlvahldiek commented 2 years ago

Thanks a lot, @jlvahldiek How are you able to connect the MONAILabel docker to OHIF via Orthanc?

@adwaykanhere, I will work on a tutorial setting up all three with Docker, probably will be published in a couple of days. If you can't wait please contact me directly...

diazandr3s commented 2 years ago

@SachidanandAlle 127.0.0.1:8000 also does not work for MacOS

Hi @adwaykanhere,

MONAI Label needs GPUs to work - It hasn't been tested/doesn't work on macOS. You could start the MONAI Label server on a Linux or Windows machine

Screenshot from 2022-10-12 17-18-07

and then connect to it using OHIF/Slicer from your macOS machine.

Hope this helps,