Esempio n. 1
0
//
// ReadPixels()
//
void JLSInputStream::ReadPixels(void* pvoid, LONG cbyteAvailable)
{
	LONG cbytePlane = _info.width * _info.height * ((_info.bitspersample + 7)/8);

	if (cbyteAvailable < cbytePlane * _info.components)
		throw JlsException(UncompressedBufferTooSmall);
 	
	if (_info.ilv == ILV_NONE)
	{
		BYTE* pbyte = (BYTE*)pvoid;
		for (LONG icomp = 0; icomp < _info.components; ++icomp)
		{
			ReadScan(pbyte);
			pbyte += cbytePlane; 
		}	
	}
	else
	{
		ReadScan(pvoid);
	}
}
Esempio n. 2
0
//
// ReadPixels()
//
void JLSInputStream::ReadPixels(void* pvoid, size_t cbyteAvailable)
{

	if (_rect.Width <= 0)
	{
		_rect.Width = _info.width;
		_rect.Height = _info.height;
	}

	int64_t cbytePlane = (int64_t)(_rect.Width) * _rect.Height * ((_info.bitspersample + 7)/8);

	if (int64_t(cbyteAvailable) < cbytePlane * _info.components)
		throw JlsException(UncompressedBufferTooSmall);
 	
	int scancount = _info.ilv == ILV_NONE ? _info.components : 1;

	BYTE* pbyte = (BYTE*)pvoid;
	for (LONG scan = 0; scan < scancount; ++scan)
	{
		ReadScan(pbyte);
		pbyte += cbytePlane;
	}	
}
Esempio n. 3
0
/* Management function to score and filter exons */
void ProcessHSPs(long l1,
                 long l2,
                 int Strand,
                 packExternalInformation* external,
                 packHSP* hsp
                )
{

    /* Fill in the temporary HSP arrays (pre-processing) */
    /* GENIS hack */
    if (SRP)
    {
        if (UTR) {
            printMess("Preprocessing read information: step 1");
            ReadScan(external,hsp,Strand,l1,l2);
        } else {
            printMess("Preprocessing homology information: step 1");
            HSPScan(external,hsp,Strand,l1,l2);
        }

        printMess("Preprocessing homology information: step 2");
        HSPScan2(external,hsp,Strand,l1,l2);
    }
}