Skip to content

Commit

Permalink
Some cleanup of the sensor parameter code, and added some more parame…
Browse files Browse the repository at this point in the history
…ters
  • Loading branch information
Peter J. Verveer committed Oct 20, 2017
1 parent 0529494 commit ddaec6d
Show file tree
Hide file tree
Showing 9 changed files with 581 additions and 1,076 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
##############################################################################
cmake_minimum_required(VERSION 3.0)

project(libics VERSION 1.6.1)
project(libics VERSION 1.6.2)

# Note: the version number above is not yet used anywhere.
# TODO: rewrite the header file with this version number.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dnl Written by Peter Verveer, Cris Luengo
dnl

dnl Library version number (make sure to also change it in 'libics.h'):
AC_INIT([libics], [1.6.1])
AC_INIT([libics], [1.6.2])
AC_CONFIG_SRCDIR([libics.h])
AC_CONFIG_HEADERS([config.h libics_conf.h])
AC_CONFIG_MACRO_DIR([m4])
Expand Down
97 changes: 65 additions & 32 deletions libics.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
#endif

/* Library versioning is in the form major, minor, patch: */
#define ICSLIB_VERSION "1.6.1" /* also defined in configure.ac */
#define ICSLIB_VERSION "1.6.2" /* also defined in configure.ac */

