struct Rect { short top; short left; short bottom; short right; }; typedef SInt16 sbool typedef SInt8 data_id_in_header_t[10]; typedef char comment_t[128]; typedef char version_t[4]; typedef long ElOpPacketLengthType; // this length data is added to the end of data packets in files struct ElOpHeader { // common header structure of data packet in data file SInt32 recsize; // holds data size of this record // (header + data + last packet length) // newly added since Jan. '94 // it is always intel order SInt16 headersize; // holds header size of this record // includes sizeof(recsize) and sizeof(headersize) // it is always intel order version_t dataversion; /*======== Version numbering system. (since Jan., '94) ================= consisting of 4 bytes; indicated as n.n.n.n 1st bit of the 1st byte: 0: intel order, 1: motorolar order 7 bits of 1st byte: major version depends on common header format which is determined factors described in class ElOp 2nd byte: submajor version; determined in class ElOpTemporalRec and ElOpTemporalRecCI (described in this header). 3rd and 4th byte: minor version determined in successor classes data type and version can be known to see members dataversion[] and mode. history: - Before this system... versions are assigned as character string like "1.0", "2.0"... - 3.0 since Jan. '94 ========================================================================*/ UInt16 mode; UInt32 exp_time; // seconds since 1904/1/1 for Mac data and 1970/1/1 for DOS data SInt16 comment_len; // currently always COMMENT_LEN data_id_in_header_t data_id; comment_t comment; }; struct ElOpTemporalRecHeader : public ElOpHeader { double duration; double disp_starttime; double disp_stoptime; }; struct ElOpTemporalRecCIHeader : public ElOpTemporalRecHeader { unsigned short interval_unit; long sampling_num; double sampling_rate; // [Hz] // This record is not used inside the program currently. double interval_usec; // [usec] ; added since 6/14/91 /* This record is not used inside the program currently. It is recorded in files for general purpose since, interval_unit is machine dependent. */ }; struct BioImagePvcamParam { PvcamT ccdinfo; SInt16 reserve2; SInt32 shutterOpenDelay; SInt32 shutterCloseDelay; SInt16 dummy; sbool syncADstart; // A/D is started by OUTB1 trigger in fast read mode sbool checkExposeTTL; sbool exttrigNI; }; // 108 bytes struct BioImageNu200Param { // data structure for file format SInt16 gain; SInt16 shiftCount; // 0 means full frame transfer sbool exttrigNI; }; // 6 bytes struct BioImagePrincetonParam { SInt16 reserve2; sbool FastADC; SInt16 Controller; SInt32 ControllerRev; SInt16 CCDChip; SInt16 ScanMode; SInt16 polarity; SInt16 ShttrType; sbool ShttrPreOpen; sbool ShttrDisable; sbool DisShttrState; SInt16 TimingMode; SInt16 Cleans; SInt16 LnSzForOneClean; sbool ContClean; SInt32 dcmpMinBlk; SInt32 dcmpNumMinBlk; SInt16 Cooling; SInt16 SetTemperature; sbool syncADstart; // A/D is started by READY trigger from MicroMax }; // 46 bytes struct BioImageOldPrincetonParam { SInt16 Controller; SInt16 ControllerRev; SInt16 CCDChip; SInt16 SetTemperature; SInt16 ActTemperature; SInt16 ADCnvtr; SInt16 ADCRate; SInt16 ADCBitAdjust; SInt16 GainCtrl; }; struct BioImageScionParam { SInt16 fgType; Float32 brightness; Float32 contrast; }; // 10 bytes struct BioImageSpotParam { UInt16 factorR; UInt16 factorG; UInt16 factorB; UInt16 spotGain; UInt16 spotMode; }; struct BioImageSensicamParam { }; // --------------------------------------------- // Hamamatsu Photonics ORCA series camera struct BioImageOrcaParam { UInt16 highScanGain; UInt16 highScanOffset; sbool isOrca2; sbool isSlowScan; UInt16 slowScanGain; sbool syncADstart; }; // --------------------------------------------- // Hamamatsu Photonics DCAM struct BioImageDcamParam { sbool isExternalTrig; // not used now UInt16 gain; UInt16 brightness; UInt16 exposeShutterDelayMsec; UInt16 exposeShutterDurPercent; }; // --------------------------------------------- // camera types embeded in file header and for online modules #define DUMMYCAM 0 // dummy #define TI_PVCAM 1 #define NU200 2 #define VIDEO_DIGITIZER 3 // #define LG3 4 //#define DELTARON 5 #define PRINCETON 6 #define SENSICAM 7 #define OLD_PRINCETON 8 #define SCION 9 #define SPOT 10 #define TI_ORCA 11 #define TI_DCAM 12 struct BioImageHardwareParam { UInt32 cameraType; union { SInt8 dummy[108]; // 108 bytes BioImagePvcamParam pvcam; // 108 bytes BioImageNu200Param nu200; // 6 bytes BioImagePrincetonParam princeton; // 46 bytes BioImageOldPrincetonParam oldPrinceton; // 18 bytes //BioImageLG3Param lg3; BioImageScionParam scion; // 10 bytes BioImageSensicamParam sensicam; // 0 byte BioImageSpotParam spot; // 10 bytes BioImageOrcaParam orca; // 10 bytes BioImageDcamParam dcam; // 6 bytes } camerainf; }; #define BIOIMAGE_ROI_MAX_IN_HEADER 20 // for timecourse roi (not subregions) stored in the data header struct SeqImageParam { SInt16 tmroiN; Rect tmroi[BIOIMAGE_ROI_MAX_IN_HEADER]; Rect initialRaw1PlotRect; Rect initialRaw2PlotRect; Rect initialRatioPlotRect; RGBColor roiColVariable[BIOIMAGE_ROI_MAX_IN_HEADER]; Float32 dispFromSec, dispToSec; Float32 raw1dispBottom, raw1dispTop, raw2dispBottom, raw2dispTop, ratioDispBottom, ratioDispTop; Rect initialFilePlotRect; SInt16 switches; // bit 0: isEachFrameTmroiInFile // bit 1: empty since 10/31/01 (used for isThresholdedRoiMean) // bit 2: isMaskedRoiMean // bit 3: isTiledPlots // bit 8-15: lapseTimeUnit Float32 plotXofsMsec; SeqImageParam(); }; struct CalciumParam { UInt16 option; // see below enum union Param { Float32 f[5]; struct { Float32 Kd, Rmin, Rmax, beta, visc; } fura; struct { Float32 Kapp, FmaxFmin; } fluo; struct { Float32 Kapp, FmaxFmin; } furaptra; struct { UInt16 n; SInt16 lowest; } f0nxn; } prm; }; // bit switches of CalciumParam.option enum { bFura = 0x0001, // bit 0: calc calcium switch; method is fura-2 bRatioF1F2 = 0x0002, // bit 1: when on, ratio is F1/F2, else F2/F1 bRatioFF0 = 0x0004, // bit 2: when on, ratio is F/F0 instead of F1/F2 or F2/F1: this overcomes bit 0 setting bRatioFminusF0 = 0x0008, // bit 3: when on, ratio is F - F0: this overcomes bit 0 and 2 setting bRatioDeltaFF0 = 0x0020, // bit 5: when on, F/F0 is displayed as dF/F0; bRatioFF0 must be turned on bRatioMinusDisp = 0x0040, bRatioPercentDisp = 0x0080, bCutoffDimmPixel = 0x0100, bLog = 0x0200, // effective only when Ca conc mode (bCaMethodMask is true) bFluo = 0x1000, bFuraptra = 0x2000, bNotAutoMask = 0x4000, // auto mask under threshold value in case for denominator bF0mask = 0x0c10, bF0External = 0x0010, // bit 4: when on, F0 is taken from external file instead of F0 (first frame) bF0prevFr = 0x0400, bF0smooth = 0x0800, bF0lowest = 0x0410, bCaMethodMask = bFura | bFluo | bFuraptra }; struct HighImageParam { SInt16 baselineMode; // enum HI_BASE_T UInt16 autoflMode; // enum HI_AUTOFL_T Float32 autoflFactor; SInt32 base1stLastSqFr0; SInt32 base1stLastSqFr1; UInt16 flags; UInt16 resourceID; SInt16 reserve[2]; }; // 24 bytes union IorF { SInt32 i; Float32 f; }; struct BioImageParam { SInt16 dtype; // ImageBaseDtypeT Fura2ExpParam fura2prm; sbool isBackUseFixed; Float32 backFixedF1; Float32 backFixedF2; Rect boundary; SInt16 binx, biny; SInt32 roiNum; Rect roi[MULTIROIBIN_MAX]; SInt16 lutID; // color look up table resource id SInt32 frameN; SInt32 durationUnit; // unit depends on camera type SInt32 intervalUnit; SInt16 magnification; SInt16 yRatio; //IorF dispMin, dispMax; IorF dispMin3orRatioF2, dispMax3orRatioF2; Rect initialPos; UInt16 contSmooth; // bit 0: isContinuous, bit 1-14: smooth sw SInt16 dispMode; UInt16 isLutInverted; // bit 0: f1, bit1: f2, bit2: f3, bit3: ratio, bit4: ratioF2 // IMPORTANT: as of 9/19/02; bit 15 (top bit) indicates disp range parameters are float (new rule) //IorF lutMin, lutMax; IorF lutMin3orRatioF2, lutMax3orRatioF2; SInt32 curFrame; Float32 dispMinF, dispMaxF; // for ratio Float32 lutMinF, lutMaxF; // for ratio UInt16 bitParams; Point userRectOfs; SeqImageParam seqparam; CalciumParam caparam; BioImageHardwareParam hardinf; SInt16 gapCorrectX, gapCorrectY; UInt16 exp_time_subsec; // fraction of second for exp_time Float32 autoMaskThresMinus10; UInt16 reserve[1]; UInt16 averageDispN; SInt16 deformCorrectDx, deformCorrectDy; // only used when nframe is 1 UInt8 scaleParams[6]; // for F2 images SInt16 lutID2; IorF dispMin2, dispMax2; IorF lutMin2, lutMax2; SInt16 lutIDratio; data_id_in_header_t linkedAdDataId; SInt32 FbaseFr; SInt16 FbaseAvFrN; HighImageParam highImageParam; SInt16 lutID3orRatioF2; IorF dispMin; //IorF dispMin3orRatioF2; Float32 pixelSizeUm; Float32 scaleSizeUm; IorF dispMax, lutMin, lutMax; //IorF dispMax3orRatioF2, lutMin3orRatioF2, lutMax3orRatioF2; UInt16 deformCorrectAngle; // only used when frameN is 1 }; struct BioImageHeader : public ElOpHeader { BioImageParam bioImage; };