kineuroExperimental Neuroradiology Research
Karolinska Institutet

The Release page

Make a release of a cohort or of a card's answer, see how each dataset's files leave, hand it over under a password of its own or withdraw it, and keep session schemes.

Release has three pages in the side: Releases, New release and Session schemes. It opens for a person with see on Release. Making a release, handing it over, withdrawing it and keeping a scheme need work on Release.

Make a release

  1. Open Releases and press New release. From a cohort on Data, Release opens the same dialog with the cohort chosen.
  2. Of: a cohort (every current member and every stack of theirs), or a query card’s answer (a complete answer at stack grain, kept on this desk and not stale).
  3. Name: filled in for what the release is of, the day and the next number of that day. Change it if you want.
  4. Layout: BIDS or Descriptive. Beside BIDS, names asks for Full names or Minimal names. How the files are named says what each writes.
  5. How it leaves: read it. It says, for each dataset the files come from, how that dataset’s files leave. Nothing to choose unless you override.
  6. Sessions: choose a session scheme, or press New scheme to make one here. A scheme says how a subject’s studies become sessions and what each is called.
  7. Name subjects by (since desk 1.0.0-beta.12 with engine 1.0.0-beta.13): leave it on Subject code, or add ID types; see name the subjects by an ID.
  8. Override: leave it on UIDs: each dataset’s own, or choose UIDs remapped or UIDs kept for every file of this release. The release row says so.
  9. Written to: an export place. Settings, Places makes one.
  10. For a cohort, press Select first. It says what the release reaches (subjects, sessions, stacks, size) and writes nothing.
  11. Open Expert options below the form only if you need one; see expert options.
  12. Press Release. It queues the job, and the page says which job and where it writes.

A cohort with stacks still waiting on Review says so before it leaves: they leave with the rules’ verdict as it stands, marked unsure in the dataset’s report. Sort them first to release them settled. A release from a card sends the card’s answer as its handle, which the engine reads itself and refuses when it no longer reproduces.

A BIDS release needs dcm2niix. Where it is missing the release is refused before it starts and says what to do: Install on Settings > Software, or Install from a file where the engine cannot reach the releases. Before 1.0.0-beta.2 the same was on Settings, Parts, Tools.

How it leaves

A dataset’s files leave under that dataset’s own policy for UIDs: remapped from the key, or kept. A release spanning datasets applies each dataset’s to its own files. A file under no dataset leaves with its UIDs remapped. The row records what each dataset’s files left under.

Every release keeps the real date. A release is pseudonymous, not anonymous: the date is what a clinical join reads, and the intervals between visits are the science. Where a date must not show in a path, name a session scheme that labels sessions by months since baseline (M00, M06).

Releases written before 1.0.0-alpha.37 that shifted their dates or cut them to the year still read as they were written.

Name the subjects by an ID

A release names every subject by its subject code unless you say otherwise. Since desk 1.0.0-beta.12 with engine 1.0.0-beta.13 it can name them by an ID the registry keeps, so a tree leaves under a study’s own subject labels.

  1. In New release, find name subjects by. Subject code is the last tag and stays.
  2. Add an ID type. The types offered are those that keep at least one value. An ID type whose IDs lead to a person (PatientID as a hospital wrote it, or any type that says it leads to a person, such as a hospital’s record number) is never offered, and neither is a subject code filed as an ID.
  3. Add another type to try next for the subjects who hold none of the first. Move a tag earlier or later with its arrows; remove it with its cross.
  4. Read the plan under the tags: how many subjects each type names, and how many keep their subject code.
  5. Where a subject holds several IDs of the type that would name it, choose the one that names it. Release waits until every subject has one name of its own, and the dialog’s foot says what is missing.

A name keeps letters and digits only: AB_01 is written sub-AB01. Two subjects that would share a name once cleaned are listed, and the release waits. A value shaped like a personnummer never names a subject, and since engine 1.0.0-beta.14 a released folder is never named by an ID type whose IDs lead to a person: the engine refuses such a type by name for every account, at the keyboard too. A person who may not see IDs is shown counts only; someone who may see IDs has to choose.

Where an ID names a subject, the name stands wherever the subject code stood: folders, file names, the participants, sessions and scans tables, the PatientID of released DICOM, and a handover’s archives. The registry keeps which name is which subject. A choice is kept with the release’s name, so its next version does not ask again. The Releases table says what each release named its subjects by, as counts.

At the keyboard:

nils release --name NAME --cohort COHORT --name-by study-id --name-by trial-id --name-plan   # rehearse; writes nothing
nils release --name NAME --cohort COHORT --name-by study-id --name-choice CODE=VALUE --out DIR

The releases made

Releases is a table. Each row is a release: its name, version and layout, how its dates and UIDs left, its subjects and sessions, when and by whom, whether it was handed over, and whether it was withdrawn and why.

Hand over a release

