/** ** Copyright (c) 2007-2009 Illumina, Inc. ** ** This software is covered by the "Illumina Genome Analyzer Software ** License Agreement" and the "Illumina Source Code License Agreement", ** and certain third party copyright/licenses, and any user of this ** source file is bound by the terms therein (see accompanying files ** Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ** Illumina_Source_Code_License_Agreement.pdf and third party ** copyright/license notices). ** ** This file is part of the Consensus Assessment of Sequence And VAriation ** (CASAVA) software package. ** ** \file ParameterTypes.hh ** ** \brief Data types for analysis plugins. ** ** \author Klaus Maisinger **/ #ifndef CASAVA_COMMON_PARAMETER_TYPES_H_ #define CASAVA_COMMON_PARAMETER_TYPES_H_ extern "C" { // Marshalled from AnalysisInterface\Direct\TileInfo.cs struct TileInfo { int Lane; int Column; int Row; int Location;// Linear, unique, 0-based identifier of the tile. Increments in the direction of the data acquisition. int TileIndex; int Cycle; int RunId;// Token allowing distinguishing between overlapping callbacks from adjacent runs. int IsDeblocked; // 1 for deblock images, 0 otherwise }; // Marshalled from AnalysisInterface\Direct\ImageInfo.cs struct ImageInfo { int Channel; char Base; int Width; int Height; int NumBytes() const { return Width * Height * sizeof(unsigned short); } }; struct TileImageInfo { struct TileInfo TileInfo; struct ImageInfo ImageInfo; }; struct AnalysisParameters { int DetectionType; int FilterType; float ClusterFwhm; float ClusterC; float ClusterGamma; float ClusterDistance; float DetectionThreshold; float PearsonThreshold; float MaxStageOffset; float MaxColourOffset; int numDetectionCycles; int useRemappedIntensityFlag; int useInterpolatedPositionFlag; int minObjectPixels; void SetImageDefaults() { DetectionType = 0; FilterType = 0; // mexican hat ClusterFwhm = 2.1f; ClusterC = 1.0; // nearly a mexican hat ClusterGamma = 2.0; // Gaussian noise ClusterDistance = 2.2f; DetectionThreshold = 4.f; PearsonThreshold = 0.3f; MaxStageOffset = 500.f; MaxColourOffset = 5.f; numDetectionCycles = 2; useRemappedIntensityFlag = 0; useInterpolatedPositionFlag = 1; minObjectPixels = 3; } AnalysisParameters() { SetImageDefaults(); } // Copy Constructor AnalysisParameters(const AnalysisParameters & source) { *this = source; } }; struct RunInfo { int ImageWidth; // Pixels int ImageHeight;// Pixels int NumChannels; int NumTiles;// number of tile positions in a cycle. int NumCycles; const char * RunFolder; const char * TiffPathTemplate; }; // Marshalled from Stargazer\Config\Alignment.cs struct Alignment { float XOffset; float YOffset; float XScale; float YScale; float XYShear; float YXShear; Alignment() : XOffset(0), YOffset(0), XScale(0), YScale(0), XYShear(0), YXShear(0) { } ; }; struct Position { float X; float Y; Position(float xx = 0.0, float yy = 0.0) : X(xx), Y(yy) { } }; struct PixelValue: public Position { float Intensity; float Noise; }; struct ImageRegion { int XMin; int YMin; int XSize; int YSize; }; struct ImageStats { float Minimum; float Maximum; float Average; float StandardDeviation; float AverageBackground; float FractionSaturation; // >= 0., << 0.0001 float DispersionBackground; }; struct ClusterStats { int Num; float FwhmMean; float FwhmMedian; float FwhmStandardDeviation; void operator=(const ClusterStats& cluster_stats) { Num = cluster_stats.Num; FwhmMean = cluster_stats.FwhmMean; FwhmMedian = cluster_stats.FwhmMedian; FwhmStandardDeviation = cluster_stats.FwhmStandardDeviation; } }; struct AlignmentStats: public Alignment { struct ImageRegion Region; float CorrelationMinimum; float CorrelationMaximum; float CorrelationWidth; // > 0., < 2. AlignmentStats() : CorrelationMinimum(0), CorrelationMaximum(0), CorrelationWidth(0) { } ; }; const int SizeAlignmentGrid = 2; const int NumAlignmentRegions = SizeAlignmentGrid * SizeAlignmentGrid; struct TileQCValues { float EstimatedFWHM; // should be between 2. and 8. pixels int OffsetsValidated; // should be 1 struct ImageStats IntensityStats; struct Alignment UsedAlignment; struct AlignmentStats RawAlignment; struct AlignmentStats RegionAlignments[NumAlignmentRegions]; struct ClusterStats Fwhm; int NumClusters; }; } #endif // #ifndef CASAVA_COMMON_PARAMETER_TYPES_H_