Wiki source code of ImageJ plugins

Version 1.1 by fwilde on 2016/05/27 11:52

Show last authors
1 Currently, at P05 a generic data format is used to store raw and reconstructed data. Generally, this is a binary format in little endian byte order with different data types (uint16, real32, ...) and a header which describes the dataset (rows and columns, data format). This data can either be imported directly in ImageJ or loaded with our plugins.
2
3 = {{id name="AccessdatawithImageJ-Importrawdata"/}}Import raw data =
4
5 With ImageJ you can either import binary data directly, if you know the header length and format of of your image or you can use our plugins to open the file.
6
7 The header length is not fixed and generally depends on the image dimensions. Open the first line of the dataset (e.g. with the {{code language="none"}}head{{/code}} command in Linux) and count all letters until the carriage return. Add 2 to this number and this is the header length - e.g. {{code language="none"}}PC_2_U_2000_2000_{{/code}} results in a header length of 19.
8
9 |=(((
10 suffix
11 )))|=(((
12 data type
13 )))|=(((
14 header tag
15 )))
16 |(((
17
18 )))|(((
19 8 bit integer
20 )))|(((
21 B
22 )))
23 |(((
24 .img .dar .ref
25 )))|(((
26 16 bit unsigned integer
27 )))|(((
28 U
29 )))
30 |(((
31
32 )))|(((
33 16 bit integer
34 )))|(((
35 I
36 )))
37 |(((
38
39 )))|(((
40 32 bit integer
41 )))|(((
42 L
43 )))
44 |(((
45 .sli .sin .sis
46 )))|(((
47 32 bit float
48 )))|(((
49 F
50 )))
51
52 = {{id name="AccessdatawithImageJ-UsetheImageJplugins"/}}Use the ImageJ plugins =
53
54 In order to read the P05 data with our plugin, you have at least to install the {{code language="none"}}read_dat.class{{/code}}. Simply copy the file into your local ImageJ plugins folder. If you want to be able to open the data with the standard {{code language="none"}}File -> Open...{{/code}} Menu button, you addtionally have to install the ##(% style="color: rgb(0,0,0);" %)HandeExtraFileTypes.jar(%%)##(% style="color: rgb(0,0,0);" %). With this plugin you can also import an image stack as a virtual stack.
55
56 {{view-file att--filename="HandleExtraFileTypes.jar" display="thumbnail" height="250"/}}
57
58 {{view-file att--filename="read_dat.class" display="thumbnail" height="250"/}}