NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CTraceGraph Class Reference

Search Toolkit Book for CTraceGraph

CTraceGraph - trace data renderer. More...

#include <gui/widgets/aln_multiple/trace_graph.hpp>

+ Inheritance diagram for CTraceGraph:
+ Collaboration diagram for CTraceGraph:

Public Types

typedef CTraceGraphProperties::ESingnalStyle ESingnalStyle
 
typedef CTraceGraphProperties::EGraphState EGraphState
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1, eAllocFillZero, eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef CAtomicCounter TCounter
 Counter type is CAtomiCounter. More...
 
typedef TCounter::TValue TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CTraceGraph (const objects::CBioseq_Handle &handle, bool b_neg_strand)
 
void SetConfGraphState (EGraphState state)
 
void SetSignalGraphState (EGraphState state)
 
IRenderable implementation
virtual void Render (CGlPane &pane)
 
virtual TVPPoint PreferredSize ()
 
virtual bool NeedTooltip (CGlPane &pane, int vp_x, int vp_y)
 
virtual string GetTooltip ()
 
IAlnVecRowGraph implementaion
virtual ~CTraceGraph ()
 
virtual bool IsCreated () const
 Graph is not considered fully functional until it has been "created" by the call to create function. More...
 
virtual bool Create ()
 
virtual void Destroy ()
 
virtual void Update (double, double)
 No need to update data for track graph. More...
 
virtual const IAlnRowGraphPropertiesGetProperties () const
 
virtual void SetProperties (IAlnRowGraphProperties *props)
 
virtual void Render (CGlPane &pane, IAlnSegmentIterator &it)
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 
- Public Member Functions inherited from CRenderableImpl
 CRenderableImpl ()
 CRenderableImpl. More...
 
virtual ~CRenderableImpl ()
 
virtual TVPRect GetVPRect () const
 
virtual void SetVPRect (const TVPRect &rc)
 
virtual TModelRect GetModelRect () const
 
virtual void SetModelRect (const TModelRect &rc)
 
virtual bool IsVisible ()
 
virtual void SetVisible (bool set)
 
virtual void SetOrder (int order)
 
virtual int GetOrder () const
 
- Public Member Functions inherited from IRenderable
virtual ~IRenderable (void)
 
- Public Member Functions inherited from IAlnVecRowGraph
virtual ~IAlnVecRowGraph ()
 

Protected Member Functions

int x_GetConfGraphH () const
 
int x_GetSignalGraphH () const
 
void x_RenderText (CGlPane &pane)
 
void x_RenderContour (CGlPane &pane, int y, int conf_h, int total_h, IAlnSegmentIterator &it)
 
void x_RenderConfGraph (CGlPane &pane, int y, int h, IAlnSegmentIterator &it)
 
void x_RenderSignalGraph (CGlPane &pane, int y, int h, IAlnSegmentIterator &it)
 
void x_RenderCurveSegment (CGlPane &pane, const IAlnSegment &seg, const CTraceData::TPositions &positions, const CTraceData::TValues &values, int bottom_y, int h, int amp)
 
void x_RenderIntensityGraphs (CGlPane &pane, int y, int h, IAlnSegmentIterator &it)
 Render signals for all channels as gradient-color bands with color intensity proprotional to signal strength. More...
 
const CRgbaColorGetColorByValue (double value, int signal) const
 
int x_FindSampleToLeft (double pos) const
 returns index of rightmost sample having m_SeqPos less then "pos". More...
 
int x_FindSampleToRight (double pos) const
 returns index of the leftmost sample having m_SeqPos greater than "pos" if "pos" is to the left of the trace range function returns -1, if "pos" is to the right of the trace range functions returns "n_samples" More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

CTraceDataProxy m_DataProxy
 
CTraceDatam_Data
 
CTraceGraphProperties m_Props
 
vector< CRgbaColorm_vSignalColors
 
CGlTextureFont m_Font
 
CRgbaColor m_TextColor
 
- Protected Attributes inherited from CRenderableImpl
TVPRect m_VPRect
 
TModelRect m_ModelRect
 
bool m_Visible
 
int m_Order = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_NORETURN void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_NORETURN void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

CTraceGraph - trace data renderer.

Renders confidence graph and A, C, T, G chromatograms using CTraceData as datasource.

Definition at line 82 of file trace_graph.hpp.

Member Typedef Documentation

Definition at line 89 of file trace_graph.hpp.

Definition at line 88 of file trace_graph.hpp.

Constructor & Destructor Documentation

CTraceGraph::CTraceGraph ( const objects::CBioseq_Handle &  handle,
bool  b_neg_strand 
)

Definition at line 74 of file trace_graph.cpp.

CTraceGraph::~CTraceGraph ( )
virtual

Definition at line 84 of file trace_graph.cpp.

References Destroy().

Member Function Documentation

bool CTraceGraph::Create ( void  )
virtual
void CTraceGraph::Destroy ( void  )
virtual

Implements IAlnVecRowGraph.

Definition at line 189 of file trace_graph.cpp.

References m_Data, m_vSignalColors, and NULL.

Referenced by ~CTraceGraph().

const CRgbaColor & CTraceGraph::GetColorByValue ( double  value,
int  signal 
) const
protected

Definition at line 892 of file trace_graph.cpp.

References _ASSERT, i, int, kGradColors, m_vSignalColors, and min().

Referenced by x_RenderIntensityGraphs().

const IAlnRowGraphProperties * CTraceGraph::GetProperties ( void  ) const
virtual

