Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rlebre/dicoogle-mongodb-test-scripts
Scripts to test the insertion of DICOM files in a MongoDB instance or MongoDB router
https://github.com/rlebre/dicoogle-mongodb-test-scripts
dicoogle hacktoberfest
Last synced: 4 days ago
JSON representation
Scripts to test the insertion of DICOM files in a MongoDB instance or MongoDB router
- Host: GitHub
- URL: https://github.com/rlebre/dicoogle-mongodb-test-scripts
- Owner: rlebre
- License: gpl-3.0
- Created: 2020-10-14T15:33:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-20T09:41:13.000Z (about 4 years ago)
- Last Synced: 2024-11-14T22:37:00.238Z (2 months ago)
- Topics: dicoogle, hacktoberfest
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scripts to generate DICOM files and insert them in MongoDB instance
This project is composed by two scripts:
- generator.py: generates DICOM objects or files (Computed Tomographies)
- insert.py: generates CT files in DICOM format and inserts them in a MongoDB endpoint## Requirements
- Python3
- Installation of requirements.txt## Instructions
1. Clone this repository
```shell script
git clone https://github.com/rlebre/dicoogle-mongodb-test-scripts.git
```2. Install virtual environment
```shell script
virtualenv -p python3 venv
```3. Activate virtual environment
```shell script
source venv/bin/activate
```4. Install requirements.py
```shell script
pip install -r requirements.txt
```5. Edit your configuration
### Insert
6. Run `generator.py` and `insertion.py
```shell script
python generator.py -n 1000 -o ./dataset -j #generates 1000 files in the directory './dataset'
python insertion.py -c 50 -j ./dataset # reads database directory and inserts each 50 in database
```Usage: `generator.py -n -o -d|-d
6. Run simply generate objects in runtime `insertion.py`
```shell script
python insertion.py -n 1000 -c 50 # generates 1000 objects and inserts each 50 in database
```Usage: `insertion.py -n -j/-d `
### Query
8. Or run `querying.py`
```shell script
python querying.py [-i] [-d] [-q ] #generates 1000 DICOM files in directory ./dataset
``````
-i - create indexes
-d - drop indexes
-q - query
```### Configuration
You must configure your MongoDB instance first and provide the configurations in `local_settings.py`. Example:
```python
MONGO_HOST='localhost'
MONGO_PORT=27017
MONGO_USER='dicoogle'
MONGO_PASSWORD='dicoogle'
```## Acknowledgments
- Thank you to the contributors of [pydicom](pydicom/pydicom)
- Thank you to Sjoerd for [dicomgenerator](sjoerdk/dicomgenerator)
- Thank you to the contributors of [pymongo](mongodb/mongo-python-driver)### Disclaimer
This work received support from FCT, Fundação para a Ciência e a Tecnologia, under the project UID/CEC/00127/2019 and POCI-01-0145-FEDER-016385 (NETDIAMOND)