Click or drag to resize
XDL

XDMBandCalcSubsetHistogram(Int32, Int32, Int32, Int32, Int32, eComplexOutType, Double, Double, Int32, 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 CalcSubsetHistogram(
	int nLevelSub,
	int nX1LZ,
	int nX2LZ,
	int nY1LZ,
	int nY2LZ,
	eComplexOutType complexOutType,
	double dblMin,
	double dblMax,
	int nHistBinSize,
	out ulong[] Hist
)

Parameters

nLevelSub  Int32
[In] 데이터 LOD레벨
nX1LZ  Int32
[In] 영역의 최소 Column 위치값
nX2LZ  Int32
[In] 영역의 최대 Column 위치값
nY1LZ  Int32
[In] 영역의 최소 Row 위치값
nY2LZ  Int32
[In] 영역의 최대 Row 위치값
complexOutType  eComplexOutType
[In] 히스토그램을 계산할 Complex data의 output type
dblMin  Double
[In] 히스토그램 계산을 위한 데이터 최소값. 히스토그램의 첫 구간에 대응
dblMax  Double
[In] 히스토그램 계산을 위한 데이터 최대값. 히스토그램의 마지막 구간에 대응
nHistBinSize  Int32
[In] 히스토그램 구간 개수
Hist  UInt64
[Out] 통계 히스토그램을 반환

Return Value

Boolean
성공이면 true, 실패이면 false
Example
아래의 예제는 밴드 데이터의 전제 영역에 대해 히스토그램을 계산한다. 히스토그램의 구간을 nHistBinSize를 512로 설정한다. 데이터의 최소값(dblMin)을 히스토그램 첫 구간에, 데이터 최대값(dblMax)를 마지막 구간에 대응하도록 조절하여 계산한다.
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;

ulong[] histogram = null;

XDMBand band = xrsFile.GetBandAt(0);
if (Xfn.IsDataTypeComplex(band.DataType))
{
    band.CalcSubsetHistogram(band.GetLevel(), 0, band.XSize - 1, 0, band.YSize - 1, eComplexOutType.Imaginary, 0, 100, 512, out histogram);
}
See Also