A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/sub__image_8cpp_source.html below:

NCBI C++ ToolKit: src/util/image/demo/sub_image.cpp Source File

49  virtual void Init

(

void

);

50  virtual int Run

(

void

);

51  virtual void Exit

(

void

);

66

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

67  "Image read/write test application"

);

69

arg_desc->AddDefaultPositional(

"image"

,

"Image to crop"

,

73

arg_desc->AddOptionalKey(

"out"

,

"OutFile"

,

74  "File name of resultant image"

,

77

arg_desc->AddKey(

"x"

,

"PosX"

,

"Crop X Position"

,

79

arg_desc->AddKey(

"y"

,

"PosX"

,

"Crop X Position"

,

81

arg_desc->AddKey(

"wd"

,

"Width"

,

"Crop Width"

,

83

arg_desc->AddKey(

"ht"

,

"Height"

,

"Crop Height"

,

97  int

x = args[

"x"

].AsInteger();

98  int

y = args[

"y"

].AsInteger();

99  int

w = args[

"wd"

].AsInteger();

100  int

h = args[

"ht"

].AsInteger();

112  LOG_POST

(

Info

<<

"read ("

<< x <<

", "

<< y <<

", "

<< x+w

113

<<

", "

<< y+h <<

") in "

<< read_time <<

" seconds"

);

118  LOG_POST

(

Info

<<

"wrote image in "

<< write_time - read_time

141 int main

(

int

argc,

const char

* argv[])

static CImage * ReadSubImage(CNcbiIstream &istr, size_t x, size_t y, size_t w, size_t h, EType type=CImageIO::eUnknown)

static bool WriteImage(const CImage &image, CNcbiOstream &ostr, EType type, ECompress compress=eCompress_Default)

virtual void Init(void)

Initialize the application.

virtual void Exit(void)

Cleanup on application exit.

virtual int Run(void)

Run the application.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

@ fBinary

Open as binary file; for eInputFile, eOutputFile, eIOFile.

@ eInputFile

Name of file (must exist and be readable)

@ eString

An arbitrary string.

@ eInteger

Convertible into an integer number (int or Int8)

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")

Set diagnostic stream.

void Error(CExceptionArgs_Base &args)

void Info(CExceptionArgs_Base &args)

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

double Elapsed(void) const

Return time elapsed since first Start() or last Restart() call (in seconds).

void Start(void)

Start the timer.

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

Defines unified interface to application:

Process information in the NCBI Registry, including working with configuration files.

Defines: CTimeFormat - storage class for time format.

int main(int argc, const char *argv[])


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4