TreeViewClasses.h
上传用户:szb0815
上传日期:2007-06-13
资源大小:338k
文件大小:6k
- //---------------------------------------------------------------------------
- #ifndef TreeViewClassesH
- #define TreeViewClassesH
- //---------------------------------------------------------------------------
- class TGeneData : public TObject
- {
- private:
- double *fData;
- bool *fMask;
- public:
- __fastcall TGeneData();
- __fastcall TGeneData(int Columns);
- __fastcall ~TGeneData();
- AnsiString ID;
- AnsiString Name;
- AnsiString Note;
- int Columns;
- __property double * Data = {read=fData};
- __property bool * Mask = {read=fMask};
- };
- class TGeneTreeNode : public TObject
- {
- public:
- __fastcall TGeneTreeNode();
- __fastcall ~TGeneTreeNode();
- bool IsNode;
- TGeneTreeNode *Parent;
- TGeneTreeNode *Child1;
- TGeneTreeNode *Child2;
- double Corr;
- double Resist, Weight;
- double MinCoor, MaxCoor;
- TColor Color;
- TGeneData *Data;
- double XPoint, YPoint;
- int Elements;
- void __fastcall SetCoor();
- void __fastcall SetResist();
- void __fastcall SetWeight(double Current);
- void __fastcall SetParent(TGeneTreeNode *pParent);
- void __fastcall SetData();
- void __fastcall SaveData(TStringList *FileList, double LowCut, double HighCut,
- int MinElements, bool SaveChildren, bool SaveList);
- void __fastcall GetList(TStringList *List);
- void __fastcall Draw(TImage *Image, double Scale);
- void __fastcall DrawPS(TStringList *PSFile, int ScaleX, int ScaleY, int StartYCoor);
- TGeneTreeNode* __fastcall Dist(int X, int Y, double *Dist);
- TGeneTreeNode* __fastcall Include(int X, int Y, bool *Includes);
- void __fastcall Limits(double *mincoor, double *maxcoor);
- void __fastcall HotSpots(TWinControl *Control);
- void __fastcall OnClick(System::TObject* Sender, TMouseButton Button,
- Classes::TShiftState Shift, int X, int Y);
- void __fastcall WriteList(double Cutoff);
- void __fastcall GetIDs(TStringList *IDList);
- void __fastcall AddNote(TStrings *NewNote);
- TGeneTreeNode* __fastcall FindNode(AnsiString NodeName);
- //void __fastcall Active(TObject *pNode);
- double XCoor, YCoor;
-
- void __fastcall MakeBarcode(TImage *Image,int ScaleX, int ScaleY,
- double Contrast, TColor PositiveColor, TColor ZeroColor, TColor NegativeColor,
- TColor MissingColor);
- };
- class TArrayData : public TObject
- {
- private:
- //double *fData;
- //bool *fMask;
- public:
- __fastcall TArrayData();
- //__fastcall TArrayData(int Columns);
- __fastcall ~TArrayData();
- AnsiString ID;
- AnsiString Name;
- //__property double * Data = {read=fData};
- //__property bool * Mask = {read=fMask};
- };
- class TArrayTreeNode : public TObject
- {
- public:
- __fastcall TArrayTreeNode();
- __fastcall ~TArrayTreeNode();
- bool IsNode;
- TArrayTreeNode *Parent;
- TArrayTreeNode *Child1;
- TArrayTreeNode *Child2;
- double Corr;
- double MinCoor, MaxCoor;
- TColor Color;
- TArrayData *Data;
- double XPoint, YPoint;
- void __fastcall SetCoor();
- void __fastcall SetParent(TArrayTreeNode *pParent);
- void __fastcall Draw(TImage *Image, double Scale);
- void __fastcall DrawPS(TStringList *PSFile, int ScaleX, int ScaleY, int XOrigin, int YOrigin);
- TArrayTreeNode* __fastcall Dist(int X, int Y, double *Dist);
- TArrayTreeNode* __fastcall Include(int X, int Y, bool *Includes);
- void __fastcall Limits(double *mincoor, double *maxcoor);
- void __fastcall HotSpots(TWinControl *Control);
- void __fastcall OnClick(System::TObject* Sender, TMouseButton Button,
- Classes::TShiftState Shift, int X, int Y);
- //void __fastcall Active(TObject *pNode);
- double XCoor, YCoor;
- double Weight;
- };
- class TGeneCluster : public TObject
- {
- private:
- TGeneTreeNode *FBestNode;
- protected:
- void __fastcall SetBestNode(TGeneTreeNode *NewBestNode)
- {
- FBestNode = NewBestNode;
- FBestNode->Limits(&MinCoor,&MaxCoor);
- }
- public:
- __fastcall TGeneCluster();
- __fastcall ~TGeneCluster();
- bool Loaded;
- AnsiString *DataFile;
- AnsiString *TreeFile;
- TStringList *Arrays;
- TStringList *Genes;
- TStringList *Nodes;
- TStringList *ArrayNodes;
- TStringList *GeneNames;
- TGeneTreeNode *TopNode;
- TArrayTreeNode *TopArrayNode;
- //TGeneTreeNode *ActiveNode;
- __property TGeneTreeNode *BestNode = {read=FBestNode,write=SetBestNode};
- Graphics::TBitmap *Bitmap;
- int Rows, Columns;
- AnsiString UniqueID;
- double BestDist;
- double MinCoor, MaxCoor;
- long * ListIndex;
- //void __fastcall Active(TObject *pNode);
- double __fastcall Load(AnsiString DataFile);
- void __fastcall Dist(int X, int Y);
- void __fastcall Include(int X, int Y);
- void __fastcall MakeThumbnail(TImage *Image, double ScaleX,
- double ScaleY, double Contrast, double MaskVal,
- TColor PositiveColor, TColor ZeroColor, TColor NegativeColor,
- TColor MissingColor);
- };
- #endif