A release stays a plain folder. Handing it over is an optional step that packs it for a receiver.

  1. On the newest version of a name, press Hand over.
  2. Choose the exchange place the archives go to.
  3. Encrypt the archives is on. Under Password, choose Made by NILS, this handover’s own, or I type one and type it twice. Typing one is for the release’s maker and a holder of Handover passwords at work; anyone else sees the choice disabled, with what it needs.
  4. To hand over unencrypted, turn Encrypt the archives off and say why. The reason is kept on the handover and in the audit.
  5. Press Hand over. The newest version is packed into archives in the exchange place, apart from the tree, and read back once written.

Give the receiver the password

Each handover has a password of its own.

  1. On Releases, press a version’s handed-over date. Its handovers open, each with where it went and how it is kept closed.
  2. Press Show the password. It is offered to the release’s maker and to a holder of Handover passwords at see.
  3. Copy it, tick I copied it, and press Done. The password is shown once, in a dialog of its own, and is gone when it closes.

Give it to the receiver apart from the archives. A password NILS made is never stored: it is made again from the key and the handover when asked. A typed one is kept sealed under the registry’s key. Neither is ever in an address, the browser’s storage or a log, and each showing is audited.

At the keyboard, a handover is nils handover run --release NAME --out DIR. Its password is made from the registry’s key, or the key --key names; --password-stdin takes a typed one from standard input, never from the command line; and --no-encrypt --why TEXT writes the archives unencrypted. nils handover password --handover ID prints one handover’s password. nils handover password --key NAME prints the old shared password, which opens the handovers made before each had its own. With an engine before 1.0.0-alpha.88, the dialog asks for the name of the key instead, and the password comes from that command.

Stop a release

Since 1.0.0-beta.3 a running release can be stopped. On Jobs, press Stop on its row (at the keyboard, nils jobs cancel, or Ctrl-C where the release runs). The stack in hand is finished whole, no further stack is begun, and what was written stays written. The row on Releases then reads stopped after N of M stacks and is not a version: nothing that asks for the newest version finds it, and a handover of that folder is refused until the release is run again. Running the same release into the same folder goes on where it stopped, under the same version number. A second Ctrl-C gives up the stack in hand as well.

A release holds its output folder while it runs: a second release into a folder another release is still writing is refused, on any machine and from any registry, and a lock left behind by a release that died blocks nothing for longer than a minute. A release reports itself after every stack and every few seconds through a long conversion, so a release on a cluster node is no longer taken for dead by another node.

Withdraw a version

  1. On the row, press Withdraw.
  2. Give a reason. It stays on the release for everyone to read.
  3. Press Withdraw.

A release is never removed. Its files stay where they were written, and the row reads that it was withdrawn and why.

Session schemes

Session schemes lists the schemes the registry keeps. A kept name is never replaced, and a release names the scheme it used. Without one a release uses the registry’s own.

  1. Press New scheme.
  2. Give it a name.
  3. Choose how sessions are named: Months from the first, By date or In order.
  4. For months, give the visit months (0, 6, 12, 24 gives M00, M06, M12, M24) and within, months: how far from a visit’s month a session may sit and still take its label.
  5. Give one session within, days: a study joins a session when it falls within that many days of its first study. 0 is the same day.
  6. Press Keep it.

Rebuild visits

After a scheme changes, the visits are built again under it.

  1. On Session schemes, press Rebuild visits. It needs work on Pipelines.
  2. Under Under, choose the registry’s own scheme or a kept one. The dialog says what it will do: it builds the visits again under that scheme, for every subject whose studies changed.
  3. Read the hint: a pick on a visit that moves follows it, and a pick on a visit that goes is withdrawn and asked about in Review.
  4. Press Rebuild visits. It runs as a job, and the page says which.

How the files are named

There are three ways to name a stack, chosen per release: the descriptive layout, and two styles of BIDS.

Style Written as What it names
Descriptive Ax_T2w_2D_FLAIR_IRTSE_ND_3mm everything, in the earlier NILS’s grammar
BIDS, full names acq-Ax+2D+FLAIR+IRTSE_T2w every axis that has no BIDS entity, in acq-, joined by +
BIDS, minimal names acq-2D+FLAIR+IRTSE_T2w only 2D or 3D, the modifiers and the technique

Since the MRI pack 1.5.0 (engine 1.0.0-beta.23) a technique is named by one general word, in the registry and in every file name, where some were named by a vendor’s word or a second spelling: IRTSE where it said TIRM, SSTSE for HASTE, SPGRE for FLASH, DWIEPI for DWI-EPI. The word has letters and digits only, so the same word fits a BIDS name. A vendor’s word still finds its technique in a question, a selection and a saved rule. A release made after the update names the files of those techniques by the general word.

In both BIDS styles the suffix is the base contrast, or a construct suffix BIDS defines (ADC, FA, T1map, angio, asl). A FLAIR is always a modifier in acq-, never the suffix. Entities carry what BIDS has a place for: ce-, rec-, part-, echo-, inv-. Two stacks of one session that would share a name each carry what separates them, and a BIDS release is never refused for a name conflict. Since 1.0.0-beta.2 the shared-name questions a release raises are asked only for the stacks it writes. Names are still settled over the whole registry, so a name never depends on what a release took, and a group of stacks is asked about only when two or more of them are in the version, once; an answered group is never asked again. Every axis is in the sidecar either way. The descriptive layout is the earlier grammar whatever is asked, so names shows only beside BIDS, and Full names is what the engine writes unless asked. The releases table marks a release written with minimal names.

