NCBI C++ ToolKit
|
Search Toolkit Book for CTraceGraph
CTraceGraph - trace data renderer. More...
#include <gui/widgets/aln_multiple/trace_graph.hpp>
Public Types | |
typedef CTraceGraphProperties::ESingnalStyle | ESingnalStyle |
typedef CTraceGraphProperties::EGraphState | EGraphState |
![]() | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | 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 IAlnRowGraphProperties * | GetProperties () const |
virtual void | SetProperties (IAlnRowGraphProperties *props) |
virtual void | Render (CGlPane &pane, IAlnSegmentIterator &it) |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (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... | |
![]() | |
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 |
![]() | |
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 |
![]() | |
virtual | ~IRenderable (void) |
![]() | |
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 CRgbaColor & | GetColorByValue (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... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Protected Attributes | |
CTraceDataProxy | m_DataProxy |
CTraceData * | m_Data |
CTraceGraphProperties | m_Props |
vector< CRgbaColor > | m_vSignalColors |
CGlTextureFont | m_Font |
CRgbaColor | m_TextColor |
![]() | |
TVPRect | m_VPRect |
TModelRect | m_ModelRect |
bool | m_Visible |
int | m_Order = 0 |
Additional Inherited Members | |
![]() | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT 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 void | EnableDebugDump (bool on) |
![]() | |
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... | |
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.
Definition at line 89 of file trace_graph.hpp.
Definition at line 88 of file trace_graph.hpp.
Definition at line 74 of file trace_graph.cpp.
|
virtual |
Definition at line 84 of file trace_graph.cpp.
References Destroy().
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 162 of file trace_graph.cpp.
References CTraceData::CalculateMax(), CTraceGraphProperties::eExpanded, CTraceGraphProperties::eHidden, CTraceData::GetSamplesCount(), kGradColors, CTraceDataProxy::LoadData(), m_Data, m_DataProxy, m_vSignalColors, SetConfGraphState(), and SetSignalGraphState().
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 189 of file trace_graph.cpp.
References m_Data, m_vSignalColors, and NULL.
Referenced by ~CTraceGraph().
|
protected |
Definition at line 892 of file trace_graph.cpp.
References _ASSERT, i, int, kGradColors, m_vSignalColors, min(), and value.
Referenced by x_RenderIntensityGraphs().
|
virtual |
|
virtual |
Reimplemented from CRenderableImpl.
Definition at line 150 of file trace_graph.cpp.
|
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.
Reimplemented from CRenderableImpl.
Definition at line 142 of file trace_graph.cpp.
References _VERIFY, CRenderableImpl::m_VPRect, and CGlRect< T >::PtInRect().
|
virtual |
Reimplemented from CRenderableImpl.
Definition at line 127 of file trace_graph.cpp.
References m_Data, x_GetConfGraphH(), and x_GetSignalGraphH().
|
virtual |
Implements IRenderable.
Definition at line 120 of file trace_graph.cpp.
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 229 of file trace_graph.cpp.
References IRender::BlendFunc(), IAlnSegmentIterator::Clone(), CGlPane::Close(), IRender::Disable(), CTraceGraphProperties::eCurve, CTraceGraphProperties::eExpanded, IRender::Enable(), GetGl(), CGlPane::GetOffsetY(), CGlPane::GetScaleX(), int, IRender::LineWidth(), CTraceGraphProperties::m_ConfGraphState, m_Data, CRenderableImpl::m_ModelRect, m_Props, CTraceGraphProperties::m_SignalGraphState, CTraceGraphProperties::m_SignalStyle, CGlPane::OpenOrtho(), CGlPane::OpenPixels(), CGlRect< T >::Top(), x_GetConfGraphH(), x_GetSignalGraphH(), x_RenderConfGraph(), x_RenderContour(), x_RenderIntensityGraphs(), and x_RenderSignalGraph().
void CTraceGraph::SetConfGraphState | ( | EGraphState | state | ) |
Definition at line 216 of file trace_graph.cpp.
References CTraceGraphProperties::m_ConfGraphState, and m_Props.
Referenced by Create().
|
virtual |
void CTraceGraph::SetSignalGraphState | ( | EGraphState | state | ) |
Definition at line 222 of file trace_graph.cpp.
References m_Props, and CTraceGraphProperties::m_SignalGraphState.
Referenced by Create().
|
inlinevirtual |
No need to update data for track graph.
Implements IAlnVecRowGraph.
Definition at line 112 of file trace_graph.hpp.
|
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().
|
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().
|
protected |
Definition at line 98 of file trace_graph.cpp.
References CTraceGraphProperties::eCollapsed, CTraceGraphProperties::eExpanded, CTraceGraphProperties::eHidden, kCollapsedGraphH, kConfGraphPrefH, CTraceGraphProperties::m_ConfGraphState, and m_Props.
Referenced by PreferredSize(), and Render().
|
protected |
Definition at line 109 of file trace_graph.cpp.
References CTraceGraphProperties::eCollapsed, CTraceGraphProperties::eExpanded, CTraceGraphProperties::eHidden, kCollapsedGraphH, kSignalGraphPrefH, m_Props, and CTraceGraphProperties::m_SignalGraphState.
Referenced by PreferredSize(), and Render().
|
protected |
Definition at line 417 of file trace_graph.cpp.
References _ASSERT, IRender::Begin(), CGlRect< T >::Bottom(), CGlPane::Close(), IRender::Color3d(), IRender::Disable(), IRender::End(), CGlPane::eOrtho, SChunkTranslator::GetAlnPosFromSeqPos(), IAlnSegment::GetAlnRange(), CTraceData::GetConfidence(), CRange_Base::GetFrom(), GetGl(), CTraceData::GetMaxConfidence(), CGlPane::GetOffsetX(), CGlPane::GetProjMode(), IAlnSegment::GetRange(), CGlPane::GetScaleX(), CTraceData::GetSeqFrom(), SChunkTranslator::GetSeqPosFromAlnPos(), CTraceData::GetSeqTo(), CRange_Base::GetTo(), CGlPane::GetViewport(), CGlPane::GetVisibleRect(), SChunkTranslator::Init(), IAlnSegment::IsAligned(), CTraceData::IsNegative(), kGraphOffsetY, CGlRect< T >::Left(), m_Data, max(), min(), NULL, CGlPane::OpenPixels(), IRender::PolygonMode(), IRender::Rectd(), CGlRect< T >::Right(), swap(), and IRender::Vertex2d().
Referenced by Render().
|
protected |
Definition at line 370 of file trace_graph.cpp.
References IRender::Color3d(), IRender::Disable(), SChunkTranslator::GetAlnPosFromSeqPos(), IAlnSegment::GetAlnRange(), CRange_Base::GetFrom(), GetGl(), CGlPane::GetOffsetX(), IAlnSegment::GetRange(), CTraceData::GetSeqFrom(), CTraceData::GetSeqTo(), CRange_Base::GetTo(), SChunkTranslator::Init(), COpenRange< Position >::IntersectWith(), IAlnSegment::IsAligned(), CTraceData::IsNegative(), m_Data, COpenRange< Position >::NotEmpty(), IRender::PolygonMode(), IRender::Rectd(), and swap().
Referenced by Render().
|
protected |
Definition at line 625 of file trace_graph.cpp.
References _ASSERT, IRender::Begin(), IRender::End(), SChunkTranslator::GetAlnPosFromSeqPos(), IAlnSegment::GetAlnRange(), CRange_Base::GetFrom(), GetGl(), CGlPane::GetOffsetX(), IAlnSegment::GetRange(), CTraceData::GetSamplesCount(), CTraceData::GetSeqFrom(), SChunkTranslator::GetSeqPosFromAlnPos(), CTraceData::GetSeqTo(), CRange_Base::GetTo(), CGlPane::GetVisibleRect(), SChunkTranslator::Init(), CTraceData::IsNegative(), CGlRect< T >::Left(), m_Data, max(), min(), CGlRect< T >::Right(), swap(), v2, IRender::Vertex2d(), x_FindSampleToLeft(), and x_FindSampleToRight().
Referenced by x_RenderSignalGraph().
|
protected |
Render signals for all channels as gradient-color bands with color intensity proprotional to signal strength.
Definition at line 722 of file trace_graph.cpp.
References _ASSERT, IRender::Begin(), CGlRect< T >::Bottom(), IRender::ColorC(), CTraceData::eA, IRender::End(), SChunkTranslator::GetAlnPosFromSeqPos(), IAlnSegment::GetAlnRange(), GetColorByValue(), CRange_Base::GetFrom(), GetGl(), CTraceData::GetMax(), CTraceData::GetPositions(), IAlnSegment::GetRange(), CTraceData::GetSamplesCount(), CGlPane::GetScaleX(), CTraceData::GetSeqFrom(), SChunkTranslator::GetSeqPosFromAlnPos(), CTraceData::GetSeqTo(), CRange_Base::GetTo(), CTraceData::GetValues(), CGlPane::GetViewport(), CGlPane::GetVisibleRect(), SChunkTranslator::Init(), IAlnSegment::IsAligned(), CTraceData::IsNegative(), kGraphOffsetY, CGlRect< T >::Left(), CTraceGraphProperties::m_bReverseColors, m_Data, m_Props, max(), min(), CGlRect< T >::Right(), swap(), v2, IRender::Vertex2d(), x_FindSampleToLeft(), and x_FindSampleToRight().
Referenced by Render().
|
protected |
Definition at line 585 of file trace_graph.cpp.
References _ASSERT, IAlnSegmentIterator::Clone(), IRender::ColorC(), CTraceData::eA, CTraceGraphProperties::eCurve, CTraceData::eG, GetGl(), CTraceData::GetMax(), CTraceData::GetPositions(), CTraceData::GetValues(), CTraceData::IsNegative(), kGradColors, kGraphOffsetY, CTraceGraphProperties::m_bReverseColors, m_Data, m_Props, CTraceGraphProperties::m_SignalStyle, m_vSignalColors, max(), IRender::PolygonMode(), and x_RenderCurveSegment().
Referenced by Render().
|
protected |
Definition at line 294 of file trace_graph.cpp.
References CGlRect< T >::Bottom(), CGlPane::Close(), IRender::ColorC(), IGlFont::eAlign_Left, GetGl(), CGlRect< T >::Inflate(), kTextOff, CGlRect< T >::Left(), m_Font, m_TextColor, CRenderableImpl::m_VPRect, CGlPane::OpenPixels(), CGlRect< T >::Right(), CGlTextureFont::TextOut(), and CGlRect< T >::Top().
|
protected |
Definition at line 153 of file trace_graph.hpp.
Referenced by Create(), Destroy(), IsCreated(), PreferredSize(), Render(), x_FindSampleToLeft(), x_FindSampleToRight(), x_RenderConfGraph(), x_RenderContour(), x_RenderCurveSegment(), x_RenderIntensityGraphs(), and x_RenderSignalGraph().
|
protected |
Definition at line 152 of file trace_graph.hpp.
Referenced by Create().
|
protected |
Definition at line 159 of file trace_graph.hpp.
Referenced by x_RenderText().
|
protected |
Definition at line 155 of file trace_graph.hpp.
Referenced by GetProperties(), Render(), SetConfGraphState(), SetProperties(), SetSignalGraphState(), x_GetConfGraphH(), x_GetSignalGraphH(), x_RenderIntensityGraphs(), and x_RenderSignalGraph().
|
protected |
Definition at line 160 of file trace_graph.hpp.
Referenced by x_RenderText().
|
protected |
Definition at line 157 of file trace_graph.hpp.
Referenced by Create(), Destroy(), GetColorByValue(), and x_RenderSignalGraph().