Isis 3 Programmer Reference
Isis::ExportImagesWorkOrder::ProjectImageExportFunctor Class Reference

This functor is meant for QtConcurrentMap. More...

Inheritance diagram for Isis::ExportImagesWorkOrder::ProjectImageExportFunctor:
Inheritance graph
Collaboration diagram for Isis::ExportImagesWorkOrder::ProjectImageExportFunctor:
Collaboration graph

Public Member Functions

 ProjectImageExportFunctor (QString destination)
 Create an image export functor that will copy the image's cubes into the given destination directory.
 
 ProjectImageExportFunctor (const ProjectImageExportFunctor &other)
 Copy the functor.
 
 ~ProjectImageExportFunctor ()
 Destroys the functor.
 
void * operator() (Image *const &imageToExport)
 Write the given image's cube into the destination folder (preserves the base name).
 
IException errors () const
 Get the accumulated error list from this functor's run.
 

Private Member Functions

ProjectImageExportFunctoroperator= (const ProjectImageExportFunctor &rhs)
 Not implemented.
 

Private Attributes

QString m_destination
 
QMutex m_errorsLock
 
QSharedPointer< IExceptionm_errors
 
QSharedPointer< int > m_numErrors
 

Detailed Description

This functor is meant for QtConcurrentMap.

This writes images to the output directory and always returns a void*. This is using map instead of run for performance reasons (map is much faster). Errors are accumulated, you can call errors() after the map is done to get them.

Author
2012-09-27 Steven Lambright and Tracie Sucharski

Definition at line 61 of file ExportImagesWorkOrder.h.

Constructor & Destructor Documentation

◆ ProjectImageExportFunctor() [1/2]

Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::ProjectImageExportFunctor ( QString destination)

Create an image export functor that will copy the image's cubes into the given destination directory.

Parameters
destinationThe directory to copy cubes into in the () operator.

Definition at line 181 of file ExportImagesWorkOrder.cpp.

◆ ProjectImageExportFunctor() [2/2]

Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::ProjectImageExportFunctor ( const ProjectImageExportFunctor & other)

Copy the functor.

This will share the error reporting data across instances so that you can access the errors gathered during a QtConcurrentMap (which copies the functor).

Parameters
otherThe functor to copy

Definition at line 194 of file ExportImagesWorkOrder.cpp.

◆ ~ProjectImageExportFunctor()

Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::~ProjectImageExportFunctor ( )

Destroys the functor.

Definition at line 205 of file ExportImagesWorkOrder.cpp.

Member Function Documentation

◆ errors()

IException Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::errors ( ) const

Get the accumulated error list from this functor's run.

This will return a default-constructed (empty/blank) exception if no errors were encountered.

Returns
IException A list of errors that occurred during the cube copies.

Definition at line 242 of file ExportImagesWorkOrder.cpp.

References Isis::IException::append(), and Isis::IException::Unknown.

◆ operator()()

void * Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::operator() ( Image *const & imageToExport)

Write the given image's cube into the destination folder (preserves the base name).

Parameters
imageToExportImage to export
Returns
void* Always NULL, used for QtConcurrentMap compatibility

Definition at line 216 of file ExportImagesWorkOrder.cpp.

References Isis::FileName::baseName().

◆ operator=()

ProjectImageExportFunctor & Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::operator= ( const ProjectImageExportFunctor & rhs)
private

Not implemented.

Member Data Documentation

◆ m_destination

QString Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::m_destination
private

Definition at line 75 of file ExportImagesWorkOrder.h.

◆ m_errors

QSharedPointer<IException> Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::m_errors
private

Definition at line 78 of file ExportImagesWorkOrder.h.

◆ m_errorsLock

QMutex Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::m_errorsLock
private

Definition at line 77 of file ExportImagesWorkOrder.h.

◆ m_numErrors

QSharedPointer<int> Isis::ExportImagesWorkOrder::ProjectImageExportFunctor::m_numErrors
private

Definition at line 79 of file ExportImagesWorkOrder.h.


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