#if defined(__WIN32__) && !defined(WIN32)
#define WIN32
Expand Down Expand Up @@ -156,33 +156,44 @@ typedef struct {
/* A list of sensor parameters that are also equiped with a state. */
typedef enum {
ICS_SENSOR_FIRST,
ICS_SENSOR_PINHOLE_RADIUS,
ICS_SENSOR_LAMBDA_EXCITATION,
ICS_SENSOR_LAMBDA_EMISSION,
ICS_SENSOR_PHOTON_COUNT,
ICS_SENSOR_MEDIUM_REFRACTIVE_INDEX,
ICS_SENSOR_IMAGING_DIRECTION,
ICS_SENSOR_NUMERICAL_APERTURE,
ICS_SENSOR_OBJECTIVE_QUALITY,
ICS_SENSOR_MEDIUM_REFRACTIVE_INDEX,
ICS_SENSOR_LENS_REFRACTIVE_INDEX,
ICS_SENSOR_PINHOLE_RADIUS,
ICS_SENSOR_ILL_PINHOLE_RADIUS,
ICS_SENSOR_PINHOLE_SPACING,
ICS_SENSOR_EXCITATION_BEAM_FILL,
ICS_SENSOR_LAMBDA_EXCITATION,
ICS_SENSOR_LAMBDA_EMISSION,
ICS_SENSOR_PHOTON_COUNT,
ICS_SENSOR_INTERFACE_PRIMARY,
ICS_SENSOR_INTERFACE_SECONDARY,

ICS_SENSOR_DETECTOR_MAGN,
ICS_SENSOR_DETECTOR_PPU,
ICS_SENSOR_DETECTOR_BASELINE,
ICS_SENSOR_DETECTOR_LINE_AVG_COUNT,

ICS_SENSOR_STED_DEPLETION_MODE,
ICS_SENSOR_STED_LAMBDA,
ICS_SENSOR_STED_SATURATION_FACTOR,
ICS_SENSOR_STED_IMM_FRACTION,
ICS_SENSOR_STED_VPPM,

ICS_SENSOR_SPIM_EXCITATION_TYPE,
ICS_SENSOR_SPIM_FILL_FACTOR,
ICS_SENSOR_SPIM_PLANE_NA,
ICS_SENSOR_SPIM_PLANE_GAUSS_WIDTH,
ICS_SENSOR_SPIM_PLANE_PROP_DIR,
ICS_SENSOR_SPIM_PLANE_CENTER_OFF,
ICS_SENSOR_SPIM_PLANE_FOCUS_OFF,

ICS_SENSOR_SCATTER_MODEL,
ICS_SENSOR_SCATTER_FREE_PATH,
ICS_SENSOR_SCATTER_REL_CONTRIB,
ICS_SENSOR_SCATTER_BLURRING,
ICS_SENSOR_DETECTOR_PPU,
ICS_SENSOR_DETECTOR_BASELINE,
ICS_SENSOR_DETECTOR_LINE_AVG_COUNT,
ICS_SENSOR_SCATTER_BLURRING,
ICS_SENSOR_LAST
} Ics_SensorParameter;

Expand Down Expand Up @@ -242,9 +253,33 @@ typedef struct _ICS {
char model[ICS_STRLEN_OTHER];
/* Number of channels: */
int sensorChannels;
/* Backprojected microns: */
/* Imaging direction: */
char imagingDirection[ICS_MAX_LAMBDA][ICS_STRLEN_TOKEN];
Ics_SensorState imagingDirectionState[ICS_MAX_LAMBDA];
/* Numerical Aperture: */
double numAperture;
Ics_SensorState numApertureState;
/* Objective quality: */
int objectiveQuality[ICS_MAX_LAMBDA];
Ics_SensorState objectiveQualityState[ICS_MAX_LAMBDA];
/* Refractive index of embedding medium: */
double refrInxMedium;
Ics_SensorState refrInxMediumState;
/* Refractive index of design medium: */
double refrInxLensMedium;
Ics_SensorState refrInxLensMediumState;
/* Detection pinhole in microns: */
double pinholeRadius[ICS_MAX_LAMBDA];
Ics_SensorState pinholeRadiusState[ICS_MAX_LAMBDA];
/* Illumination pinhole in microns: */
double illPinholeRadius[ICS_MAX_LAMBDA];
Ics_SensorState illPinholeRadiusState[ICS_MAX_LAMBDA];
/* Nipkow Disk pinhole spacing: */
double pinholeSpacing;
Ics_SensorState pinholeSpacingState;
/* Excitation beam fill factor: */
double excitationBeamFill[ICS_MAX_LAMBDA];
Ics_SensorState excitationBeamFillState[ICS_MAX_LAMBDA];
/* Excitation wavelength in nanometers: */
double lambdaEx[ICS_MAX_LAMBDA];
Ics_SensorState lambdaExState[ICS_MAX_LAMBDA];
Expand All @@ -254,18 +289,24 @@ typedef struct _ICS {
/* Number of excitation photons: */
int exPhotonCnt[ICS_MAX_LAMBDA];
Ics_SensorState exPhotonCntState[ICS_MAX_LAMBDA];
/* Refractive index of embedding medium: */
double refrInxMedium;
Ics_SensorState refrInxMediumState;
/* Numerical Aperture: */
double numAperture;
Ics_SensorState numApertureState;
/* Refractive index of design medium: */
double refrInxLensMedium;
Ics_SensorState refrInxLensMediumState;
/* Nipkow Disk pinhole spacing: */
double pinholeSpacing;
Ics_SensorState pinholeSpacingState;
/* Emission wavelength in nm: */
double interfacePrimary;
Ics_SensorState interfacePrimaryState;
/* Emission wavelength in nm: */
double interfaceSecondary;
Ics_SensorState interfaceSecondaryState;
/* Excitation beam fill factor: */
double detectorMagn[ICS_MAX_LAMBDA];
Ics_SensorState detectorMagnState[ICS_MAX_LAMBDA];
/* Detector photons per unit: */
double detectorPPU[ICS_MAX_LAMBDA];
Ics_SensorState detectorPPUState[ICS_MAX_LAMBDA];
/* Detector Baseline: */
double detectorBaseline[ICS_MAX_LAMBDA];
Ics_SensorState detectorBaselineState[ICS_MAX_LAMBDA];
/* Averaging line count */
double detectorLineAvgCnt[ICS_MAX_LAMBDA];
Ics_SensorState detectorLineAvgCntState[ICS_MAX_LAMBDA];
/* STED depletion mode: */
char stedDepletionMode[ICS_MAX_LAMBDA][ICS_STRLEN_TOKEN];
Ics_SensorState stedDepletionModeState[ICS_MAX_LAMBDA];
Expand Down Expand Up @@ -314,20 +355,12 @@ typedef struct _ICS {
/* Scatter blurring: */
double scatterBlurring[ICS_MAX_LAMBDA];
Ics_SensorState scatterBlurringState[ICS_MAX_LAMBDA];
/* Detector photons per unit: */
double detectorPPU[ICS_MAX_LAMBDA];
Ics_SensorState detectorPPUState[ICS_MAX_LAMBDA];
/* Detector Baseline: */
double detectorBaseline[ICS_MAX_LAMBDA];
Ics_SensorState detectorBaselineState[ICS_MAX_LAMBDA];
/* Averaging line count */
double detectorLineAvgCnt[ICS_MAX_LAMBDA];
Ics_SensorState detectorLineAvgCntState[ICS_MAX_LAMBDA];

/* SCIL_Image compatibility parameter: */
char scilType[ICS_STRLEN_TOKEN];
} ICS;


/* The error codes. */
typedef enum {
/* No error. */
Expand Down
23 changes: 15 additions & 8 deletions libics_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,24 @@ Ics_Symbol G_SubCatSymbols[] =
Ics_Symbol G_SubSubCatSymbols[] =
{
{"Channels", ICSTOK_CHANS},
{"ImagingDirection", ICSTOK_IMDIR},
{"NumAperture", ICSTOK_NUMAPER},
{"ObjectiveQuality", ICSTOK_OBJQ},
{"RefrInxMedium", ICSTOK_REFRIME},
{"RefrInxLensMedium", ICSTOK_REFRILM},
{"PinholeRadius", ICSTOK_PINHRAD},
{"IllPinholeRadius", ICSTOK_ILLPINHRAD},
{"PinholeSpacing", ICSTOK_PINHSPA},
{"ExcitationBeamFill", ICSTOK_EXBFILL},
{"LambdaEx", ICSTOK_LAMBDEX},
{"LambdaEm", ICSTOK_LAMBDEM},
{"ExPhotonCnt", ICSTOK_PHOTCNT},
{"RefrInxMedium", ICSTOK_REFRIME},
{"NumAperture", ICSTOK_NUMAPER},
{"RefrInxLensMedium", ICSTOK_REFRILM},
{"PinholeSpacing", ICSTOK_PINHSPA},
{"InterFacePrimary", ICSTOK_IFACE1},
{"InterFaceSecondary", ICSTOK_IFACE2},
{"DetectorMagnif", ICSTOK_DETMAG},
{"DetectorPPU", ICSTOK_DETPPU},
{"DetectorBaseline", ICSTOK_DETBASELINE},
{"DetectorLineAvgCnt", ICSTOK_DETLNAVGCNT},
{"STEDDeplMode", ICSTOK_STEDDEPLMODE},
{"STEDLambda", ICSTOK_STEDLAMBDA},
{"STEDSatFactor", ICSTOK_STEDSATFACTOR},
Expand All @@ -105,10 +115,7 @@ Ics_Symbol G_SubSubCatSymbols[] =
{"ScatterModel", ICSTOK_SCATTERMODEL},
{"ScatterFreePath", ICSTOK_SCATTERFREEPATH},
{"ScatterRelContrib", ICSTOK_SCATTERRELCONTRIB},
{"ScatterBlurring", ICSTOK_SCATTERBLURRING},
{"DetectorPPU", ICSTOK_DETPPU},
{"DetectorBaseline", ICSTOK_DETBASELINE},
{"DetectorLineAvgCnt", ICSTOK_DETLNAVGCNT}
{"ScatterBlurring", ICSTOK_SCATTERBLURRING}
};


Expand Down
21 changes: 14 additions & 7 deletions libics_intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,24 @@ typedef enum {
/* SubsubCategory tokens: */
ICSTOK_FIRSTSUBSUB,
ICSTOK_CHANS,
ICSTOK_IMDIR,
ICSTOK_NUMAPER,
ICSTOK_OBJQ,
ICSTOK_REFRIME,
ICSTOK_REFRILM,
ICSTOK_PINHRAD,
ICSTOK_ILLPINHRAD,
ICSTOK_PINHSPA,
ICSTOK_EXBFILL,
ICSTOK_LAMBDEX,
ICSTOK_LAMBDEM,
ICSTOK_PHOTCNT,
ICSTOK_REFRIME,
ICSTOK_NUMAPER,
ICSTOK_REFRILM,
ICSTOK_PINHSPA,
ICSTOK_IFACE1,
ICSTOK_IFACE2,
ICSTOK_DETMAG,
ICSTOK_DETPPU,
ICSTOK_DETBASELINE,
ICSTOK_DETLNAVGCNT,
ICSTOK_STEDDEPLMODE,
ICSTOK_STEDLAMBDA,
ICSTOK_STEDSATFACTOR,
Expand All @@ -131,9 +141,6 @@ typedef enum {
ICSTOK_SCATTERFREEPATH,
ICSTOK_SCATTERRELCONTRIB,
ICSTOK_SCATTERBLURRING,
ICSTOK_DETPPU,
ICSTOK_DETBASELINE,
ICSTOK_DETLNAVGCNT,
ICSTOK_LASTSUBSUB,

/* Value tokens: */
Expand Down
Loading

0 comments on commit ddaec6d

Please sign in to comment.