BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
btk::MultiSTLFileWriter Class Reference

Writer of acquisition data into multiple STL binary file format. More...

Inheritance diagram for btk::MultiSTLFileWriter:
Inheritance graph
[legend]

Public Types

typedef btkSharedPtr< const
MultiSTLFileWriter
ConstPointer
 
typedef btkSharedPtr
< MultiSTLFileWriter
Pointer
 
- Public Types inherited from btk::ProcessObject
typedef btkSharedPtr< const
ProcessObject
ConstPointer
 
typedef btkSharedPtr
< ProcessObject
Pointer
 
- Public Types inherited from btk::Object
typedef btkSharedPtr< const
Object
ConstPointer
 
typedef btkSharedPtr< ObjectPointer
 

Public Member Functions

const std::string & GetFilePrefix () const
 
const int * GetFramesOfInterest () const
 
void GetFramesOfInterest (int &ff, int &lf) const
 
Acquisition::Pointer GetInputAcquisition ()
 
TriangleMesh::Pointer GetInputMesh ()
 
void SetFilePrefix (const std::string &prefix)
 
void SetFramesOfInterest (int ff=-1, int lf=-1)
 
void SetInputAcquisition (Acquisition::Pointer input)
 
void SetInputMesh (TriangleMesh::Pointer input)
 
virtual ~MultiSTLFileWriter ()
 
- Public Member Functions inherited from btk::ProcessObject
int GetInputNumber () const
 
int GetOutputNumber () const
 
int GetValidInputNumber () const
 
void ResetState ()
 
void Update ()
 
- Public Member Functions inherited from btk::Object
unsigned long int GetTimestamp () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

virtual void GenerateData ()
 
virtual DataObject::Pointer MakeOutput (int idx)
 
 MultiSTLFileWriter ()
 
- Protected Member Functions inherited from btk::ProcessObject
int GetInputIndex (DataObject::Pointer input)
 
DataObject::Pointer GetNthInput (int idx)
 
DataObject::ConstPointer GetNthInput (int idx) const
 
DataObject::Pointer GetNthOutput (int idx)
 
DataObject::ConstPointer GetNthOutput (int idx) const
 
int GetOutputIndex (DataObject::Pointer output)
 
bool IsModified () const
 
void Modified ()
 
 ProcessObject ()
 
void SetInputNumber (int num)
 
virtual void SetNthInput (int idx, DataObject::Pointer input)
 
virtual void SetNthOutput (int idx, DataObject::Pointer output)
 
void SetOutputNumber (int num)
 
virtual ~ProcessObject ()
 
- Protected Member Functions inherited from btk::Object
 Object ()
 
 Object (const Object &toCopy)
 
virtual ~Object ()
 

Additional Inherited Members

- Protected Attributes inherited from btk::Object
unsigned long int m_Timestamp
 

Detailed Description

Writer of acquisition data into multiple STL binary file format.

This writer extract for each frame the solid from the given acquisition and defined triangle mesh and write it in STL files defined by the given file prefix.

The file prefix must contains the path to write the STL files and the beginning of the file. The frame index and the file extension will be added during the creation of the file. For examples, the file prefix '/Users/jdoe/Data/FaceScan_' will generate the following files: '/Users/jdoe/Data/FaceScan_1.stl' ... '/Users/jdoe/Data/FaceScan_30.stl'

You can export only a subset of the acquisition by specifying the frames of interest using the method SetFramesOfInterest().

Member Typedef Documentation

Smart pointer associated with a const MultiSTLFileWriter object.

Smart pointer associated with an MultiSTLFileWriter object.

Constructor & Destructor Documentation

btk::MultiSTLFileWriter::~MultiSTLFileWriter ( )
inlinevirtual

Empty destructor.

btk::MultiSTLFileWriter::MultiSTLFileWriter ( )
protected

Constructor. Sets the number of outputs equal to one. No input.

Member Function Documentation

void btk::MultiSTLFileWriter::GenerateData ( )
protectedvirtual

Create STL files based on the given file prefix (see SetFilePrefix()) and fill them with the given acquisition (see SetInputAcquisition()) and the given mesh (see SetInputMesh()). You can also set the frames to extract using the method SetFramesOfInterest().

Implements btk::ProcessObject.

const std::string & btk::MultiSTLFileWriter::GetFilePrefix ( ) const
inline

Returns the file prefix used to create the STL files.

const int * btk::MultiSTLFileWriter::GetFramesOfInterest ( ) const
inline

Returns the frames of interest.

void btk::MultiSTLFileWriter::GetFramesOfInterest ( int &  ff,
int &  lf 
) const
inline

Returns the frames of interest.

Acquisition::Pointer btk::MultiSTLFileWriter::GetInputAcquisition ( )
inline

Returns the Acquisition used to create the STL files.

TriangleMesh::Pointer btk::MultiSTLFileWriter::GetInputMesh ( )
inline

Returns the mesh used to create the STL files.

DataObject::Pointer btk::MultiSTLFileWriter::MakeOutput ( int  idx)
protectedvirtual

Whatever the specified index, this method creates an Acquisition object

Implements btk::ProcessObject.

static MultiSTLFileWriter::Pointer btk::MultiSTLFileWriter::New ( )
inlinestatic

Creates a MultiSTLFileWriter process

void btk::MultiSTLFileWriter::SetFilePrefix ( const std::string &  prefix)

Specifies the file to read. This is forwarded to the IO instance.

void btk::MultiSTLFileWriter::SetFramesOfInterest ( int  ff = -1,
int  lf = -1 
)

Sets the frames of interest to export. Setting ff to -1 means you start from the first frame of the acquisition. Setting lf to -1 means you use the last frame of the acquisition.

void btk::MultiSTLFileWriter::SetInputAcquisition ( Acquisition::Pointer  input)
inline

Sets the Acquisition used to create the STL files.

void btk::MultiSTLFileWriter::SetInputMesh ( TriangleMesh::Pointer  input)
inline

Sets the mesh information which will be used to create the STL files.