-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.sh
More file actions
executable file
·62 lines (51 loc) · 3.5 KB
/
demo.sh
File metadata and controls
executable file
·62 lines (51 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
# demo.sh — full dicom-toolkit-rs CLI demonstration
#
# Runs all showcase scripts in order against the ABDOM CT test series.
# Builds the workspace first if the binaries are not yet present.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT="$SCRIPT_DIR/../.."
# ─── build ────────────────────────────────────────────────────────────────────
if [[ ! -x "$ROOT/target/debug/dcmdump" ]]; then
echo "Building workspace…"
(cd "$ROOT" && cargo build --bins)
fi
banner() {
echo ""
echo "╔══════════════════════════════════════════════════════════════╗"
printf "║ %-61s║\n" "$1"
echo "╚══════════════════════════════════════════════════════════════╝"
}
pause() {
if [[ -t 0 ]]; then
read -r -p " Press Enter to continue…" _
fi
}
# ─── 01: dump ─────────────────────────────────────────────────────────────────
banner "01 · dcmdump — print DICOM file contents"
bash "$SCRIPT_DIR/01_dump.sh"
pause
# ─── 02: network ──────────────────────────────────────────────────────────────
banner "02 · echoscu + storescu + storescp — network transfer"
bash "$SCRIPT_DIR/02_network.sh"
pause
# ─── 03: query ────────────────────────────────────────────────────────────────
banner "03 · findscu / getscu — Query/Retrieve examples"
bash "$SCRIPT_DIR/03_query.sh"
pause
# ─── 04: img2dcm ──────────────────────────────────────────────────────────────
banner "04 · img2dcm — PNG → DICOM Secondary Capture"
bash "$SCRIPT_DIR/04_img2dcm.sh"
pause
# ─── 05: jpegls ───────────────────────────────────────────────────────────────
banner "05 · dcmcjpls + dcmdjpls — JPEG-LS compress / decompress"
bash "$SCRIPT_DIR/05_jpegls.sh"
pause
# ─── 06: jp2k ─────────────────────────────────────────────────────────────────
banner "06 · dcmcjp2k + dcmdjp2k — JPEG 2000 compress / decompress"
bash "$SCRIPT_DIR/06_jp2k.sh"
echo ""
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ All demos complete ✓ ║"
echo "╚══════════════════════════════════════════════════════════════╝"