Summary
- Add support for North Star Imaging (NSI) project/metadata files (*.nsipro). This functionality should parse .nsipro files from either the “Load Metadata” or “Geometry File” buttons, populate the geometry UI using fields from the file and call the existing "push" setter functions to set server-side geometry.
What to implement
Why
- NSI .nsipro files are used for North Star Imaging CT scanning machines and contain geometry & metadata for scans. Supporting them directly improves usability, reduces user errors, and allows users to load scan metadata without manual entry.
- Reuses existing "push" setter methods in the GUI and server API, which adds no risk to core reconstruction code.
- Improves reproducibility and saves time migrating scans into LEAP.
Acceptance criteria
- UI elements & behavior
- An import NSI project (.nsipro) flow exists in ct_geometry_page using the existing "Geometry File" button with .nsipro filter and in file_names_page using existing “Load MetaData” button with .nsipro filter.
- When a .nsipro is selected/imported, LEAP GUI fields (sod, sdd, pixelWidth, pixelHeight, num cols/rows, centerCol, centerRow, numAngles, angular_range, numX,numY, numZ, Tx, Ty, Tz) are populated reflecting leapctserver parameters.
- After import, the corresponding push_ methods are called so leap server parameters are updated.
- Parser
- Importing partial .nsipro files still populates the fields that are present.
- Handling of unit conversions where needed.
- Crop / FOV mapping
- If the .nsipro contains a crop string, the importer computes and populates dFOV (diameter in mm) and detector center offsets (or populates NumX/NumY/NumZ/offsetXYZ where applicable) and updates relevant GUI field in ct_volume_page.py.
Files & entry points to change
- file_names_page.py
- Add .nsipro to the Load MetaData file dialog filters (so users can pick NSI project files).
- When an .nsipro file is selected, call self.lctserver.load_nsipro(inputArg) (same style as loadsct or load_parameters)
- ct_geometry_page.py
- Implement import_nsipro_geometry(nsipro_path) that calls leapctserver.load_nsipro()
- leapctserver.py
- Add load_nsipro(path) server-side loader that parses common .nsipro tags, normalizes units, and updates leapctserver state via the existing set_cmd() method
Summary
What to implement
Parser + importer
UI wiring
Crop / FOV mapping
Error handling and UI feedback
Why
Acceptance criteria
Files & entry points to change