Skip to content
spdeveloper1993Public

About

Open-source Windows DICOM tool: upload from folder or CD/DVD to PACS with patient reconciliation, PACS-to-PACS transfer, CD/DVD burn and download (C# / .NET 8, fo-dicom). Vibe-coded with Claude Code. MIT License.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Dicom Flow

Developed by SP

Windows desktop application for viewing DICOM images from a folder or a CD/DVD and uploading them to a PACS, with patient tag reconciliation (Patient ID, Patient Name, Accession Number) using data queried from the PACS or the Modality Worklist (MWL).

Open-source software under the MIT License - see THIRD-PARTY-NOTICES.md for the components it uses. Not a medical device: the viewer is not intended for diagnosis.

Version 2 introduces the Flow user interface (navigation rail, study cards, Transfer / Burn / Download workspaces, eight colour themes) and an administrator sign-in that protects the PACS configuration.

Built with C# / .NET 8 WinForms and fo-dicom 5 (+ fo-dicom.Codecs).

Vibe-coded: Dicom Flow was developed through vibe coding - built in conversation with an AI coding assistant (Claude Code by Anthropic), with SP defining the features, testing and deciding every change. See How it was built.

Window layout (2.0 "Flow" design)

+----+--------------------------------------------------------------------------------------+
| DF | DICOM Upload                                  ( Send to PACS-A ) ( User - view only ) ☾ ? |
|    | Load from a folder or CD/DVD, check and correct ...                                  |
| ⬆  +-------------------+-----------------------------------------+------------------------+
|Upload| [Open folder][Import CD/DVD] | Viewer | Study table      | PATIENT AND DICOM TAGS |
|    | STUDIES  Search...  | W/L Pan Zoom | Fit 1:1 | < ▶ > | preset| Search tags...         |
|    | ┌───────────────┐ |                                       | Patient | All tags     |
| ⇄  | │▌SMITH JOHN  ☑ │ |        image viewer (black)           | Correct patient details|
|Transfer ID · DOB     │ |     overlays, wheel = next image      |  original | new value  |
| ◎  | │ date  desc    │ |                                       |  [Apply][Find][Reset]  |
|Burn| │ CT 10img Edited│ |  =========(image slider)=========    | key tags ...           |
|    | │  #1 series     │ |                                       |                        |
| ⚙  | └───────────────┘ |                                       | [ Send 2 to PACS ][Cancel]
|Settings 2 studies · ... |                                       |                        |
+----+-------------------+-----------------------------------------+------------------------+
|    | ⟲ Activity  last log line ...                                  Open log folder  ^   |
| Status ...                                              progress   Zoom 100%  AE DICOMFLOW |
+-------------------------------------------------------------------------------------------+
  • Navigation rail (left): Upload, Transfer, Burn, Download - each a full workspace inside the window - and Settings / About at the bottom. Querying the PACS / worklist for patient details is part of Upload (Find in PACS / MWL in the patient panel, Ctrl+F). Only the features chosen in the setup are shown.
  • Study cards: one card per study with a colour stripe for its state (teal ready, amber edited, blue sending, green sent, red failed), patient, ID, birth date, study, modality / image count / accession chips and a tick box for sending. Click a card to view it (its series unfold below it); Ctrl+click / Shift+click select several studies to correct together; Space ticks, Delete removes.
  • Header: the sign-in state, the theme picker and About. The PACS that images are sent to is shown in the status bar.
  • Activity drawer: the last log line is always visible; click it to open the full activity log.
  • Themes: Flow Light, Flow Dark, Ocean, Forest, Sunset, Graphite, Midnight and High Contrast - pick one with the palette button in the header (preview cards) or cycle with Ctrl+Shift+D. Remembered per Windows user; all dialogs follow the theme.

Shortcuts: Ctrl+O open folder, Ctrl+D import CD/DVD, Ctrl+F find in PACS / MWL, Ctrl+Enter send, Ctrl+T transfer, Ctrl+B burn, Ctrl+L download, Ctrl+, settings, F1 about, F2 / F3 viewer / study table; in the viewer Ctrl+0 fit, Ctrl+1 1:1, Ctrl+R reset W/L, Ctrl+I invert, Ctrl+P play.

Administrator and user rights

  • Everyone can load, view, correct and send studies, query, transfer, burn and download, and can view the PACS configuration and settings (Test Connection and the per-user CD cache tools stay available).
  • Only a signed-in administrator can change the PACS configuration and settings (AE title, port, PACS nodes, send / query / worklist nodes, timeout, accession numbering, cache options). Click User - view only in the header, or Sign in to edit in Settings.
  • Administrator account: user name admin, password DiFlow (fixed). The password is stored only as a PBKDF2-SHA256 hash. After 5 wrong passwords, sign-in is blocked for 30 seconds.
  • The administrator session ends on Sign out, when Dicom Flow closes, or after 15 minutes without keyboard / mouse activity. Sign-in, failed attempts, sign-out and saved settings are written to the activity log.
  • The last choices in DICOM Transfer, Burn and Download (source, destination, C-MOVE / C-GET, folder) are remembered per Windows user and no longer written to the shared configuration.
  • Note: the protection is inside Dicom Flow. The shared configuration file (<install folder>\Config\settings.json) stays writable for the Users group so that the administrator can save from any Windows account; restrict access to that folder with Windows permissions if users must also be prevented from editing the file directly.

Features

# Feature Where
1 PACS configuration: Dicom Flow AE title + Dicom Flow DICOM port (shown with this PC's IP addresses for registration on the PACS; optional listener answers C-ECHO on that port), any number of DICOM nodes (name, AE title, host, port), choose the node to send to (C-STORE), query (C-FIND) and the Modality Worklist node, C-ECHO test, timeout Settings (administrator)
1a Automatic accession numbers: I + first character (letter or digit) of the patient name + date/time ddMMyyHHmmss, e.g. SMITH on 11-Nov-2026 01:16:05 -> IS111126011605 (14 chars, DICOM-compliant; X when the name has no letter/digit). Generated when a study is loaded, and again when the patient name changes to one with a different first character. Uniqueness: every issued number is recorded in %LocalAppData%\DicomFlow\accession_history.txt; if the value for the current second was already issued (several studies loaded at once), the next free second is used. No PACS query is made. Can be switched off in PACS Settings On load
2 Update Patient ID, Patient Name, Birth Date (and Accession when auto-numbering is off) for the selected study, all studies of a selected patient, or all ticked studies - of the same or different patients - at once (Apply to: All ticked studies). Each study keeps its own generated accession; merging different patients asks for confirmation. Changes show in gold/orange in the viewer overlay, tags panel and browser, and are written to the audit log Patient panel > Correct patient details
3 Query PACS (Study Root C-FIND) or the Modality Worklist (scheduled orders, typically from the RIS - the source of accession numbers for new exams). Filters: Patient ID, Name (wildcards), Accession, Modality (MWL), Birth Date, Study/Scheduled date range. Pick a result to fill in Patient ID + Name + Birth Date (+ Accession); results also show the Study Instance UID Query (rail) / Find in PACS / MWL
4 CD/DVD import via a temporary local cache: the disc is copied to %LocalAppData%\DicomFlow\Cache\CD_<timestamp> first, then viewed/updated/sent from there. The cache is deleted automatically after a successful upload (configurable) Import CD/DVD
5 Image viewer: Patient > Study > Series browser with send tick-boxes; stack scrolling (wheel, arrows, slider), window/level (right-drag or tool), presets (CT lung/bone/brain...), pan, zoom, fit, 1:1, invert, cine playback with FPS, multi-frame support, JPEG / JPEG-LS / JPEG 2000 / RLE decoding Centre pane
6 DICOM Tags panel: key Patient / Study / Series / Image tags and a searchable All Tags list (including sequences) of the displayed image Right pane
7 DICOM Transfer (PACS to PACS): search the source PACS by Patient ID (lists all studies / accession numbers of the patient) or Accession Number; results show patient, birth date, accession, date, modality, description, images and Study Instance UID. Tick studies and transfer them to the destination PACS. All objects of a study are transferred - images and also Structured Reports, Key Object Selection, dose reports, presentation states, PDF / CDA documents and vendor-specific objects; if the source PACS leaves anything out, the study is not forwarded and the missing series are named. Each study is retrieved into a temporary folder (%LOCALAPPDATA%\DicomFlow\Transfer), checked for completeness (an incomplete retrieve is never forwarded), sent unchanged, and the temporary folder is always deleted - after completion, on error and on cancel. Retrieve with C-MOVE (source PACS sends to Dicom Flow's AE / IP / port - register it as move destination and open the port in Windows Firewall) or C-GET (same connection, no registration; PACS must support it) Transfer workspace
8 Progress of uploads in the status bar: progress bar with Study n/m · images done/total · %, and per-study progress in the browser / study list Status bar
9 DICOM CD/DVD Burn: Source = PACS (search by Patient ID or Accession Number, tick studies) or Files / folders on this PC (Add folder - e.g. a CD, USB stick or export folder, subfolders included - or Add files; every DICOM study found is listed and ticked; the files are written as they are and never modified). From a PACS: Every object of each study is retrieved (C-MOVE or C-GET, as for Transfer) - images and Structured Reports, key objects, PDF / CDA, dose reports and vendor objects; an incomplete study stops the job (nothing is written). The disc follows DICOM media rules (DICOM Part 10 / 12): DICOMDIR (Patient > Study > Series > Image / SR DOCUMENT / KEY OBJECT DOC / PRESENTATION / ENCAP DOC / PRIVATE records), files under DICOM\Pnnnnnnn\Snnnnnnn\Ennnnnnn\Innnnnnn (ISO 9660-safe names), plus a README.TXT listing the patients and studies. Objects are written uncompressed, Explicit VR Little Endian by default (DICOM general-purpose CD/DVD profile STD-GEN-CD, opens in every viewer; option to keep the PACS compression instead). Output: burn to a CD/DVD writer (Windows IMAPI2, ISO 9660 + Joliet + UDF, capacity checked before writing, optional eject), save an ISO image (burn later or on another PC) or copy to a folder / USB stick. Temporary files (%LOCALAPPDATA%\DicomFlow\Burn) are always deleted Burn workspace (Ctrl+B)
10 DICOM Download: search a PACS by Patient ID or Accession Number, tick studies and save them - images and reports (Structured Reports, key objects, PDF, vendor objects) - as DICOM files in <folder>\<Patient name>_<Patient ID>\<Study date>_<Accession>. Retrieve with C-MOVE or C-GET; a study is only saved when it was retrieved completely (it goes through a temporary folder that is always deleted); downloading again never overwrites, it creates ... (2). Double-click a row to open its folder Download workspace (Ctrl+L)

Other behaviour:

  • Source files are never modified: tag changes are applied in memory as each image is sent.
  • When the Patient ID changes, the original ID is kept in the Other Patient IDs Sequence (0010,1002) and, for older PACS, in the retired Other Patient IDs (0010,1000) (configurable).
  • Non-ASCII names are sent with Specific Character Set ISO_IR 192 (UTF-8) when the file declares no character set, or when the declared one cannot hold the new value (e.g. a Cyrillic name in a Latin-1 file: all text is re-encoded).
  • DICOM conformance: see DICOM Conformance Statement.
  • Folders are scanned recursively; images are grouped by study/series and sorted by Instance Number; DICOMDIR, duplicates and non-DICOM files (viewer software, autorun, html...) are skipped.
  • Images are sent in associations of up to 100 files / 300 MB, with per-study status (Sent / Partial / Failed).
  • Shared configuration (all Windows users of the PC): <install folder>\Config\settings.json (PACS nodes, AE title/port, options) and <install folder>\Config\accession_history.txt. The installer gives the local Users group Modify rights on that folder only. The Settings dialog always reloads the latest saved version.
  • Per user: theme (%LocalAppData%\DicomFlow\user.json), logs (%LocalAppData%\DicomFlow\Logs) and the CD cache (default %LOCALAPPDATA%\DicomFlow\Cache, stored with the variable so each user gets their own).
  • Upgrading from 1.4 or earlier: the first start copies that user's settings into the shared configuration and merges their accession history.
  • Command line: DicomFlow.exe "D:\some\folder" loads that folder on start-up.

Typical workflow

  1. Settings (rail, bottom) - sign in as administrator (admin / DiFlow), add the PACS (e.g. MainPACS, AE PACS, 10.0.0.5, 104) and, if used, the RIS worklist node; pick them in the Send to / Query / Modality Worklist boxes; Test Connection; Save; sign out. The PACS/RIS must know Dicom Flow's AE title and IP.
  2. Upload workspace: Import CD/DVD (or Open folder). The studies appear as cards; the first is displayed.
  3. Select a study card -> Find in PACS / MWL -> search (e.g. SMITH*) -> Use Patient ID + Name + Accession. Or type new values in Correct patient details and click Apply.
  4. Tick the studies to send (box on each card) -> Send to PACS.

The palette button in the header opens the theme picker (eight themes, Ctrl+Shift+D cycles through them). The choice is remembered per Windows user. Viewer controls: wheel / arrow keys = next/previous image, right-drag = window/level, middle-drag = pan, Ctrl+wheel = zoom, double-click = fit, Space = play/stop.

Installation

Prerequisites: Windows 10 (1607+) / 11 or Windows Server 2016+, 64-bit; administrator rights for installing. No .NET installation is needed (the runtime is built into DicomFlow.exe). The image decoder needs the Microsoft Visual C++ 2015-2022 Redistributable (x64), which the complete setup installs automatically.

Two installers are built:

File Use
DicomFlow-Setup-<version>.exe Recommended. Installs the Visual C++ runtime if it is missing (embedded, works offline), then Dicom Flow.
DicomFlow-Setup-<version>.msi For software distribution (GPO / Intune / SCCM). Deploy vc_redist.x64.exe first; the MSI refuses to install without it.

Silent install of the complete setup: DicomFlow-Setup-<version>.exe /quiet /norestart

Feature selection. The setup's Custom Setup page lets you choose which functions are installed - at least one, or all (default):

Feature MSI feature name Enables
DICOM Upload FeatUpload Folder / CD import, viewer, editing Patient ID / Name / Birth Date, sending to PACS
DICOM Upload with Query / Retrieve of patient details FeatQuery DICOM Upload + Query PACS / Modality Worklist for patient details
DICOM Transfer FeatTransfer Retrieve studies from one PACS and transfer them to another
DICOM CD/DVD Burn FeatBurn Burn studies from a PACS (images + reports) or from files / folders on this PC to a DICOM CD/DVD, ISO image or USB stick
DICOM Download FeatDownload Save studies (images + reports) from a PACS as DICOM files in a folder on this PC

Pressing Next with nothing selected shows a message and stays on the page; a silent install with no feature is refused. Dicom Flow shows only the installed functions (without DICOM Upload, the Transfer, Burn or Download workspace opens at start). Features are recorded in HKLM\SOFTWARE\SP\Dicom Flow\Features. To change them later, run the MSI again (Change). Silent install with a selection (the core feature Main is always installed):

msiexec /i DicomFlow-Setup-2.1.2.msi /qn ADDLOCAL=Main,FeatUpload,FeatTransfer,FeatBurn,FeatDownload

Run the setup as an administrator (it asks for elevation). It installs per machine:

  • C:\Program Files\Dicom Flow\DicomFlow.exe (folder can be changed in the setup)
  • C:\Program Files\Dicom Flow\Config\ - shared configuration, writable for all local users
  • Start menu and desktop shortcuts for all users; entry in Apps & features (publisher SP)

Installing a newer MSI upgrades in place; the shared configuration is kept (it is also kept on uninstall). Silent / software-distribution install:

msiexec /i DicomFlow-Setup-1.5.0.msi /qn
msiexec /i DicomFlow-Setup-1.5.0.msi /qn INSTALLFOLDER="D:\Apps\Dicom Flow"

Build

Requires the .NET 8 SDK (winget install Microsoft.DotNet.SDK.8).

cd DicomFlow
dotnet build -c Release

Installers (publishes the exe and builds Publish\DicomFlow-Setup-<version>.exe and .msi). One-time setup: dotnet tool install --global wix --version 5.0.2, then wix extension add -g for WixToolset.UI.wixext/5.0.2, WixToolset.BootstrapperApplications.wixext/5.0.2 and WixToolset.Util.wixext/5.0.2.

powershell -ExecutionPolicy Bypass -File installer\build-installer.ps1 -CertThumbprint <thumbprint>

Code signing

Windows Smart App Control and SmartScreen block unsigned programs, so release builds must be signed with a code-signing certificate from a trusted provider (e.g. Microsoft Azure Trusted Signing, DigiCert, Sectigo, GlobalSign). The build script signs, with SHA-256 and a DigiCert RFC 3161 timestamp: DicomFlow.exe (before it goes into the MSI), the MSI, the setup's inner engine and the setup.exe.

Certificate Build command
In the Windows certificate store / USB token build-installer.ps1 -CertThumbprint <thumbprint> (add -MachineStore for LocalMachine\My)
PFX file $env:DICOMFLOW_SIGN_PFX_PASSWORD='...'; build-installer.ps1 -PfxPath C:\certs\codesign.pfx
Azure Trusted Signing build-installer.ps1 -TrustedSigningDlib <path>\Azure.CodeSigning.Dlib.dll -TrustedSigningMetadata metadata.json

Without a certificate the build is unsigned and prints a warning; -RequireSigning makes that an error (use it for release builds). signtool.exe is taken from the Windows SDK or downloaded once from Microsoft's Microsoft.Windows.SDK.BuildTools NuGet package into installer\tools (its Microsoft signature is checked). Check a signed file with: Get-AuthenticodeSignature Publish\DicomFlow-Setup-<version>.exe.

Installer sources: installer\DicomFlow.wxs (MSI definition), installer\Bundle.wxs (complete setup), installer\License.rtf (text shown in the setup - replace with your licence terms), installer\make-icon.ps1 / make-installer-art.ps1 (icon and setup bitmaps).

Distributable single-file exe only (no .NET install needed on the target PC, ~70 MB):

dotnet publish DicomFlow -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true -p:DebugType=none -o Publish

How it was built

Dicom Flow was created by vibe coding: instead of writing the code by hand, SP described what the application should do in plain language and an AI coding assistant - Claude Code, Anthropic's agentic coding tool - wrote, built and tested the code in a continuous conversation.

  • SP's part: the idea and requirements (PACS upload from folder / CD, patient reconciliation, accession numbering, DICOM Transfer, CD/DVD Burn, Download, administrator rights, the Flow interface and themes, open-source release), feedback from real use - screenshots of problems, logs from a real PACS - and the decision on every change.
  • The AI assistant's part: the C# code, the WiX installers and build script, the documentation (including the DICOM Conformance Statement), and checking its own work: building the application, running automated tests against a simulated PACS (C-ECHO, C-FIND, C-MOVE, C-GET, C-STORE, DICOMDIR / ISO creation, character sets, sign-in) and launching the application to inspect its screens.
  • How bugs were fixed: problems found in use - for example the locked temporary folder after creating an ISO (2.1.1) and the garbled study list when scrolling (2.1.2) - were reported back in the conversation, reproduced by the assistant with a test, fixed and verified before release.

What this means for you:

  • The code has been tested with simulated PACS servers and in day-to-day use, but it has not been through an independent code review or formal DICOM validation. Review it, and test it with your own PACS, before relying on it.
  • Contributions, issues and reviews are welcome - especially from people with PACS / DICOM experience.

Known limitations

  • Images are sent in their stored transfer syntax. Native codecs are included so fo-dicom can transcode when a PACS does not accept that syntax, but this path has not been tested against a real PACS.
  • Viewer is for review before upload, not diagnostic reading (no measurements, MPR or hanging protocols).
  • Accession numbers are guaranteed unique per PC. Two PCs can only clash if both generate a number for patients with the same first character in exactly the same second. When many studies are loaded at once, their numbers use consecutive seconds, so the time part can run a few seconds/minutes ahead of the real time.
  • Builds are only trusted by Smart App Control / SmartScreen when signed with a real code-signing certificate (see Code signing); IT-managed PCs with AppLocker / WDAC can also allow-list Dicom Flow by publisher or hash.

License

Dicom Flow is open-source software released under the MIT License - see LICENSE. You may use, copy, modify and distribute it, also commercially, as long as the copyright and licence notice are kept. It is provided "as is", without warranty. Third-party components keep their own licences (fo-dicom and fo-dicom.Codecs: MS-PL) - see THIRD-PARTY-NOTICES.md. The installers show the licence and install LICENSE.txt and THIRD-PARTY-NOTICES.md next to the program.

Medical use: Dicom Flow is not a certified medical device and its viewer is not for diagnosis. Users are responsible for data protection and for verifying patient identification.

Administrator password in an open-source build: the built-in administrator credentials (admin / DiFlow) are documented here and the same in every copy built from this source. They keep normal users from changing the settings by accident, but they are not a secret; for stronger protection restrict the Config folder with Windows permissions, or build your own copy with a different password hash (AdminSession.PasswordHash).

About

Open-source Windows DICOM tool: upload from folder or CD/DVD to PACS with patient reconciliation, PACS-to-PACS transfer, CD/DVD burn and download (C# / .NET 8, fo-dicom). Vibe-coded with Claude Code. MIT License.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages