Returns specifed element of 3D array
| 1977 | |
| 1978 | // Returns specifed element of 3D array |
| 1979 | CV_IMPL CvScalar |
| 1980 | cvGet3D( 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 |
nothing calls this directly
no test coverage detected