Get or Set the data for this matrix

C# | Visual Basic | Visual C++ |
public TDepth[,,] Data { get; set; }
Public Property Data As TDepth(,,)
public: property array<TDepth,3>^ Data { array<TDepth,3>^ get (); void set (array<TDepth,3>^ value); }

The Get function has O(1) complexity.
If the image contains Byte and width is not a multiple of 4. The second dimension of the array might be larger than the Width of this image.
This is necessary since the length of a row need to be 4 align for OpenCV optimization.
The Set function always make a copy of the specific value. If the image contains Byte and width is not a multiple of 4. The second dimension of the array created might be larger than the Width of this image.