Scientist's Digital Notebook - Configuration

Template configuration

Document updated for version: 1.2.18

Introduction

The Scientists Digital Notebook is designed to be very flexible and easily adjustable to personal needs of scientist. The program reads a configuration XML file and creates all visual controls for inputting the data. The configuration file also dictates how the data will be saved in data XML files and also how it will be uploaded to the database.

CIX and BIX files

The configuration and data XML files are differentiated by their extensions. For configuration files it is ".cix" and for data files it is ".bix". The data ".bix" files are red and generated by the application. The configuration files ".cix" should be modified by the scientist to tailor the program for his particular needs. Upon first load DN does not load any configuration file but later saves the location of the last used configuration file.

Configure CIX files

Configuration file ".cix" is a valid XML file with different tags interpreted by the Digital Notebook application. There are several tags available for configuring the data parameters, data base as well as ftp servers. The main tags are: <widget>, <config>. The usage of these parameters can be seen in the demo configuration file "all_tags.cix".

Widget types

There are many widget types available in the program: lineedit, combobox, textedit, spinbox, doublespinbox, datetimeedit, dateedit, timeedit, files, graphics. All of them are described below providing usage examples.

lineedit – is a type for free text input of only one line.

  <widget>
    <label>File Name</label>
<description>Name of the file</description>
<value></value>
<tag_name>FileName</tag_name>
<type formelement="lineedit">
<type_conf>
<maxlength>2000</maxlength>
</type_conf>
</type> </widget>

combobox – is a most useful type that provides a drop down box with a choice of possible values.

  <widget>
    <label>Species</label>
    <type formelement="combobox">
      <type_conf>
        <item>cat</item>
    	  <item>mouse</item>
	  <item>squirel</item>					
      </type_conf>
    </type>
    <value>cat</value>
    <tag_name>species</tag_name>
  </widget>
 

textedit – provides a free text input area

  <widget>
    <label>Notes</label>
    <type formelement="textedit"></type>
    <value>Initial text</value>
    <tag_name>notes</tag_name>
  </widget>
 

spinbox – allows controlled numerical input for integer values, it’s possible to set minimum and maximum values, step and even prefix and suffix strings.

  <widget>
    <label>Animal ID</label>
    <type formelement="spinbox">
      <type_conf>
        <minvalue>10</minvalue>
        <maxvalue>100000</maxvalue>        
        <singlestep>2</singlestep> 
        <prefix>bio_lab </prefix>
        <suffix> num</suffix>                  
      </type_conf>
    </type>
    <value>0</value>
    <tag_name>animal_id</tag_name>
  </widget>
 

doublespinbox – it’s the same as spinbox except for real values.

  <widget>
    <label>amount of GFAP</label>
    <type formelement="doublespinbox">
      <type_conf>
        <minvalue>0.4</minvalue>
        <maxvalue>2.3</maxvalue>        
        <singlestep>0.01</singlestep> 
        <decimals>2</decimals>         
        <prefix>gfap </prefix> 
        <suffix> mg</suffix>                  
      </type_conf>
    </type>
    <value>0</value>
    <tag_name>amount_gfap</tag_name>
  </widget>	
 

datetimeedit – date/time input box, initialized with current date/time

  <widget>
<label>Experiment date/time</label>
<description>date and time</description>
<type formelement="datetimeedit"></type>
<tag_name>experiment_date_time</tag_name>
<value autofill="date_time"></value>
</widget>

dateedit – date input box, initialized with current date

  <widget>
<label>Sample preparation date</label>
<description>Date</description>
<type formelement="dateedit"></type>
<tag_name>sample_preparation_date</tag_name>
</widget>

timeedit – time input box, initialized with current time

  <widget>
<label>Imaging time</label>
<description>time</description>
<type formelement="timeedit"></type>
<tag_name>imaging_time</tag_name>
</widget>

files – allows additional files to be referenced from BIX file and uploaded into the database. e.g. This can be useful to submit microtubule tracks along with the image and it's metadata.

  <widget>
