ClassifiedCubeDataAs3DArray

Declaration: TRndForest.ClassifiedCubeDataAs3DArray: TDouble3DArray;
The readonly property ClassifiedCubeDataAs3DArray returns a pointer to the results of the classification of the data cube classified by ClassifyCubeData. The layers of the returned array are the classified images.

Please note that the returned array has zero-based indices, i.e. the indices for x and y run from 0 to Cube.NrOfColumns-1 and 0 to Cube.NrOfRows-1, respectively (with Cube being the data matrix used in ClassifyCubeData). The index of the class layers runs from 0 to NClasses-1. Trying to access any element outside the valid range will result in an "out of range" error.

Hint: In order to process a particular class layer you should use the function Copy3DLayerToMatrix to copy the layer into a two-dimensional array. The following code snippet shows how to classify the currently loaded data (accessible via the global variables RawData and MData) and adds an image of class 1 to the image repository:
var
  MskArr    : TBool2DArray;
  imgmat    : TDouble2DArray;
  RF        : TRndForest;
...
...
...
  ResizeBoolMatrix (MskArr, MData.SizeX, MData.SizeY);
  FillBoolMatrix (MskArr, false);
  RF.ClassifyCubeData (RawData, 1, MData, MskArr);
  ResizeMatrix (imgmat, MData.SizeX, MData.SizeY);
  Copy3DLayerToMatrix (RF.ClassifiedCubeDataAs3DArray, 0, imgmat); // class 1 = index 0
  AddImgToRepository (imgmat, 0, 0, 'Class 1', '');
...