Structural deformable models
Macros | Functions | Variables
deform.cpp File Reference
#include "deform.h"
#include <fx3d.h>
#include <fxkeys.h>
#include <string.h>
#include <iostream>
#include <time.h>
#include "glutils.h"
Include dependency graph for deform.cpp:

Go to the source code of this file.

Macros

#define STATUSTXTLEN   2048
 

Functions

 FXDEFMAP (ImageWindow) ImageWindowMap[]
 
bool setTitle (const std::string &title)
 
bool setStatusText (const std::string &stext)
 
int main (int argc, char *argv[])
 
int gethostname (char *, int)
 

Variables

const FXuint TIMER_INTERVAL = 50
 
const FXString patterns
 

Macro Definition Documentation

#define STATUSTXTLEN   2048

Definition at line 21 of file deform.cpp.

Function Documentation

FXDEFMAP ( ImageWindow  )
int gethostname ( char *  ,
int   
)

Definition at line 505 of file deform.cpp.

506 {
507  return 0;
508 }
int main ( int  argc,
char *  argv[] 
)

Definition at line 479 of file deform.cpp.

References ImageWindow::cmdline().

479  {
480 //#define REDIRECT_STDOUT
481 #ifdef REDIRECT_STDOUT
482  ofstream logfile("output.log");
483  cout.rdbuf(logfile.rdbuf());
484  cerr.rdbuf(logfile.rdbuf());
485 #endif
486  // Make application
487  FXApp application("Deformable Model Segmentation","FoxText");
488 
489  // Start app
490  application.init(argc,argv);
491 
492  // Make window
493  ImageWindow *iw = new ImageWindow(&application);
494  iw->cmdline(argc,argv);
495 
496  glutInit(&argc,argv);
497 
498  // Create the application's windows
499  application.create();
500 
501  // Run the application
502  return application.run();
503 }
FXbool cmdline(int argc, char **argv)
Definition: browser.cpp:671
bool setStatusText ( const std::string &  stext)

Definition at line 77 of file deform.cpp.

References ImageWindow::create(), ImageWindow::drawScene(), ImageWindow::ImageWindow(), NULL, ImageWindow::onCanvasRepaint(), ImageWindow::onCmdOpenGL(), ImageWindow::onConfigure(), ImageWindow::onExpose(), setStatusText(), ImageWindow::setStatusText(), TIMER_INTERVAL, and ImageWindow::~ImageWindow().

Referenced by ImageWindow::onToggleSensorDlg(), ImageWindow::selectSensor(), and setStatusText().

77  {
78  ImageWindow *mw = dynamic_cast<ImageWindow*>
79  (FXApp::instance()->getRootWindow());
80  if(mw) {
81  mw->setStatusText(stext.c_str());
82  return true;
83  } else return false;
84 }
void setStatusText(const char *msg, bool append=false)
Definition: browser.cpp:663
bool setTitle ( const std::string &  title)

Definition at line 68 of file deform.cpp.

68  {
69  ImageWindow *mw = dynamic_cast<ImageWindow*>
70  (FXApp::instance()->getRootWindow());
71  if(mw) {
72  mw->setTitle(title.c_str());
73  return true;
74  } else return false;
75 }

Variable Documentation

const FXString patterns
Initial value:
=
"All Files (*)\n"
"GIF Image (*.gif)\n"
"BMP Image (*.bmp)\n"
"XPM Image (*.xpm)\n"
"PCX Image (*.pcx)\n"
"RGB Image (*.rgb)\n"
"PNG Image (*.png)\n"
"JPEG Image (*.jpg)\n"
"TARGA Image (*.tga)\n"
"TIFF Image (*.tif)\n"

Definition at line 25 of file deform.cpp.

Referenced by ImageWindow::onToggleSensorDlg().

const FXuint TIMER_INTERVAL = 50

Definition at line 22 of file deform.cpp.

Referenced by ImageWindow::onTimeout(), and setStatusText().