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

Function cvGetReal3D

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

Returns specifed element of 3D array

Source from the content-addressed store, hash-verified

2097
2098// Returns specifed element of 3D array
2099CV_IMPL double
2100cvGetReal3D( const CvArr* arr, int z, int y, int x )
2101{
2102 double value = 0;
2103 int type = 0;
2104 uchar* ptr;
2105
2106 if( !CV_IS_SPARSE_MAT( arr ))
2107 ptr = cvPtr3D( arr, z, y, x, &type );
2108 else
2109 {
2110 int idx[] = { z, y, x };
2111 ptr = icvGetNodePtr( (CvSparseMat*)arr, idx, &type, 0, 0 );
2112 }
2113
2114 if( ptr )
2115 {
2116 if( CV_MAT_CN( type ) > 1 )
2117 CV_Error( CV_BadNumChannels, "cvGetReal* support only single-channel arrays" );
2118
2119 value = icvGetReal( ptr, type );
2120 }
2121
2122 return value;
2123}
2124
2125
2126// Returns specifed element of nD array

Callers

nothing calls this directly

Calls 3

cvPtr3DFunction · 0.85
icvGetNodePtrFunction · 0.85
icvGetRealFunction · 0.85

Tested by

no test coverage detected