Home | History | Annotate | Download | only in src

Lines Matching refs:slice

609 cvSliceLength( CvSlice slice, const CvSeq* seq )
612 int length = slice.end_index - slice.start_index;
616 if( slice.start_index < 0 )
617 slice.start_index += total;
618 if( slice.end_index <= 0 )
619 slice.end_index += total;
621 length = slice.end_index - slice
639 cvCvtSeqToArray( const CvSeq *seq, void *array, CvSlice slice )
653 total = cvSliceLength( slice, seq )*elem_size;
659 CV_CALL( cvSetSeqReaderPos( &reader, slice.start_index, 0 ));
1841 cvSeqSlice( const CvSeq* seq, CvSlice slice, CvMemStorage* storage, int copy_data )
1864 length = cvSliceLength( slice, seq );
1865 if( slice.start_index < 0 )
1866 slice.start_index += seq->total;
1867 else if( slice.start_index >= seq->total )
1868 slice.start_index -= seq->total;
1870 ((unsigned)slice.start_index >= (unsigned)seq->total && length != 0) )
1871 CV_ERROR( CV_StsOutOfRange, "Bad sequence slice" );
1878 cvSetSeqReaderPos( &reader, slice.start_index, 0 );
1921 // Remove slice from the middle of the sequence.
1924 cvSeqRemoveSlice( CvSeq* seq, CvSlice slice )
1935 length = cvSliceLength( slice, seq );
1938 if( slice.start_index < 0 )
1939 slice.start_index += total;
1940 else if( slice.start_index >= total )
1941 slice.start_index -= total;
1943 if( (unsigned)slice.start_index >= (unsigned)total )
1944 CV_ERROR( CV_StsOutOfRange, "start slice index is out of range" );
1946 slice.end_index = slice.start_index + length;
1948 if( slice.end_index < total )
1956 if( slice.start_index > total - slice.end_index )
1958 int i, count = seq->total - slice.end_index;
1959 cvSetSeqReaderPos( &reader_to, slice.start_index );
1960 cvSetSeqReaderPos( &reader_from, slice.end_index );
1969 cvSeqPopMulti( seq, 0, slice.end_index - slice.start_index );
1973 int i, count = slice.start_index;
1974 cvSetSeqReaderPos( &reader_to, slice.end_index );
1975 cvSetSeqReaderPos( &reader_from, slice.start_index );
1985 cvSeqPopMulti( seq, 0, slice.end_index - slice.start_index, 1 );
1990 cvSeqPopMulti( seq, 0, total - slice.start_index );
1991 cvSeqPopMulti( seq, 0, slice.end_index - total, 1 );