NRRD scale factor

I’ve used RawImageGuess module to guess the format of some images and I’d like to use the ‘Generate nrrd header’ function to create a header template and convert them all to *.nrrd with a script.

How can I include a scale factor in the nrrd header?

By scale factor, do you mean the voxel spacing?

If so, you should have specified that at the time of header creation (fields called X_Spacing, Y_Spacing, Z_Spacing). Alternatively you can edit the image spacing field of the imported NRRD file in Volumes module, and resave the data.

Ah sorry I mean a scalar which the raw image intensities (mine are integers) are multiplied by to give a real-world value (mine is activity concentration in Bq/mL) – in other words like the rescale slope in DICOM format. Is there an equivalent in the NRRD format that Slicer recognizes?

There is no intensity scaling information in NRRD format. You could add private fields that your software would recognize, but if you want to follow the standard and be compatible with more software then probably your best bet is to store the real-world values (as floating-point values).