1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
/*=========================================================================
Program: Image Guided Surgery Software Toolkit
Module: $RCSfile: igstkCoordinateSystemTransformToErrorResult.h,v $
Language: C++
Date: $Date: 2008-02-11 01:41:50 $
Version: $Revision: 1.1 $
Copyright (c) ISC Insight Software Consortium. All rights reserved.
See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __igstkCoordinateSystemTransformToErrorResult_h
#define __igstkCoordinateSystemTransformToErrorResult_h
#include "igstkCoordinateSystem.h"
namespace igstk
{
/** \class CoordinateSystemTransformToErrorResult
*
* \brief This class is used a result of RequestComputeTransformTo
* when there is an error. It encapsulates information about the
* source and destination coordinate systems.
*
* It is meant to be used as payload in an event that is created after a
* error during a call to RequestTransformTo().
*
* \ingroup CoordinateSystem
*
*/
class CoordinateSystemTransformToErrorResult
{
public:
CoordinateSystemTransformToErrorResult();
CoordinateSystemTransformToErrorResult(
const CoordinateSystemTransformToErrorResult& in);
CoordinateSystemTransformToErrorResult &operator = (
const CoordinateSystemTransformToErrorResult& in);
void Initialize(const CoordinateSystem* src,
const CoordinateSystem* dst);
/** Clears the pointers that the event is holding. This
* should be called after the event is received to
* remove unnecessary smart pointer references to
* coordinate systems.
*/
void Clear();
/** Returns the source coordinate system. */
const CoordinateSystem * GetSource() const;
/** Returns the destination coordinate system. */
const CoordinateSystem * GetDestination() const;
private:
CoordinateSystem::ConstPointer m_Source;
CoordinateSystem::ConstPointer m_Destination;
};
/** This event is invoked when RequestComputeTransformTo is called with
* a NULL target coordinate system.
*/
igstkLoadedEventMacro( CoordinateSystemTransformToNullTargetEvent,
TransformNotAvailableEvent,
CoordinateSystemTransformToErrorResult );
/** This event is invoked when RequestComputeTransformTo is called with
* a destination coordinate system that is not reachable, i.e. not connected,
* to the source coordinate system.
*/
igstkLoadedEventMacro( CoordinateSystemTransformToDisconnectedEvent,
TransformNotAvailableEvent,
CoordinateSystemTransformToErrorResult );
} // end namespace igstk
#endif
|