From 702c9db090672a965c4060cfd1e183ede7a29d5f Mon Sep 17 00:00:00 2001 From: rivers Date: Tue, 27 Jan 2009 00:07:47 +0000 Subject: [PATCH] Added changes for color support git-svn-id: https://subversion.xor.aps.anl.gov/synApps/areaDetector/trunk@8286 dc6c5ff5-0b8b-c028-a01f-ffb33f00fc8b --- documentation/NDPluginFile.html | 53 ++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/documentation/NDPluginFile.html b/documentation/NDPluginFile.html index d067a1b..9b0528d 100755 --- a/documentation/NDPluginFile.html +++ b/documentation/NDPluginFile.html @@ -7,7 +7,7 @@ a

areaDetector Plugin NDPluginFile

- November 24, 2008

+ January 26, 2009

Mark Rivers

@@ -51,12 +51,16 @@ a between single mode and capture mode, but unlike capture mode it is not limited by available memory in the number of arrays that can be saved. +

+ Note that the colorMode and bayerFormat must not be changed while file capture or + file streaming are in progress because that would change the structure of the data + array.

The NDPluginFile public interface is defined in NDPluginFile.h as follows:

/* Note that the file format enum must agree with the mbbo/mbbi records in the NDFile.template file */
 typedef enum {
-    NDFileFormatNetCDF,
+    NDFileFormatNetCDF
 } NDPluginFileFormat_t;
 
 ...
@@ -155,25 +159,28 @@ public:
     The following is the header contents of a netCDF file produced by this plugin. This
     information was produced with the following command:

-ncdump -h test_A_2.nc
+ncdump -h testB_3.nc
 
-netcdf test_A_2 {
+netcdf testB_3 {
 dimensions:
-	numArrays = 200 ;
-	dim0 = 480 ;
-	dim1 = 640 ;
+        numArrays = UNLIMITED ; // (10 currently)
+        dim0 = 1024 ;
+        dim1 = 1360 ;
+        dim2 = 3 ;
 variables:
-	int uniqueId(numArrays) ;
-	double timeStamp(numArrays) ;
-	byte array_data(numArrays, dim0, dim1) ;
+        int uniqueId(numArrays) ;
+        double timeStamp(numArrays) ;
+        byte array_data(numArrays, dim0, dim1, dim2) ;
 
 // global attributes:
-		:dataType = 0 ;
-		:numArrayDims = 2 ;
-		:dimSize = 640, 480 ;
-		:dimOffset = 0, 0 ;
-		:dimBinning = 1, 1 ;
-		:dimReverse = 0, 0 ;
+                :dataType = 1 ;
+                :numArrayDims = 3 ;
+                :dimSize = 3, 1360, 1024 ;
+                :dimOffset = 0, 0, 0 ;
+                :dimBinning = 1, 1, 1 ;
+                :dimReverse = 0, 0, 0 ;
+                :colorMode = "RGB1" ;
+                :bayerPattern = "RGGB" ;
 }
   

@@ -196,7 +203,10 @@ variables: dimSize is an array[numArrayDims] containing the size of each dimension, with the fastest varying dimension first. dimOffset, dimBinning, and dimReverse are the values of the offset, binning and reverse fields in the NDDimension_t structure for each - dimension. + dimension. colorMode is the color mode of the data. It is a string rather than the + NDColorMode_T value, so that it is easy to understand and independent of changes + to the enum definition. bayerPattern is the Bayer pattern of the data, also as a + string rather than an enum.

IDL file reading function

@@ -204,18 +214,13 @@ variables: There is an IDL function, read_nd_netcdf that can be used to read the netCDF files created by this plugin. This routine is contained in the - CARS IDL detector package. This function is currently limited to reading the - entire file at once, so it may fail for very large files on machines with insufficient - virtual memory. This will be fixed in a future release. + CARS IDL detector package. This function is also contained in the areaDetector + distribution in the Viewers/IDL directory.

Future plans

Additional file formats, such as TIFF and HDF may be supported in the future.

-

- The IDL function described above will be enhanced to allow reading only a subset - of the file at a time. -