Main Page | Data Structures | File List | Data Fields | Globals

zone.c File Reference

contains functions related to the initialization operations of zone boundary, nodes, and zoneprojection More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "zone.h"

Defines

#define PIX_SORT(a, b)   { if ((a)>(b)) PIX_SWAP((a),(b)); }
#define PIX_SWAP(a, b)   { INT32 temp=(a);(a)=(b);(b)=temp; }

Functions

void initZones (FILE *FLAGOUT_FILE, PIX *pixGel, struct GelInfo *GelInfo, int *ZoneID, int Verbose)
 Project to 1D (sum all pixel with same X) to establish StartPreData, StopPreData, StopData.
void setNodePositions (PIX *pixGel, struct GelInfo *GelInfo, int *ZoneID, float *NodePosition, int Verbose)
 set node position to be the center of data mass location of each zone
void projectZones (PIX *pixGel, INT32 **ZoneProjection, struct GelInfo *GelInfo, int *ZoneID)
 integrate data horizontally in each zone, effectively getting a 1D profile for each zone
void filterZoneProjection (INT32 **ZoneProjection, struct GelInfo *GelInfo, float *Spacing)
 aggressive filtering of the zone projection using the generic spacing.


Detailed Description

contains functions related to the initialization operations of zone boundary, nodes, and zoneprojection


Function Documentation

void filterZoneProjection INT32 **  ZoneProjection,
struct GelInfo GelInfo,
float *  Spacing
 

aggressive filtering of the zone projection using the generic spacing.

Each value is subtracted with values a half a lane spacing from it to enhance the periodic peak pattern then, each value is median filter with the neighbour lanes or neighour markers

Parameters:
ZoneProjection 2D array holding 1D traces of each zone, will be replaced by filtered version
GelInfo holds various gel parameters
Spacing the dominant spacing in all zones, used to identify marker dominant zones

void initZones FILE *  FLAGOUT_FILE,
PIX *  pixGel,
struct GelInfo GelInfo,
int *  ZoneID,
int  Verbose
 

Project to 1D (sum all pixel with same X) to establish StartPreData, StopPreData, StopData.

The zoneID of pixels before StartPreData and StopData is set to be -1 divide data from StartPreData to StopData evenly into zones The StopPreData is forced to be a zone boundary find "node" of each zone - center of mass of data values in each zone

Parameters:
FLAGOUT_FILE writable file handle to data log file
pixGel pix of gel image
GelInfo holds various gel parameters
ZoneID array to note the zone number for each column
Verbose turn on text output to screen

void projectZones PIX *  pixGel,
INT32 **  ZoneProjection,
struct GelInfo GelInfo,
int *  ZoneID
 

integrate data horizontally in each zone, effectively getting a 1D profile for each zone

Parameters:
pixGel pix representation of gel image
ZoneProjection 2d array to hold 1D y-projections in each of the zone
GelInfo holds various gel parameters
ZoneID array noting the zone number for each column

void setNodePositions PIX *  pixGel,
struct GelInfo GelInfo,
int *  ZoneID,
float *  NodePosition,
int  Verbose
 

set node position to be the center of data mass location of each zone

Parameters:
pixGel 8bit pix representation of the gel image
GelInfo holds various gel parameters
ZoneID array to note the zone number for each column
NodePosition to hold x position of nodes in each zone
Verbose turns on text output to screen


Generated on Fri Apr 20 16:43:08 2007 for LaneRuler by  doxygen 1.3.9.1