Click or drag to resize
XDL

XDMBandCalcSubsetStatistics(Int32, Int32, Int32, Int32, Int32, eComplexOutType, Double, Double, Double, Double, UInt64) Method

LOD 레벨값과 영역정보에 대한 영상 데이터 통계값을 산출한다. 밴드 데이터 타입이 Complex 타입일 경우 사용한다.
complexOutType이 Real, Imaginary, Phase, Mgnitude일 경우, 각 output type에 해당하는 데이터 통계값을 산출한다. Complex는 통계값을 산출하지 않는다.

Namespace: Pixoneer.NXDL.NRS
Assembly: NXDLrs (in NXDLrs.dll) Version: 3.0.0.1
Syntax
C#
public bool CalcSubsetStatistics(
	int LevelSub,
	int X1LZ,
	int X2LZ,
	int Y1LZ,
	int Y2LZ,
	eComplexOutType complexOutType,
	ref double min,
	ref double max,
	ref double mean,
	ref double std,
	ref ulong[] Hist
)

Parameters

LevelSub  Int32
[In] 이미지 LOD레벨.
X1LZ  Int32
[In] 영역의 최소 Column 위치값.
X2LZ  Int32
[In] 영역의 최대 Column 위치값.
Y1LZ  Int32
[In] 영역의 최소 Row 위치값.
Y2LZ  Int32
[In] 영역의 최대 Row 위치값.
complexOutType  eComplexOutType
[In] 통계값을 계산할 Complex data의 output type.
min  Double
[Out] 통계 최소값을 반환.
max  Double
[Out] 통계 최대값을 반환.
mean  Double
[Out] 통계 평균값을 반환.
std  Double
[Out] 통계 표준편차값을 반환.
Hist  UInt64
[Out] 통계 히스토그램을 반환.

Return Value

Boolean
성공이면 true, 실패이면 false
Example
C#
string strError;
XRasterIO rasterIO = new XRasterIO();
if (rasterIO.Initialize(out strError) == false)
    return;

string strPath = @"F:\SAMPLE_IMAGE\ComplexData.tif";
XRSLoadFile xrsFile = rasterIO.LoadFile(strPath, out strError, false, eIOCreateXLDMode.All_NoMsg, false, 0, null);
if (xrsFile == null) return;

double min, max, mean, stddev;
min = max = mean = stddev = 0;
ulong[] histogram = new ulong[256];

XDMBand band = xrsFile.GetBandAt(0);
if (Xfn.IsDataTypeComplex(band.DataType))
{
    band.CalcSubsetStatistics(band.GetLevel(), 0, band.XSize - 1, 0, band.YSize - 1, eComplexOutType.Imaginary, ref min, ref max, ref mean, ref stddev, ref histogram);
}
See Also