Class |
Description |
TTransferFunctions = class ds:TDataSet; histval:array[0..3]of array of cardinal;//values from the histogram xpos,pxpos:integer; scale:array[0..3]of single; iw,ih:integer; //dimensions of the target image mdx,mdy:integer; //mouse down coordinates TransFunc:array[0..3] of array of TTransferNode;//nodes of the transfer function TransFuncPoints:array[0..3]of integer;//number of nodes in the transfer function SquareSize:integer; //size of the rectangle drawn around a node CURRENT:integer; constructor Create(d:TDataSet; w,h:integer); destructor Destroy;override; procedure Histogram(w:integer); procedure DrawHistogram(c:TCanvas; w,h:integer; zoom:integer); procedure DrawSlider(c:TCanvas; w,h:integer); procedure MoveSlider(x:integer); procedure DrawTransferFunction(c:TCanvas; w,h:integer; zoom:integer); procedure AddTransferPoint(x,y,w,h:integer; c:TColor); procedure MouseDown(x,y:integer); procedure MouseUp(x,y:integer); function PointInSquare(px,py,sx,sy:integer):boolean; procedure SaveToTexture(n:integer); function GetTransfer(p:single;n:integer):TVector4f; function ColorToRGB(c:TColor):TVector3f; function GetInfo(x,y:integer; var n:TTransferNode):integer; procedure SetInfo(n:TTransferNode; i:integer); procedure RemoveNode(i:integer); end; |