TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ttkProgramBase Class Reference

Base VTK editor class for standalone programs. This class parses the the command line, execute the TTK module and takes care of the IO. More...

#include <ttkProgramBase.h>

Inheritance diagram for ttkProgramBase:
ttk::ProgramBase ttk::Debug ttk::BaseClass ttkUserInterfaceBase vtkProgram< ttkModule > vtkUserInterface< ttkModule >

Public Member Functions

 ttkProgramBase ()
 
 ~ttkProgramBase () override=default
 
int execute () override
 Set the arguments of your ttk module and execute it here.
 
vtkDataSet * getInput (const int &inputId)
 
int getNumberOfInputs ()
 
int run () override
 
int save () const override
 Save the output(s) of the TTK module.
 
virtual int setTTKmodule (vtkDataSetAlgorithm *ttkModule)
 
- Public Member Functions inherited from ttk::ProgramBase
 ProgramBase ()
 
 ~ProgramBase () override=default
 
virtual int init (int &argc, char **argv)
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Member Functions

template<class vtkReaderClass >
int load (const std::string &fileName, std::vector< vtkSmartPointer< vtkReaderClass > > &readerList)
 
int load (const std::vector< std::string > &inputPaths) override
 Load a sequence of input data-sets.
 
template<class vtkWriterClass >
int save (const int &outputPortId) const
 
- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 

Protected Attributes

std::vector< vtkDataSet * > inputs_
 
std::vector< vtkSmartPointer< vtkXMLImageDataReader > > imageDataReaders_
 
std::vector< vtkSmartPointer< vtkXMLPolyDataReader > > polyDataReaders_
 
std::vector< vtkSmartPointer< vtkXMLUnstructuredGridReader > > unstructuredGridReaders_
 
vtkDataSetAlgorithm * vtkWrapper_
 
- Protected Attributes inherited from ttk::ProgramBase
std::string outputPath_
 
DebugttkModule_
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Public Attributes inherited from ttk::ProgramBase
CommandLineParser parser_
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

Base VTK editor class for standalone programs. This class parses the the command line, execute the TTK module and takes care of the IO.

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr.
Date
February 2017.

Definition at line 31 of file ttkProgramBase.h.

Constructor & Destructor Documentation

◆ ttkProgramBase()

ttkProgramBase::ttkProgramBase ( )
inline

Definition at line 34 of file ttkProgramBase.h.

◆ ~ttkProgramBase()

ttkProgramBase::~ttkProgramBase ( )
overridedefault

Member Function Documentation

◆ execute()

int ttkProgramBase::execute ( )
overridevirtual

Set the arguments of your ttk module and execute it here.

Implements ttk::ProgramBase.

Definition at line 6 of file ttkProgramBase.cpp.

◆ getInput()

vtkDataSet * ttkProgramBase::getInput ( const int &  inputId)
inline

Definition at line 45 of file ttkProgramBase.h.

◆ getNumberOfInputs()

int ttkProgramBase::getNumberOfInputs ( )
inline

Definition at line 51 of file ttkProgramBase.h.

◆ load() [1/2]

template<class vtkReaderClass >
int ttkProgramBase::load ( const std::string &  fileName,
std::vector< vtkSmartPointer< vtkReaderClass > > &  readerList 
)
protected

Definition at line 164 of file ttkProgramBase.h.

◆ load() [2/2]

int ttkProgramBase::load ( const std::vector< std::string > &  inputPaths)
overrideprotectedvirtual

Load a sequence of input data-sets.

Implements ttk::ProgramBase.

Definition at line 21 of file ttkProgramBase.cpp.

◆ run()

int ttkProgramBase::run ( )
inlineoverridevirtual

Reimplemented from ttk::ProgramBase.

Reimplemented in vtkProgram< ttkModule >, ttkUserInterfaceBase, and vtkUserInterface< ttkModule >.

Definition at line 55 of file ttkProgramBase.h.

◆ save() [1/2]

int ttkProgramBase::save ( ) const
overridevirtual

Save the output(s) of the TTK module.

Implements ttk::ProgramBase.

Definition at line 52 of file ttkProgramBase.cpp.

◆ save() [2/2]

template<class vtkWriterClass >
int ttkProgramBase::save ( const int &  outputPortId) const
protected

Definition at line 118 of file ttkProgramBase.h.

◆ setTTKmodule()

virtual int ttkProgramBase::setTTKmodule ( vtkDataSetAlgorithm *  ttkModule)
inlinevirtual

Definition at line 73 of file ttkProgramBase.h.

Member Data Documentation

◆ imageDataReaders_

std::vector<vtkSmartPointer<vtkXMLImageDataReader> > ttkProgramBase::imageDataReaders_
protected

Definition at line 83 of file ttkProgramBase.h.

◆ inputs_

std::vector<vtkDataSet *> ttkProgramBase::inputs_
protected

Definition at line 82 of file ttkProgramBase.h.

◆ polyDataReaders_

std::vector<vtkSmartPointer<vtkXMLPolyDataReader> > ttkProgramBase::polyDataReaders_
protected

Definition at line 84 of file ttkProgramBase.h.

◆ unstructuredGridReaders_

std::vector<vtkSmartPointer<vtkXMLUnstructuredGridReader> > ttkProgramBase::unstructuredGridReaders_
protected

Definition at line 86 of file ttkProgramBase.h.

◆ vtkWrapper_

vtkDataSetAlgorithm* ttkProgramBase::vtkWrapper_
protected

Definition at line 87 of file ttkProgramBase.h.


The documentation for this class was generated from the following files: