Система автоматизированного анализа пространственной структуры изображений. Подсистема линейной сегм...

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование

Скачать Бесплатно!
Для того чтобы скачать эту работу.
1. Пожалуйста введите слова с картинки:

2. И нажмите на эту кнопку.
закрыть



dit *edtHeight;

TLabel *Label1;

TLabel *Label2;

void __fastcall btnCancelClick(TObject *Sender);

private:// User declarations

public:// User declarations

__fastcall TfrmImgSize(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TfrmImgSize *frmImgSize;

//---------------------------------------------------------------------------

#endif

 

П.3.4. Текст модуля lsimgsize.cpp

 

//---------------------------------------------------------------------------

#include

#pragma hdrstop

#include "LineSeg.h"

#include "lsImgSize.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TfrmImgSize *frmImgSize;

//---------------------------------------------------------------------------

__fastcall TfrmImgSize::TfrmImgSize(TComponent* Owner)

: TForm(Owner)

{

}

//---------------------------------------------------------------------------

void __fastcall TfrmImgSize::btnCancelClick(TObject *Sender)

{

Close();

}

//---------------------------------------------------------------------------

 

П.3.5. Текст модуля lsoptions.h

 

//---------------------------------------------------------------------------

#ifndef lsOptionsH

#define lsOptionsH

//---------------------------------------------------------------------------

">#include

">#include

">#include

">#include

">#include

//---------------------------------------------------------------------------

class TfrmOptions : public TForm

{

__published:// IDE-managed Components

TButton *btnOk;

TButton *btnCancel;

TColorDialog *ColorDialog1;

TFontDialog *FontDialog1;

TCheckBox *cbLogs;

TGroupBox *gbColors;

TLabel *Label1;

TLabel *Label2;

TLabel *Label3;

TGroupBox *gbFonts;

TLabel *Label4;

TLabel *Label5;

void __fastcall btnCancelClick(TObject *Sender);

void __fastcall Label1MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y);

void __fastcall Label2MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y);

void __fastcall Label3MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y);

void __fastcall Label4MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y);

void __fastcall Label5MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y);

private:// User declarations

public:// User declarations

__fastcall TfrmOptions(TComponent* Owner);

};

//---------------------------------------------------------------------------

extern PACKAGE TfrmOptions *frmOptions;

//---------------------------------------------------------------------------

#endif

 

П.3.6. Текст модуля lsoptions.cpp

 

//---------------------------------------------------------------------------

#include

#pragma hdrstop

#include "lsOptions.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TfrmOptions *frmOptions;

//---------------------------------------------------------------------------

__fastcall TfrmOptions::TfrmOptions(TComponent* Owner)

: TForm(Owner)

{

}

//---------------------------------------------------------------------------

void __fastcall TfrmOptions::btnCancelClick(TObject *Sender)

{

Close();

}

//---------------------------------------------------------------------------

void __fastcall TfrmOptions::Label1MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

ColorDialog1->Color=Label1->Font->Color;

if(ColorDialog1->Execute())

Label1->Font->Color=ColorDialog1->Color;

}

//---------------------------------------------------------------------------

void __fastcall TfrmOptions::Label2MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

ColorDialog1->Color=Label2->Font->Color;

if(ColorDialog1->Execute())

Label2->Font->Color=ColorDialog1->Color;

}

//---------------------------------------------------------------------------

void __fastcall TfrmOptions::Label3MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

ColorDialog1->Color=Label3->Font->Color;

if(ColorDialog1->Execute())

Label3->Font->Color=ColorDialog1->Color;

}

//---------------------------------------------------------------------------

void __fastcall TfrmOptions::Label4MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

FontDialog1->Font=Label4->Font;

if(FontDialog1->Execute())

Label4->Font=FontDialog1->Font;

}

//---------------------------------------------------------------------------

void __fastcall TfrmOptions::Label5MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

FontDialog1->Font=Label5->Font;

if(FontDialog1->Execute())

Label5->Font=FontDialog1->Font;

}

//---------------------------------------------------------------------------

 

П.3.7. Текст модуля prjlineseg.cpp

 

//---------------------------------------------------------------------------

#include

#pragma hdrstop

//---------------------------------------------------------------------------

USEFORM("LineSeg.cpp", frmLineSeg);

USEFORM("lsImgSize.cpp", frmImgSize);

USEFORM("lsOptions.cpp", frmOptions);

//---------------------------------------------------------------------------

WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)

{

try

{

Application->Initialize();

Application->Title = "Линейная сегментация";

Application->CreateForm(__classid(TfrmLineSeg), &frmLineSeg);

Application->CreateForm(__classid(TfrmImgSize), &frmImgSize);

Application->CreateForm(__classid(TfrmOptions), &frmOptions);

Application->Run();

}

catch (Exception &exception)

{

Application->ShowException(&exception);

}

catch (...)

{

try

{

throw Exception("");

}

catch (Exception &exception)

{

Application->ShowException(&exception);

}

}

return 0;

}

//---------------------------------------------------------------------------

s