ClassifyCubeData

Declaration: TRndForest.ClassifyCubeData (const Cube: TMat4D; TimeSlot: integer; ClToProcess: TIntArray; const MetaData: TMetaData; const MaskArray: TBool2DArray; Feedback: boolean): integer;
The method ClassifyCubeData classifies the data cube specified by the parameters Cube and TimeSlot. The array parameter ClToProcess has to contain a list of the classes to be processed (class numbers between 1 and NClasses). As a shortcut for specifying all available classes you can simply pass a NIL value to the parameter ClToProcess.

The parameter MetaData contains the corresponding metadata of the cube. In order to avoid unnecessary (time-consuming) classifications you can define a mask of pixels which are not to be classified by filling in the array MaskArray with TRUE values where the classification should be suppressed. If you do not want to mask out any pixels you can set the parameter MaskArray to NIL. The results of the classification are stored in the property ClassifiedCubeData.

The method provides a progress bar feedback if the parameter Feedback is set to TRUE. Please note that unless the script progress bar is already visible you have to make it visible before calling ClassifyCubeData, otherwise the feedback will not be displayed. You can activate the script progress bar by calling the function ScriptBar(0).

The function returns the following error codes:

 0 ... everything is OK, the Cube data has been classified
-1 ... the minimum size of the Cube is 2 by 2 pixels
-2 ... TimeSlot is out of range
-3 ... the size of the MaskArray does not match the x-y-dimension of Data
-4 ... Metadata and Cube are not compatible

Hint: In order to classify the currently loaded data use RawData and MData as references to the Cube and MetaData parameters.