diff --git a/documentation/NDPluginFile.html b/documentation/NDPluginFile.html index 2ddaff0..dcf074b 100755 --- a/documentation/NDPluginFile.html +++ b/documentation/NDPluginFile.html @@ -10,7 +10,7 @@

areaDetector Plugin NDPluginFile

- June 19, 2011

+ August 8, 2011

Mark Rivers

@@ -22,20 +22,19 @@
  • Overview
  • JPEG file plugin
  • TIFF file plugin
  • +
  • GraphicsMagick file plugin
  • netCDF file plugin
  • NeXus (HDF) file plugin
  • HDF5 file plugin
  • -
  • GraphicsMagick file plugin
  • -
  • Screen shots
  • Overview

    NDPluginFile is a base class from which actual file plugins are derived. There are - currently file plugins for JPEG, TIFF, netCDF, Nexus (HDF) file formats. The GraphicsMagick - plugin can write a large number of formats, including JPEG, TIFF, PNG, PDF and many - others. + currently file plugins for JPEG, TIFF, netCDF, Nexus, and HD5 file formats. The + GraphicsMagick plugin can write a large number of formats, including JPEG, TIFF, + PNG, PDF and many others.

    NDPluginFile inherits from NDPluginDriver. The @@ -78,6 +77,41 @@ asynNDArrayDriver, e.g. NDFilePath, NDFileName, etc. Thus, the same interface that is used for saving files directly in a driver is used for this plugin.

    +

    + The base class will delete the "original" file that the driver created for that + array if the following are all true:

    +
      +
    1. The DeleteDriverFile record is "Yes".
    2. +
    3. The file plugin has successfully written a new file.
    4. +
    5. The array contains an attribute called "DriverFileName" that contains the full + file name of the original file. The driver attributes XML file should contain a + line like the following:
      + <Attribute name="DriverFileName" type="PARAM" source="FULL_FILE_NAME" datatype="string" + description="Driver file name"/>
      +
    6. +
    +

    + The file saving plugins normally determine the name of the file from the FileName + and FileNumber records. However, it is possible to have these values come instead + from attributes in the array passed to the callback. The following 3 special attributes + are used:

    +
      +
    1. FilePluginFileName: This attribute contains the file name.
    2. +
    3. FilePluginFileNumber - This attribute contains the file number.
    4. +
    5. FilePluginDestination - If this attribute contains the string "all" or the name + of the asyn port for this plugin (e.g. FileTIFF1) then the plugin will write the + array to a file. If this attribute has any other value then the plugin will ignore + this array, and not write a file.
    6. +
    +

    + Having the file information come from the array allows the driver to control which + plugin saves a particular array. For example, there may be two file writing plugins + active; the first saves the flat field files for a tomography experiment, and the + second saves the normal projections. These plugins each stream data to a separate + file. The driver knows which files are flat fields and which are normal projections, + and adds the appropriate attributes to control which plugin saves each array. This + would not be possible using a single plugin and EPICS PVs to switch the file, because + of the problem of frames being buffered in the plugin queue.

    JPEG file plugin

    @@ -115,6 +149,12 @@ NDFileJPEG.cpp documentation and in the documentation for the constructor for the NDFileJPEG class.

    +
    +

    + NDFileJPEG.adl

    +

    + NDFileJPEG.png

    +

    TIFF file plugin

    @@ -147,6 +187,12 @@ NDFileTIFF.cpp documentation and in the documentation for the constructor for the NDFileTIFF class.

    +
    +

    + NDFileTIFF.adl

    +

    + NDFileTIFF.png

    +

    GraphicsMagick file plugin

    @@ -183,9 +229,9 @@

    No formats support all of these compression types. Many support only one, or have an implicit compression mode and so ignore the CompressType parameter. For example, - the JPEG format supports only the JPEG compression scheme, which is implicit. The - TIFF format supports "None", (ADD DOCUMENTATION ON TIFF COMPRESSION AND - OTHER FORMATS)

    + the JPEG and PNG formats support only their respective implicit compression modes. + I have determined empirically that the TIFF format supports "None", "JPEG", "LZW", + and "ZIP", while the PDF format supports "None", "BZip", "FAX", and "JPEG".

    The NDFileMagick class documentation describes this class in detail. @@ -204,6 +250,12 @@ for the NDFileMagick class.

    +
    +

    + NDFileMagick.adl

    +

    + NDFileMagick.png

    +

    netCDF file plugin

    @@ -371,6 +423,12 @@ variables: here. This plugin is also contained in the areaDetector distribution in the Viewers/ImageJ/EPICS_areaDetector directory.

    +
    +

    + NDFileNetCDF.adl

    +

    + NDFileNetCDF.png

    +

    NeXus (HDF) file plugin

    @@ -494,8 +552,7 @@ variables:

    The NDFileHDF5 plugin is created with the NDFileHDF5Configure command, either from C/C++ or from the EPICS IOC shell.

    -
    -NDFileHDF5Configure (const char *portName, int queueSize, int blockingCallbacks, 
    +  
    NDFileHDF5Configure (const char *portName, int queueSize, int blockingCallbacks, 
                          const char *NDArrayPort, int NDArrayAddr, size_t maxMemory, 
                          int priority, int stackSize)
       
    @@ -521,8 +578,7 @@ NDFileHDF5Configure (const char *portName, int queueSize, int blockingCallbacks,

    The directory structure of the HDF5 files, generated by this plugin:

    -
    -entry                   <-- NX_class=NXentry
    +  
    entry                   <-- NX_class=NXentry
     |
     +--instrument           <-- NX_class=NXinstrument
        |
    @@ -962,18 +1018,11 @@ entry                   <-- NX_class=NXentry
       
       

    The NDFileHDF5 plugin was developed by Ulrik Kofoed Pedersen at Diamond Light Source.

    -

    - Screen shots

    -

    - The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h - and NDPluginFile.h through records in NDPluginBase.template and NDFileNetCDF.template. - This is the MEDM screen that is used to control the saving of images to disk in - netCDF format.

    - NDPluginFileNetCDF.adl

    + NDFileHDF5.adl

    - NDFileNetCDF.png

    + NDFileHDF5.png