|
XDMBandSetBandMin Method
|
영상 데이터 DN 최소값을 설정한다.(NullValue는 제외한다.)
영상의 데이터 타입이 Complex 타입일 경우, Complex output type에 해당하는 최소값을 설정한다.
Complex output type을 Magnitude로 설정하면 val값은 BandMin에 설정된다.
Complex output type을 Real, Imaginary, Phase중 하나로 설정하면 각 output type에 해당하는 최소값을 설정할 수 있다.
Namespace: Pixoneer.NXDL.NRSAssembly: NXDLrs (in NXDLrs.dll) Version: 3.0.0.1
Syntaxpublic void SetBandMin(
double val,
eComplexOutType type
)
Parameters
- val Double
- 영상 데이터 DN 최소값
- type eComplexOutType
- Complex 데이터의 output type
Examplestring 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;
XDMComposite newComp = new XDMComposite();
newComp.Mode = eCompMode.Gray;
XDMBand band = xrsFile.GetBandAt(0);
XDMBand compBand = band;
if (Xfn.IsDataTypeComplex(band.DataType))
{
XBandParamComplex paramComplex = new XBandParamComplex();
paramComplex.OutputType = eComplexOutType.Real;
paramComplex.SrcBand = band;
XDMBandComplex bandComplex = new XDMBandComplex();
if (bandComplex.SetInputParam(ref paramComplex))
{
double min = band.GetBandMin(paramComplex.OutputType);
double max = band.GetBandMax(paramComplex.OutputType);
double mean = band.GetBandMean(paramComplex.OutputType);
double stddev = band.GetBandStdDev(paramComplex.OutputType);
ulong[] histogram = band.GetHistogram(paramComplex.OutputType);
bandComplex.SetBandMin(min, paramComplex.OutputType);
bandComplex.SetBandMax(max, paramComplex.OutputType);
bandComplex.SetBandMean(mean, paramComplex.OutputType);
bandComplex.SetBandStdDev(stddev, paramComplex.OutputType);
bandComplex.SetHistogram(histogram, paramComplex.OutputType);
compBand = bandComplex;
}
}
else
{
compBand = band;
}
newComp.SetBand(ref compBand, 0);
newComp.SetCutType(eCompCutType.Ct98, 0);
newComp.SetStretchCoverage(eCompStretchCoverage.Band, 0);
newComp.SetStretchType(eCompStretchType.Linear, 0);
newComp.SetTransparentValue(0.0, 0);
newComp.ApplyTransparent = true;
nxImageLayerComposites.Lock();
XDMCompManager xdmCompManager = nxImageLayerComposites.GetXDMCompManager();
xdmCompManager.AddXDMComposite(ref newComp);
nxImageLayerComposites.UnLock();
nxImageLayerComposites.ZoomFit();
See Also