<tag_name>microtubute_track_file</tag_name>
<label>Microtubute tracks</label>
<description>Additional files to be uploaded to the server</description>
<value></value>
<type formelement="files">
<type_conf>
<maxfiles>0</maxfiles>
<filters>Images (*.png *.tif *.jpg);;Text files (*.txt);;XML files (*.xml)</filters>
</type_conf>
</type>
</widget>

graphics – allows acquire Graphical Annotations and store their XML into the tag value.

  <widget>
<tag_name>graphics_annotation</tag_name>
<label>Graphical Annotation</label>
<description>Tool for graphic annotation</description>
<value autoclear="true"> <![CDATA[<!DOCTYPE bfi><bfi environment = "all_shapes"/>]]> </value>
<type formelement="graphics" />
</widget>

Configuring fields

Any tag has a set of configurations that may allow it to be hidden, readonly and mandatory. Read only tags can only be loaded by autofill or by previously loaded value. Hidden tags are read only tags that do not show up in the UI. Mandatory tags are tags that must exist and are always saved in batch save mode, i.e. they are always checked. Currently mandatory is only used for file name tag. These options are specified inside type_conf like this:

<type_conf>
   <accessibility readonly="true" mandatory="true" hidden="true" />
</type_conf>

The value of the tag can also be controlled. By default every value entered for or loaded from previously loaded image is remained and can be manually cleared or globally by pressing "clear all" button. If this default functionality is not good for a particular tag it can be overwritten by setting autoclear to true. Also the value of the tag can be loaded automatically from image embedded meta-data or parsed file name or some other options defined in DN, such as: database user name. In order to load a tag value automatically use the option autofill. Autofill values are described in more detail later.

<value autoclear="true" autofill="pixel_resolution_t" />

Autofill fields

For some image types DN parses meta-data embedded into the image file. Depending on the type it can extract date, time, pixel resolution, etc. It's possible to automatically load particular tags from embedded meta-data if they are not specified in BIX file. It's done by setting correct autofill for value tag: <value autofill="date_time"></value>. After extracting values from the file the file name is parsed, is requested by user, and it's values overwrite values defined by the embedded meta-data. User may also define custom fields that come from the file name.

The available autofill values are the following [v1.2.18]:

  1. heap - all metadata collected from the image in textual format
  2. pixel_resolution_x - real value of pixel's resolution in x axis in microns (also exists for y and z)
  3. pixel_resolution_unit_x - string of resolution units, currently "microns" (also exists for y and z)
  4. date_time - date and time of imaging the first plane of the image, it's properly fed into either datetime, date or time widgets
  5. file_name - Image's file name excluding the path (v1.1.1)
  6. file_path - Image's file path excluding the name (v1.1.1)
  7. user_name - Database user name (v1.1.1)
  8. user_name_ftp - FTP user name (v1.1.1)
  9. user_path - FTP user path (v1.1.1)
  10. host_name - database host name (v1.1.1)
  11. year,month,day,hour,minute,second,ap - These tags can be filled while parsing the file name (v1.2.18)
  12. channel_N_name - Where N is the number of the channel (v1.2.18)
  13. display_channel_red - Preferred channel to display in red, -1 is an empty channel (v1.2.18)
  14. display_channel_blue - Preferred channel to display in blue, -1 is an empty channel (v1.2.18)
  15. display_channel_green - Preferred channel to display in green, -1 is an empty channel (v1.2.18)
  16. format - The name of the format of the image (v1.2.18)
  17. magnification - The lens magnification, e.g. 40X (v1.2.18)
  18. image_num_c, image_num_p, image_num_t, image_num_x, image_num_y, image_num_z, image_pixel_depth - Image parameters c- channel, p - pages, t - time stamps, x - width, y - height, z - depth slices, depth - number of bits per channel (v1.2.18)
  19. magnification - The lens magnification, e.g. 40X (v1.2.18)

And many other tags parsed by the libbioimage...