Isis 3 Programmer Reference
Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor Class Reference

This copies the given cube(s) into the project. More...

Inheritance diagram for Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor:
Inheritance graph
Collaboration diagram for Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor:
Collaboration graph

Public Member Functions

 OriginalFileToProjectCubeFunctor (QThread *guiThread, QDir destinationFolder, bool copyDnData)
 Creates the internal functor.
 
 OriginalFileToProjectCubeFunctor (const OriginalFileToProjectCubeFunctor &other)
 Copies the other functor object (copy constructor).
 
 ~OriginalFileToProjectCubeFunctor ()
 Destructor.
 
Cubeoperator() (const FileName &original)
 Overloads the callable operator to invoke this functor.
 
IException errors () const
 Indicates if any errors occurred during the import.
 

Private Member Functions

OriginalFileToProjectCubeFunctoroperator= (const OriginalFileToProjectCubeFunctor &rhs)
 Not implemented.
 

Private Attributes

QDir m_destinationFolder
 Directory where to import the images to.
 
bool m_copyDnData
 Indicates whether the cube data will be copied to the project.
 
QThreadm_guiThread
 Pointer to the GUI thread. Not used?
 
QMutex m_errorsLock
 Mutex lock for appending errors and incrementing error count.
 
QSharedPointer< IExceptionm_errors
 Stores any errors that occur during import.
 
QSharedPointer< int > m_numErrors
 Number of errors that occur during import.
 

Detailed Description

This copies the given cube(s) into the project.

This is designed to work with QtConcurrentMap.

Author
2012-??-?? ???

Definition at line 139 of file ImportImagesWorkOrder.h.

Constructor & Destructor Documentation

◆ OriginalFileToProjectCubeFunctor() [1/2]

Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::OriginalFileToProjectCubeFunctor ( QThread * guiThread,
QDir destinationFolder,
bool copyDnData )

Creates the internal functor.

This functor is used for copying an image to be imported into the project.

Parameters
QThread*guiThread Pointer to the thread that this ImportImagesWorkOrder lives in (was created in).
QDirdestinationFolder Where to copy the image to.
boolcopyDnData Indicates whether or not to copy the image data or just the labels.

Definition at line 338 of file ImportImagesWorkOrder.cpp.

References m_copyDnData, m_destinationFolder, and m_guiThread.

◆ OriginalFileToProjectCubeFunctor() [2/2]

Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::OriginalFileToProjectCubeFunctor ( const OriginalFileToProjectCubeFunctor & other)

Copies the other functor object (copy constructor).

Parameters
OriginalFileToProjectCubeFunctor&other The other functor to copy state from.

Definition at line 352 of file ImportImagesWorkOrder.cpp.

References m_copyDnData, m_destinationFolder, and m_guiThread.

◆ ~OriginalFileToProjectCubeFunctor()

Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::~OriginalFileToProjectCubeFunctor ( )

Destructor.

Resets the internal members to default values.

Definition at line 366 of file ImportImagesWorkOrder.cpp.

Member Function Documentation

◆ errors()

IException Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::errors ( ) const

Indicates if any errors occurred during the import.

Returns an IException that details any errors that occurred during the import. Note that if there have been 20 or more errors, the exception returned will indicate that the import was aborted because too many errors have occurred.

Returns
IExecption Returns an IException indicating what errors occured during the import.

Definition at line 449 of file ImportImagesWorkOrder.cpp.

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

◆ operator()()

Cube * Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::operator() ( const FileName & original)

Overloads the callable operator to invoke this functor.

Copies an image to be imported for this ImportImagesWorkOrder into the associated project. If we are not copying the image data, the a .ecub file will be created that points to the original cube. Otherwise, a .cub will be copied into the project and a .ecub will be created in the project that references the copied cube. Note that if too many errors occur, the copying will not proceed for remaining images in the import and a NULL pointer will be returned.

Parameters
FileName&original Original file name of the image to be copied.
Returns
Cube* Returns a copy of the original cube.

Definition at line 387 of file ImportImagesWorkOrder.cpp.

References Isis::Cube::copy(), Isis::FileName::name(), and Isis::Cube::relocateDnData().

◆ operator=()

OriginalFileToProjectCubeFunctor & Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::operator= ( const OriginalFileToProjectCubeFunctor & rhs)
private

Not implemented.

Member Data Documentation

◆ m_copyDnData

bool Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::m_copyDnData
private

Indicates whether the cube data will be copied to the project.

Definition at line 156 of file ImportImagesWorkOrder.h.

Referenced by OriginalFileToProjectCubeFunctor(), and OriginalFileToProjectCubeFunctor().

◆ m_destinationFolder

QDir Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::m_destinationFolder
private

Directory where to import the images to.

Definition at line 155 of file ImportImagesWorkOrder.h.

Referenced by OriginalFileToProjectCubeFunctor(), and OriginalFileToProjectCubeFunctor().

◆ m_errors

QSharedPointer<IException> Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::m_errors
private

Stores any errors that occur during import.

Definition at line 160 of file ImportImagesWorkOrder.h.

◆ m_errorsLock

QMutex Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::m_errorsLock
private

Mutex lock for appending errors and incrementing error count.

Definition at line 159 of file ImportImagesWorkOrder.h.

◆ m_guiThread

QThread* Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::m_guiThread
private

Pointer to the GUI thread. Not used?

Definition at line 157 of file ImportImagesWorkOrder.h.

Referenced by OriginalFileToProjectCubeFunctor(), and OriginalFileToProjectCubeFunctor().

◆ m_numErrors

QSharedPointer<int> Isis::ImportImagesWorkOrder::OriginalFileToProjectCubeFunctor::m_numErrors
private

Number of errors that occur during import.

Definition at line 161 of file ImportImagesWorkOrder.h.


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