spinecontour Research use only Guide Download

Guide · Import and export

Import and export

SpineContour has two kinds of export. CSV files take measurements to a spreadsheet or a statistics package. Bundles take films, together with everything the app knows about them, to another SpineContour library, so you can carry your work to a second computer or bring in a colleague's annotations. To load films for the first time, see Importing films and clinical data.

At a glance

ToUseWhere
Analyse measurementsExport CSV, one row per filmParameters tab, or one film from the Analysis screen
Compare visitsExport paired CSV, one row per subjectParameters tab
Move films and annotationsExport all or Export N selected, which writes a bundleFind tab
Bring a bundle inImport bundle…The drop area on the Studies screen
Train a modelLabel records, one JSON file per corrected filmThe labels folder, see Editing

Every export is written to a folder you choose on this computer. Nothing is uploaded, and none of these buttons makes a network call.

Export CSV

On the Parameters tab, Export CSV writes every row that is showing. Tick rows and the button becomes Export N selected, which writes the ticked rows that are showing. So the filters decide what goes in: workspace, folder, timepoint, view, subject, flag, Paired only, Segmented only and the search box. Picks hidden by a filter stay ticked and come back when the filter is cleared.

On the Analysis screen, Export CSV writes the open film on its own.

What is in the file

  • Two comment lines come first, each starting with #: # Spine Contour export and # Investigational software. NOT FOR CLINICAL USE. The header is line 3. Tell your reader to skip two lines, or to treat # as a comment.
  • Identity: Study ID (the file name without its extension), View, Subject, Timepoint, Film date, Note and Flags. When any film is not lumbar, Spine region and Anterior image side follow.
  • Lumbar and pelvic: lordosis from L1 to S1 and from each level to S1, PI, PT, SS, PI–LL mismatch, L1 and T4 pelvic angles, 15 disc heights in millimetres, and segmental lordosis and disc angulation.
  • Cervical and global, when the export includes a cervical or full-spine film: C2–C7 Cobb angle, C2–C7 SVA in millimetres and pixels, T1 slope, cervical segmental angles, and C7–S1 SVA for full-spine films.
  • Then every clinical field the exported films hold, and the image calibration columns when any film has a scale.

Find columns by name, not position

Columns appear only when the films need them, and releases add columns: 1.8.0 added Flags, moving everything after Note one place right. A script that looks columns up by their header keeps working; one that counts positions does not.

  • A missing value is an empty cell, never 0 or a guess. A measurement that needs a landmark the film does not show is left blank.
  • Demo studies are never exported, and comments are not part of any CSV.

Export paired CSV

Export paired CSV on the Parameters tab writes one row per subject, with each visit side by side and the change from pre-op worked out for you. It needs every film's subject and timepoint, which is why naming your files pays off.

  • Columns: Subject; then each visit's study, view, film date and flags; then for every measurement <M> Pre-op, <M> <visit> and Delta <M> <visit>, the later value minus the pre-op value; then each clinical field per visit.
  • A subject needs exactly one Pre-op visit and at least one later one. A later timepoint with several visits is numbered by date: Post-op 1, Post-op 2.
  • Two films from one visit are merged when exactly one of them has no note. That film is the primary, and the noted film (femoral heads, say) only fills in what the primary lacks. Disagreements are listed in the file. If both films have a note, or neither does, the subject is left out and named in the message, rather than one being picked silently.
  • Subjects that cannot be paired are named in the message, and films with no subject or timepoint are counted.
  • To export one visit only, tick Paired only and choose the visit in the with dropdown.
  • The suggested file name is <workspace>-paired.csv.

CSV files are one-way

The app's own CSV exports cannot be loaded back in, through the Workspace or anywhere else. The Workspace reads a clinical CSV you prepare, keyed on study_id, which is a different file. To move studies with their measurements and annotations, use a bundle.

Bundles

A bundle is a plain folder, not an archive. You can open it, copy it to a drive and delete it like any other folder. It holds:

spine-contour-export-2026-11-22-1432/
  manifest.json                  the list of films, written last
  sub225_pre-op_10-23-2023/
    study.json                   the study, without its location on disk
    prediction.json              the model's result, if it was segmented
    sub225_pre-op_10-23-2023.label.json   edits, comment and flags
    calibration.json             a manual image scale, if you applied one
    film/sub225_pre-op_10-23-2023.jpg     the original film, byte for byte

Each film's folder is named after the film. A second film with the same name gets -2. A folder without a manifest.json, such as an export that was cut off, is not a bundle and cannot be imported. Delete it and export again.

Exporting a bundle

  • On the Find tab, press Export all, or Export N selected when rows are ticked. It follows the CSV rule: the ticked rows that are showing, or every row that is showing.
  • Choose a folder. The bundle is written inside it, named with the date and time. There is no confirmation and no progress bar. The button reads Exporting… until a message says where the bundle went.
  • A film that cannot be found is left out, and the message names it. Its study still goes in, with its results, and imports without a film.
  • If the folder is full or read-only, the export stops with a message. The half-written bundle has no manifest; delete it and try another folder.
  • The button is unavailable while a segmentation run, a batch, another export or an import is running. Its tooltip says why.

Importing a bundle

On the Studies screen, press Import bundle… in the drop area and choose the bundle folder, the one that holds manifest.json. Nothing changes yet. The app works out what each film would do and asks first:

Import from spine-contour-export-2026-11-22-1432: 10 to add, 2 to update,
2 to flag, 3 to skip. The films stay in this folder, so keep it where it is.

Press Import to go ahead, or Cancel. A film is matched by its content, using a SHA-256 hash of the file, never by its name. A renamed copy of a film you already have still matches, and two different films that share a name do not.

The bundle's filmWhat happens
Not in this libraryAdded, with its result, label record, comment, flags, review mark and image scale
Here, but the bundle's annotation is newerUpdated. The bundle has a label record and this library has none, or the bundle's was saved later
Here, and only its flags differFlagged. It gains the bundle's flags and nothing else
Here, with the same or a newer annotationSkipped, already in the library. Flags are still merged
Open in the level editor hereSkipped, being edited
Damaged or incomplete in the bundleSkipped, malformed. The other films still import
  • An update keeps what is yours. The film's location, name, workspace folder, subject, timepoint, film date, note and clinical fields stay as they are. The annotation is replaced: the result, measurements, view and region, review mark, label record, comment and image scale. There is no merging of edits, so a film edited on both computers keeps only the later save.
  • Flags are merged, never replaced. A film keeps its own flags and gains any new ones from the bundle. See Flags and comments.
  • Importing the same bundle twice adds nothing. The second time, every film is already in the library.
  • To bring later edits across, export a new bundle from the computer where you made them, and import that.

Keep the bundle folder where it is

Imported films are not copied into the library. They stay in the bundle folder, and the study points at them there. Copy the bundle to a permanent place on the computer first, not a memory stick you will take away, and import from there. If the folder moves, a re-run asks you to locate the film. Films that were already segmented still open on their stored image.

Bundles are for your own machines

A bundle can identify patients

A bundle carries each original film untouched, and a DICOM header can hold a name, a medical record number, a birth date and exam dates. study.json carries the file name and everything typed into the study: subject, note and clinical fields. SpineContour does not remove identifiers. Do not email a bundle, put it on a shared drive or give it to a collaborator unless the films are de-identified and the names and notes checked, as your approval for the data requires.

  • What does not travel: window and level, zoom and where you dragged the level labels. None of these is ever saved.
  • Use the same version on both computers. A bundle from a newer SpineContour is refused with a message asking you to update. An older version may skip films or drop fields it does not know, such as flags.