# KeyObjectNote

A console sample that builds a **Key Object Selection (KOS) document** (Modality `KO`, code `113030` "Manifest" from DCM) referencing a collection of DICOM images. The resulting KOS object is written to disk as `KOS.dcm`.

The sample loads images from the bundled `Images/` folder, validates that all referenced instances belong to the same patient, then constructs the KOS content sequence with `CONTAINER` and `SEPARATE` value types, including retrieve URLs and the standard code triplet (`code value` / `coding scheme designator` / `code meaning`).

## How to run

1. Open `KeyObjectNote.sln` in Visual Studio.
2. Build and run.
3. Press a key to load the bundled images, then press a key again to generate `KOS.dcm`.

## Notes

- The images path is set via the `ImagesPath` constant (`..\..\..\Images`) — adjust if you run from a different working directory.
- If the licence reports as `null`, activate it manually in code.
- All referenced images must share the same Patient ID, otherwise the sample exits with an error.
