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

Function cvGet3D

deps/opencv/modules/core/src/array.cpp:1979–1997  ·  view source on GitHub ↗

Returns specifed element of 3D array

Source from the content-addressed store, hash-verified

1977
1978// Returns specifed element of 3D array
1979CV_IMPL CvScalar
1980cvGet3D( const CvArr* arr, int z, int y, int x )
1981{
1982 CvScalar scalar = {{0,0,0,0}};
1983 int type = 0;
1984 uchar* ptr;
1985
1986 if( !CV_IS_SPARSE_MAT( arr ))
1987 ptr = cvPtr3D( arr, z, y, x, &type );
1988 else
1989 {
1990 int idx[] = { z, y, x };
1991 ptr = icvGetNodePtr( (CvSparseMat*)arr, idx, &type, 0, 0 );
1992 }
1993
1994 if( ptr )
1995 cvRawDataToScalar( ptr, type, &scalar );
1996 return scalar;
1997}
1998
1999
2000// Returns specifed element of nD array

Callers

nothing calls this directly

Calls 3

cvPtr3DFunction · 0.85
icvGetNodePtrFunction · 0.85
cvRawDataToScalarFunction · 0.85

Tested by

no test coverage detected