A BIDS release also writes a DICOM export under sourcedata/dicom/, at the path of each NIfTI, unless DICOM copies says otherwise, and a NILS object in every sidecar: each axis with the tier and confidence that decided it, the descriptive name, and the acquisition as measured. SyMRI’s images stay together under anat/SyMRI/. Re-running a release renames the files it moves.

Phase images

Since 1.0.0-beta.2 a phase image takes a BIDS name. A phase has no weighting, so the rules give it no base, and an earlier release left it under sourcedata/ with no suffix. It is now named part-phase under the suffix and datatype of the magnitude image of its acquisition (the same subject and session, the same echo, the same series or a series of the same protocol and frame of reference): _part-phase_T2starw, or _echo-2_part-phase_MEGRE. That magnitude takes part-mag beside it, which BIDS asks for only where a phase is named too. A phase with no magnitude keeps its reason. The report counts the names decided this way, as it counts the shared names.

One acquisition filed twice

One acquisition written twice into the tree is one stack with several paths, and a release writes it once. Two stacks of one subject, session and datatype acquired at the same moment, the same in every field the repeat test reads and with the same pixel data are no longer numbered and both written: the first in the release’s order is written under its own name, and the other is recorded as written twice, naming the stack that was written, and counted. Nobody is asked about it. The summary says “written once for two paths”. Where the original is held, left out or not selected, the first copy of the acquisition is written under the original’s name instead.

The pixel data decide it, since engine 1.0.0-beta.22. A scanner also stores a second image under the header of the first, a filtered image beside its magnitude image for one, and those are two images: where the pixel data differ, each stack is written under a numbered name, and the release record says the image itself differs. A stack whose files cannot be read is never taken for a copy. A release run again over a version an earlier engine wrote renames the stack that was written to its numbered name without writing it again, and adds the one that was left out.

What the converter did

A stack whose slices carry echo times that differ only past the second decimal is one volume, and is converted as one. The digest holds such slices as one stack, while dcm2niix splits them on any difference and writes two volumes under the same echo postfix. Where the converter’s own lines say exactly that (the same echo number, echo times equal to two decimals), the release converts the stack once more with dcm2niix’s merge of a series’ 2D slices and takes the result when it is exactly the files asked for. Two real echoes, a magnitude and its phase, or any other set of names keep the refusal, and the merge is never a default.

A conversion refused because the converter wrote a file nobody asked for says which route it took: dcm2niix made two volumes of one stack, which the digest holds as one, or it found the name already in the folder, written by another stack of this run or left by an earlier run. The stack is then written as DICOM instead, and the report has one line per cause, never one per file.

The report says once what happened to a stack whose files were gone from the tree: restored: their files were gone from the tree, apart from written again for the stacks rewritten for any other reason, each only when above zero.

Expert options

Below the release form, Expert options folds the release’s other options. Each starts at the engine’s own default and is sent only once changed, and the fold says how many are changed.

Option Choices
Localizers in sourcedata (default), in their datatype, in anat, or left out
Synthetic contrasts in their folder (default), in anat, or in derivatives
DICOM copies of every stack (default), of the stacks in a folder of their own, or none
Converter dcm2niix as the engine finds it; a path to another dcm2niix only for a person with work on the install
Uncompressed NIfTI .nii instead of .nii.gz
Authors for dataset_description.json; whoever releases it unless named
Categories of element removed patient, trial, provider, institution, times and IDs, all unless some are taken off; at least one
UID root the arc new UIDs hang from: numbers joined by dots; DICOM’s UUID arc unless given
Only the picked scans the stacks a pick chose
Only some roles every role unless named

A value the engine would refuse holds Release, with the reason. Only the options the engine names are drawn, so an engine before 1.0.0-alpha.88 shows no fold.

At the keyboard they are flags of nils release:

nils release --name NAME --cohort COHORT --layout bids --localizers drop --out DIR
Option Choices
--naming full (default), minimal; the desk’s names
--localizers sourcedata (default), datatype, anat, drop
--synthetic folder (default), anat, derivatives
--dicom all (default), folders, none
--workers 1 to 64 stacks written at once (since 1.0.0-beta.4; default the smaller of 8 and the cores, or the setting NILS_RELEASE_WORKERS)
--converter PATH, --no-compress, --author NAME the converter, .nii, and an author, which repeats
--categories LIST, --uid-root OID the categories removed, and the UID root
--picked, --role ROLE only the picked stacks, only a role, which repeats
--uids overrides every dataset’s policy for this release
--dataset NAME only the files under that dataset’s tree

The engine’s door is POST /api/releases, which takes datasets beside cohorts, and the expert options, each checked as its flag is before a job is queued. GET /api/capabilities names the options it reads in releases.expert.

Updated 28 October 2026