Skip to main content

Medical Imaginging Research structuring and automation

Project description

hurahura - formerly miresearch

Organisation and automation tools for medical imaging research data

hurahura is maori for "to investigate" or "to look around"

Installation:

pip install hurahura
# formerly: pip install imaging-research

About

This is a collection of classes for following OOP principles for organisation of research data for medical imaging research studies.

The intention is to provide a framework that will store imaging data on a "per examination" basis in a structured format. This structured format then permits simple interrogation, and automation.

It takes advantage of the dicom standard and the package spydcmtk for automating and generalising many typical steps with the intention of making the researcher's life easier.

This package may be easily adapted and expanded upon for a high level control over your research data. Or, it may be used as is for basic structure and organisation of data and automation of common tasks.

Class structure

AbstractSubject class is top level class taking inputs:

  • subjectNumber : an integer
  • dataRoot : the root directory where subjects to be stored
  • subjectPrefix : a prefix to be combined with subjectNumber for naming each subject
    • Optional: will be guessed from subjects already present in dataRoot if not given.
  • DIRECTORY_STRUCTURE_TREE : DirectoryStructureTree class to define directory structure for each subject directory (see wiki for construction shortcuts)
    • Optional: Defaults to RAW and META directories.

This is the basic parent class containing fundamental methods for organisation and management. See hurahura docs for advanced usage, epsecially via inheritance and polymorphism.

Configuration

hurahura uses a miresearch.conf file for configuration.

By default miresearch.conf files are search for in the following locations:

  1. source_code_directory/miresearch.conf (file with default settings)
  2. $HOME/miresearch.conf
  3. $HOME/.miresearch.conf
  4. $HOME/.config/miresearch.conf
  5. Full file path defined at environment variable: "MIRESEARCH_CONF"
  6. Full path passed as commandline argument to hurahura

Files are read in the above order with each subsequent variable present overwritting any previously defined. For information on files found and variables used run:

hurahura -INFO

systemctl

Running mi_watcher via systemctl is an attractive application:

Ubuntu instructions:

  • Build a .service file in /etc/systemd/system:
[Unit]
Description=My mi_watcher Service
After=network.target

[Service]
Type=simple
ExecStart=/path/to/script
Restart=on-failure

[Install]
WantedBy=multi-user.target
  • Build /path/to/script:
#!/bin/bash
source /myvenv/bin/activate
hurahura -WatchDirectory /path/to/watch_directory -config /path/to/my_proj.conf
  • Reload systemd
  • enable service
  • start service
sudo systemctl daemon-reload
sudo systemctl enable myservice.service
sudo systemctl start myservice.service

Documentation

For full documentation see hurahura docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hurahura-0.1.13.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hurahura-0.1.13-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

Details for the file hurahura-0.1.13.tar.gz.

File metadata

  • Download URL: hurahura-0.1.13.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for hurahura-0.1.13.tar.gz
Algorithm Hash digest
SHA256 8325fe355f22ed48a81ab050dff763668e5fedb6f44b93b686d1a4abdf6b7e21
MD5 38c424d254987b70eddd098550d51932
BLAKE2b-256 1572f4a781f2cfa0677b5a86660d3e47bad282a986d69c4c25af0528b3a0050b

See more details on using hashes here.

File details

Details for the file hurahura-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: hurahura-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 52.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for hurahura-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 e51c3eee4d7f161ff52ab3afd93e0c2ff4db2b28121fcb0ad9d810270d312168
MD5 fa6669499492219f57901c7aa0bd6376
BLAKE2b-256 612cae37a2097fb003dc821fffb8f53082aedbc804745812d501dc02ca14b4de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page