Implements IAlnVecRowGraph.

Definition at line 200 of file trace_graph.cpp.

References m_Props.

string CTraceGraph::GetTooltip ( void  )
virtual

Reimplemented from CRenderableImpl.

Definition at line 150 of file trace_graph.cpp.

bool CTraceGraph::IsCreated ( ) const
virtual

Graph is not considered fully functional until it has been "created" by the call to create function.

Only "Created" graph can be rendered. Creating may include loading data and building internal data structures.

Implements IAlnVecRowGraph.

Definition at line 156 of file trace_graph.cpp.

References m_Data, and NULL.

bool CTraceGraph::NeedTooltip ( CGlPane pane,
int  vp_x,
int  vp_y 
)
virtual

Reimplemented from CRenderableImpl.

Definition at line 142 of file trace_graph.cpp.

References _VERIFY, CRenderableImpl::m_VPRect, and CGlRect< T >::PtInRect().

TVPPoint CTraceGraph::PreferredSize ( )
virtual

Reimplemented from CRenderableImpl.

Definition at line 127 of file trace_graph.cpp.

References m_Data, x_GetConfGraphH(), and x_GetSignalGraphH().

void CTraceGraph::Render ( CGlPane pane)
virtual

Implements IRenderable.

Definition at line 120 of file trace_graph.cpp.

void CTraceGraph::Render ( CGlPane pane,
IAlnSegmentIterator it 
)
virtual
void CTraceGraph::SetConfGraphState ( EGraphState  state)

Definition at line 216 of file trace_graph.cpp.

References CTraceGraphProperties::m_ConfGraphState, and m_Props.

Referenced by Create().

void CTraceGraph::SetProperties ( IAlnRowGraphProperties props)
virtual

Implements IAlnVecRowGraph.

Definition at line 206 of file trace_graph.cpp.

References m_Props.

void CTraceGraph::SetSignalGraphState ( EGraphState  state)

Definition at line 222 of file trace_graph.cpp.

References m_Props, and CTraceGraphProperties::m_SignalGraphState.

Referenced by Create().

virtual void CTraceGraph::Update ( double  ,
double   
)
inlinevirtual

No need to update data for track graph.

Implements IAlnVecRowGraph.

Definition at line 112 of file trace_graph.hpp.

int CTraceGraph::x_FindSampleToLeft ( double  pos) const
protected

returns index of rightmost sample having m_SeqPos less then "pos".

if "pos" is to the left of the trace range function returns -1, if "pos" is to the right of the trace range functions returns "n_samples"

Definition at line 906 of file trace_graph.cpp.

References CTraceData::GetPositions(), CTraceData::GetSamplesCount(), CTraceData::GetSeqFrom(), CTraceData::GetSeqLength(), CTraceData::GetSeqTo(), i, int, m_Data, max(), and min().

Referenced by x_RenderCurveSegment(), and x_RenderIntensityGraphs().

int CTraceGraph::x_FindSampleToRight ( double  pos) const
protected

returns index of the leftmost sample having m_SeqPos greater than "pos" if "pos" is to the left of the trace range function returns -1, if "pos" is to the right of the trace range functions returns "n_samples"

Definition at line 938 of file trace_graph.cpp.

References CTraceData::GetPositions(), CTraceData::GetSamplesCount(), CTraceData::GetSeqFrom(), CTraceData::GetSeqLength(), CTraceData::GetSeqTo(), i, int, m_Data, max(), and min().

Referenced by x_RenderCurveSegment(), and x_RenderIntensityGraphs().

int CTraceGraph::x_GetConfGraphH ( ) const
protected
int CTraceGraph::x_GetSignalGraphH ( ) const
protected
void CTraceGraph::x_RenderConfGraph ( CGlPane pane,
int  y,
int  h,
IAlnSegmentIterator it 
)
protected
void CTraceGraph::x_RenderContour ( CGlPane pane,
int  y,
int  conf_h,
int  total_h,
IAlnSegmentIterator it 
)
protected
void CTraceGraph::x_RenderCurveSegment ( CGlPane pane,
const IAlnSegment seg,
const CTraceData::TPositions positions,
const CTraceData::TValues values,
int  bottom_y,
int  h,
int  amp 
)
protected
void CTraceGraph::x_RenderIntensityGraphs ( CGlPane pane,
int  y,
int  h,
IAlnSegmentIterator it_seg 
)
protected
void CTraceGraph::x_RenderSignalGraph ( CGlPane pane,
int  y,
int  h,
IAlnSegmentIterator it 
)
protected
void CTraceGraph::x_RenderText ( CGlPane pane)
protected

Member Data Documentation

CTraceData* CTraceGraph::m_Data
protected
CTraceDataProxy CTraceGraph::m_DataProxy
protected

Definition at line 152 of file trace_graph.hpp.

Referenced by Create().

CGlTextureFont CTraceGraph::m_Font
protected

Definition at line 159 of file trace_graph.hpp.

Referenced by x_RenderText().

CTraceGraphProperties CTraceGraph::m_Props
protected
CRgbaColor CTraceGraph::m_TextColor
protected

Definition at line 160 of file trace_graph.hpp.

Referenced by x_RenderText().

vector<CRgbaColor> CTraceGraph::m_vSignalColors
protected

Definition at line 157 of file trace_graph.hpp.

Referenced by Create(), Destroy(), GetColorByValue(), and x_RenderSignalGraph().


The documentation for this class was generated from the following files:
Modified on Sun Jun 25 17:53:25 2017 by modify_doxy.py rev. 533848