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

Search Toolkit Book for CBlastHitMatrix

This class displays the image of the hitmatrix view for blast 2 seq results. More...

#include "blast_hitmatrix.hpp"
(Private to src/gui/app/blastfmt.)

+ Collaboration diagram for CBlastHitMatrix:

Public Member Functions

 CBlastHitMatrix (const list< CRef< CSeq_align > > &seqAligns, int height=600, int width=800, CImageIO::EType format=CImageIO::ePng, const string &font_path="")
 Constructor. More...
 
 ~CBlastHitMatrix ()
 Destructor. More...
 
void SetFileName (string fileName)
 Inits file name if image is written to the file. More...
 
void SetThumbnail (bool set)
 Indicates that thumbmail should be shown. More...
 
bool IsFileOut (void)
 Checks if image is to be written to the file. More...
 
string GetNetcacheID (void)
 Get netcache ID for the image stored in netcache. More...
 
string GetErrorMessage (void)
 Get error message. More...
 
bool Display (CNcbiOstream &out)
 Outputs the image into CNcbiOstream. More...
 
bool WriteToFile (void)
 Outputs the image into the file (m_FileOut=true) or netcache. More...
 

Protected Member Functions

void x_InitObjectManager ()
 Initializes Object Manager. More...
 
void x_InitPort ()
 Initializes CGlPane. More...
 
void x_GetLabels (void)
 Creates Query and subject labels info. More...
 
bool x_RenderImage (void)
 Renders a pairwise alignments between the first two Seq-id in the alignment. More...
 
void x_PreProcess (void)
 Performs pre-processing for image rendering. More...
 
void x_Render (void)
 Inits renderer display options and text labels. More...
 
void x_InitGraphics (const string &font_path="")
 Initialize rendering environment. More...
 

Private Attributes

CRef< CObjectManagerm_ObjMgr
 Object manager. More...
 
CRef< CScopem_Scope
 Current scope. More...
 
vector< CConstRef< CSeq_align > > m_Aligns
 Vector of seqaligns. More...
 
string m_QueryID
 Query label id. More...
 
string m_SubjectID
 Subject label id. More...
 
string m_File
 File name. More...
 
bool m_FileOut
 true if output to the file More...
 
bool m_Thumbnail
 
int m_Height
 Image height. More...
 
int m_Width
 Image width. More...
 
CImageIO::EType m_Format
 Image format (png,bmp etc) More...
 
string m_ImageKey
 netcacheID More...
 
string m_ErrorMessage
 Error message. More...
 
CIRef< IHitMatrixDataSourcem_DataSource
 Renderer setup Parameter. More...
 
CGlPane m_Port
 Renderer setup Parameter. More...
 
unique_ptr< CHitMatrixRendererm_Renderer
 Renderer setup Parameter. More...
 
CRef< CGlOsContextm_Context
 CGlOsContext context. More...
 

Detailed Description

This class displays the image of the hitmatrix view for blast 2 seq results.

Usage: blastHitMatrix = new CBlastHitMatrix(...); If displasy on the screen blastHitMatrix->Dispaly(out) If write to the file: blastHitMatrix->SetFileName(<filename>) blastHitMatrix->WriteToFile()

This class displays the defline for BLAST result.

Example:

blastHitMatrix = new CBlastHitMatrix(...);
If display on the screen:
string encoding("image/png");
CCgiResponse& response = ctx.GetResponse();
response.SetContentType(encoding);
response.WriteHeader();
blastHitMatrix->Display(response.out());
If write to the file:
blastHitMatrix->SetFileName(<filename>)
blastHitMatrix->WriteToFile()
CS_CONTEXT * ctx
Definition: t0006.c:12
CBlastHitMatrix(const list< CRef< CSeq_align > > &seqAligns, int height=600, int width=800, CImageIO::EType format=CImageIO::ePng, const string &font_path="")
Constructor.
CNcbiOstream & out(void) const
Get output stream. Throw exception if GetOutput() is NULL.
Definition: ncbicgir.cpp:257
void SetContentType(const string &type)
Set content type (text/html by default if not provided)
Definition: ncbicgir.hpp:337
CNcbiOstream & WriteHeader(void) const
Write HTTP response header to the output stream.
Definition: ncbicgir.hpp:396
FILE * file

Definition at line 83 of file blast_hitmatrix.hpp.


The documentation for this class was generated from the following files:
Modified on Sat Jun 15 11:53:19 2024 by modify_doxy.py rev. 669887