User Tools

Site Tools


DeltaVision Format Header Reader

For dealing with Collapsed DV files.


Kota Miura
Centre for Molecular and Cellular Imaging (CMCI)
EMBL Heidelberg
miura at embl dot de
Tel: +49 6221 387 404


  • 05-05-13
    • Header size of .dv file is calculated from the width and height of the frame, frame number.
    • General rule is:???
      • static header length: 528pixels (1056bytes) + dynamic headers (80 pixels/frame, 160 bytes/frame)
      • information for each frame is contained in the first 20 pixels (40bytes) and header is terminated at multiples of 512 pixels (1028bytes).
      • header length is somehow related to the number contained in [46,0] but there are exceptions
      • (header length=((lengthPrimer/512/2+1)*512*2))
      • [0,0] width
      • [2,0] height
      • [4,0] frames
      • [6,0] depth (z)
      • [90,0] time-points
      • [98,0] channels
    • UNSOLVED PROBLEM: if the sequence is the one that was force-terminated during the acquisition, header length is shorter than the value calculated by the above method. The sequence will not be imported properly.
  • 05-05-26
    • added second method (estimate from primer).
  • 05-07-12
    • depends only on headerlength primer; 4bytes (32bit signed integer)
  • 05-07-13
    • .r3d loader (Big endian)
  • 07-06-12
    • “Read .dv header” added. Reads out only the header info, so that the accidentally terminated file can be loaded from [import→ Raw]


Released under the GNU General Public License.


ImageJ ver 1.34j or higher (ImageJ, upgrade page).


Download DVreader.ijm to a place where you can access easily. Install the macro by [Plugins→Macros→Install…].


This macro was written when the DeltaVision Opener Plugin (or LOCI plugin) was still not published on the web for loading .dv and .r3d files. After these plugins being available, the purpose of this macro is limited to read the header size of the file when .dv file is collapsed. This happens when the file acquisition is terminated before as it was set at the beginning of the data aquisition.

For example, if you set the machine to take 100 time points but the time series stopped at 50th time points, the file header infromation contains 100 as the number of time points but your file actually contains only 50 frames. The DeltaVision Opener cannot handle this and loading of such illegally terminated sequences usually ends up in loading only the first frame of the stack.

To load such incomplete sequences, one must know the length of the header. Then one could use [File → Import → RAW…] to load the stack. This macro interprets the file and outputs the length of the header and the width and height of the image in the Log window for this purpose.

Work Flow for Loading Accidentally terminated .dv stack

1.? After installation, do [Plugins → Macros → Read .dv Header]. In the first dialog, choose the file which you want to load.? Then a message that looks like the image below will be printed in the Log window.

Invalid Link
log window output

2.? Check how many time points the .dv file actually contains. This can be done by opening the “.log file”. In the example shown in the image above, the name of the log file should be “Ptk2-32Grad-ts-110607_10_R3D.dv.log”. This is a text file, so if you double click, file will be opend in text editor. Scroll all the way down to the bottom of the file, and check the last frame number.

3. Do [File → Import → RAW…]. In the first dialog window, choose the same file you selected in the step 1. In the second dialgue, choose 16bit Unsigned for “Image Type”, width and height as it was printed out in the step 1, input Header Length number printed out in the step 1 as the “Offset to First Image”. For the “number of images”,? put the number you got in the step 2. “Gap Between Images” = 0, Check “Littele Endian Byte Order”. Then click “OK”.

Invalid Link
RawImporter Dialogue
downloads/dvheaderreader.txt · Last modified: 2016/05/24 12:46 by

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki