/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.25 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ using System; using System.Runtime.InteropServices; public class Band : MajorObject { private HandleRef swigCPtr; internal Band(IntPtr cPtr, bool cMemoryOwn) : base(gdalPINVOKE.BandUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(Band obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } public override void Dispose() { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; throw new MethodAccessException("C++ destructor does not have public access"); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } public int XSize { get { int ret = gdalPINVOKE.get_Band_XSize(swigCPtr); return ret; } } public int YSize { get { int ret = gdalPINVOKE.get_Band_YSize(swigCPtr); return ret; } } public int DataType { get { int ret = gdalPINVOKE.get_Band_DataType(swigCPtr); return ret; } } public int GetRasterColorInterpretation() { int ret = gdalPINVOKE.Band_GetRasterColorInterpretation(swigCPtr); return ret; } public int SetRasterColorInterpretation(int val) { int ret = gdalPINVOKE.Band_SetRasterColorInterpretation(swigCPtr, val); return ret; } public void GetNoDataValue(SWIGTYPE_p_double val, SWIGTYPE_p_int hasval) { gdalPINVOKE.Band_GetNoDataValue(swigCPtr, SWIGTYPE_p_double.getCPtr(val), SWIGTYPE_p_int.getCPtr(hasval)); } public int SetNoDataValue(double d) { int ret = gdalPINVOKE.Band_SetNoDataValue(swigCPtr, d); return ret; } public void GetMinimum(SWIGTYPE_p_double val, SWIGTYPE_p_int hasval) { gdalPINVOKE.Band_GetMinimum(swigCPtr, SWIGTYPE_p_double.getCPtr(val), SWIGTYPE_p_int.getCPtr(hasval)); } public void GetMaximum(SWIGTYPE_p_double val, SWIGTYPE_p_int hasval) { gdalPINVOKE.Band_GetMaximum(swigCPtr, SWIGTYPE_p_double.getCPtr(val), SWIGTYPE_p_int.getCPtr(hasval)); } public void GetOffset(SWIGTYPE_p_double val, SWIGTYPE_p_int hasval) { gdalPINVOKE.Band_GetOffset(swigCPtr, SWIGTYPE_p_double.getCPtr(val), SWIGTYPE_p_int.getCPtr(hasval)); } public void GetScale(SWIGTYPE_p_double val, SWIGTYPE_p_int hasval) { gdalPINVOKE.Band_GetScale(swigCPtr, SWIGTYPE_p_double.getCPtr(val), SWIGTYPE_p_int.getCPtr(hasval)); } public int GetOverviewCount() { int ret = gdalPINVOKE.Band_GetOverviewCount(swigCPtr); return ret; } public Band GetOverview(int i) { IntPtr cPtr = gdalPINVOKE.Band_GetOverview(swigCPtr, i); Band ret = (cPtr == IntPtr.Zero) ? null : new Band(cPtr, false); return ret; } public int Checksum(int xoff, int yoff, SWIGTYPE_p_int xsize, SWIGTYPE_p_int ysize) { int ret = gdalPINVOKE.Band_Checksum(swigCPtr, xoff, yoff, SWIGTYPE_p_int.getCPtr(xsize), SWIGTYPE_p_int.getCPtr(ysize)); return ret; } public void ComputeRasterMinMax(int approx_ok) { gdalPINVOKE.Band_ComputeRasterMinMax(swigCPtr, approx_ok); } public int Fill(double real_fill, double imag_fill) { int ret = gdalPINVOKE.Band_Fill(swigCPtr, real_fill, imag_fill); return ret; } public int ReadRaster(int xoff, int yoff, int xsize, int ysize, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize, SWIGTYPE_p_int buf_type) { int ret = gdalPINVOKE.Band_ReadRaster(swigCPtr, xoff, yoff, xsize, ysize, SWIGTYPE_p_int.getCPtr(buf_xsize), SWIGTYPE_p_int.getCPtr(buf_ysize), SWIGTYPE_p_int.getCPtr(buf_type)); return ret; } public int WriteRaster(int xoff, int yoff, int xsize, int ysize, int buf_len, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize, SWIGTYPE_p_int buf_type) { int ret = gdalPINVOKE.Band_WriteRaster(swigCPtr, xoff, yoff, xsize, ysize, buf_len, SWIGTYPE_p_int.getCPtr(buf_xsize), SWIGTYPE_p_int.getCPtr(buf_ysize), SWIGTYPE_p_int.getCPtr(buf_type)); return ret; } public void FlushCache() { gdalPINVOKE.Band_FlushCache(swigCPtr); } public ColorTable GetRasterColorTable() { IntPtr cPtr = gdalPINVOKE.Band_GetRasterColorTable(swigCPtr); ColorTable ret = (cPtr == IntPtr.Zero) ? null : new ColorTable(cPtr, false); return ret; } public int SetRasterColorTable(ColorTable arg) { int ret = gdalPINVOKE.Band_SetRasterColorTable(swigCPtr, ColorTable.getCPtr(arg)); return ret; } }