MCPcopy Create free account
hub / github.com/creatale/node-dv / cvStartReadRawData

Function cvStartReadRawData

deps/opencv/modules/core/src/persistence.cpp:3220–3248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3218
3219
3220CV_IMPL void
3221cvStartReadRawData( const CvFileStorage* fs, const CvFileNode* src, CvSeqReader* reader )
3222{
3223 int node_type;
3224 CV_CHECK_FILE_STORAGE( fs );
3225
3226 if( !src || !reader )
3227 CV_Error( CV_StsNullPtr, "Null pointer to source file node or reader" );
3228
3229 node_type = CV_NODE_TYPE(src->tag);
3230 if( node_type == CV_NODE_INT || node_type == CV_NODE_REAL )
3231 {
3232 // emulate reading from 1-element sequence
3233 reader->ptr = (schar*)src;
3234 reader->block_max = reader->ptr + sizeof(*src)*2;
3235 reader->block_min = reader->ptr;
3236 reader->seq = 0;
3237 }
3238 else if( node_type == CV_NODE_SEQ )
3239 {
3240 cvStartReadSeq( src->data.seq, reader, 0 );
3241 }
3242 else if( node_type == CV_NODE_NONE )
3243 {
3244 memset( reader, 0, sizeof(*reader) );
3245 }
3246 else
3247 CV_Error( CV_StsBadArg, "The file node should be a numerical scalar or a sequence" );
3248}
3249
3250
3251CV_IMPL void

Callers 6

cvReadRawDataFunction · 0.85
icvReadSparseMatFunction · 0.85
icvReadImageFunction · 0.85
icvReadSeqFunction · 0.85
icvReadGraphFunction · 0.85
icvReadHistFunction · 0.85

Calls 1

cvStartReadSeqFunction · 0.85

Tested by

no test coverage detected