示例#1
0
        private static void Test_ReadT()
        {
            SWIGTYPE_p_std__istream ifs = Liblas.ReaderFactory.FileOpen(fileT);

            ReaderFactory factory = new ReaderFactory();

            using (Reader reader = factory.CreateWithStream(ifs))
            {
                TestReader.Test_T(reader);

                Header header = reader.GetHeader();
                TestHeader.Test_T(header);

                TestGuid.Test_T(header.GetProjectId());

                VectorVariableRecord vlrs = header.GetVLRs();
                TestVariableRecord.Test_T(vlrs);

                SpatialReference srs = header.GetSRS();
                TestSpatialReference.Test(srs);

                bool ok = reader.ReadPointAt(2);
                Debug.Assert(ok);
                Point pt = reader.GetPoint();
                TestPoint.Test_B2(pt);
            }
            Liblas.ReaderFactory.FileClose(ifs);
        }
示例#2
0
        private static void Test_ReadA()
        {
            ReaderFactory factory = new ReaderFactory();

            SWIGTYPE_p_std__istream ifs = Liblas.ReaderFactory.FileOpen(fileA);

            // the "using" here is required, because it forces the Reader
            // to be disposed before the stream explicitly goes away
            using (Reader reader = factory.CreateWithStream(ifs))
            {
                TestReader.Test_A(reader);

                Header header = reader.GetHeader();
                TestHeader.Test_A(header);

                TestGuid.Test_A(header.GetProjectId());

                VectorVariableRecord vlrs = header.GetVLRs();
                TestVariableRecord.Test_A(vlrs);

                SpatialReference srs = header.GetSRS();
                TestSpatialReference.Test(srs);

                bool ok = reader.ReadPointAt(2);
                Debug.Assert(ok);
                Point pt = reader.GetPoint();
                TestPoint.Test_A2(pt);
            }

            Liblas.ReaderFactory.FileClose(ifs);
        }
示例#3
0
 public override void ReadBinFromStream(SWIGTYPE_p_std__istream arg0)
 {
     VisionLabPINVOKE.__NumYUV161616Image_ReadBinFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#4
0
 public void unserialize(SWIGTYPE_p_std__istream s)
 {
     libtischPINVOKE.smartPtrFeatureBase_unserialize(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(s));
     if (libtischPINVOKE.SWIGPendingException.Pending)
     {
         throw libtischPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#5
0
 public virtual void ReadFromStream(SWIGTYPE_p_std__istream arg0)
 {
     VisionLabPINVOKE.PatternMatcher_Int8_ReadFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#6
0
 public override void ReadAsciiFromStream(SWIGTYPE_p_std__istream arg0)
 {
     VisionLabPINVOKE.NumInt8Pixel_ReadAsciiFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public virtual void ReadAsciiFromStream(SWIGTYPE_p_std__istream arg0)
 {
     VisionLabPINVOKE.Image_ReadAsciiFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public override void ReadFromStream(SWIGTYPE_p_std__istream arg0)
 {
     VisionLabPINVOKE.BlobMatcher_Int32_ReadFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public void InstallCamera(string camName, string camType, SWIGTYPE_p_std__istream arg2, SWIGTYPE_p_std__ostream os)
 {
     VisionLabPINVOKE.VisLibCmdInt_InstallCamera(swigCPtr, camName, camType, SWIGTYPE_p_std__istream.getCPtr(arg2), SWIGTYPE_p_std__ostream.getCPtr(os));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public virtual void Execute(SWIGTYPE_p_std__istream arg0, SWIGTYPE_p_std__ostream os)
 {
     VisionLabPINVOKE.CmdIntCommand_Execute(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0), SWIGTYPE_p_std__ostream.getCPtr(os));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#11
0
 public override void unserialize(SWIGTYPE_p_std__istream s)
 {
     libtischPINVOKE.FeatureVector_unserialize(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(s));
     if (libtischPINVOKE.SWIGPendingException.Pending)
     {
         throw libtischPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#12
0
 public void ReadFromStream(SWIGTYPE_p_std__istream arg0)
 {
     VisionLabPINVOKE.ClassFeatureSet_YUV16_ReadFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
     if (VisionLabPINVOKE.SWIGPendingException.Pending)
     {
         throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
     }
 }
示例#13
0
    public virtual CameraBase Execute(SWIGTYPE_p_std__istream arg0, SWIGTYPE_p_std__ostream os)
    {
        IntPtr     cPtr = VisionLabPINVOKE.CamInstallCmd_Execute(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0), SWIGTYPE_p_std__ostream.getCPtr(os));
        CameraBase ret  = (cPtr == IntPtr.Zero) ? null : new CameraBase(cPtr, false);

        if (VisionLabPINVOKE.SWIGPendingException.Pending)
        {
            throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
示例#14
0
        public static VelocityProfile Read(SWIGTYPE_p_std__istream _is)
        {
            global::System.IntPtr cPtr = kdlPINVOKE.VelocityProfile_Read(SWIGTYPE_p_std__istream.getCPtr(_is));
            VelocityProfile       ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VelocityProfile(cPtr, false);

            if (kdlPINVOKE.SWIGPendingException.Pending)
            {
                throw kdlPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
示例#15
0
        private static void Test_WriteT()
        {
            // read in all the points from A, and write out to a temp file that looks like B

            ReaderFactory factory = new ReaderFactory();

            SWIGTYPE_p_std__istream ifs = Liblas.ReaderFactory.FileOpen(fileB);
            SWIGTYPE_p_std__ostream ofs = Liblas.WriterFactory.FileCreate(fileT);

            using (Reader reader = factory.CreateWithStream(ifs))
            {
                Header rHeader = reader.GetHeader();

                {
                    Header wHeader = new Header(rHeader);
                    {
                        wHeader.SetSystemId("liblas test");
                        wHeader.SetSoftwareId("swig test");
                        wHeader.SetCompressed(true);
                        guid g = new guid("D59B08E7-79EE-47E4-AAE1-2B8DE4B87331");
                        wHeader.SetProjectId(g);
                        wHeader.SetCreationYear(2011);
                        wHeader.SetCreationDOY(12);
                    }
                    {
                        using (Writer writer = new Writer(ofs, wHeader))
                        {
                            while (reader.ReadNextPoint())
                            {
                                Point pt = reader.GetPoint();
                                bool  ok = writer.WritePoint(pt);
                                Debug.Assert(ok);
                            }
                        }
                    }
                }
            }
            Liblas.WriterFactory.FileClose(ofs);
            Liblas.ReaderFactory.FileClose(ifs);
        }
示例#16
0
 public static SWIGTYPE_p_std__istream read_from(SWIGTYPE_p_std__istream s, Dimensions d) {
   SWIGTYPE_p_std__istream ret = new SWIGTYPE_p_std__istream(libtischPINVOKE.read_from__SWIG_5(SWIGTYPE_p_std__istream.getCPtr(s), Dimensions.getCPtr(d)), false);
   if (libtischPINVOKE.SWIGPendingException.Pending) throw libtischPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
示例#17
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_std__istream obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 public virtual void ReadFromStream(SWIGTYPE_p_std__istream arg0) {
   VisionLabPINVOKE.PatternMatcher_Int32_ReadFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public void ReadFromStream(SWIGTYPE_p_std__istream arg0) {
   VisionLabPINVOKE.ClassImageSet_Int8_ReadFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public override void ReadFromStream(SWIGTYPE_p_std__istream arg0) {
   VisionLabPINVOKE.BlobMatcher_Int8_ReadFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
示例#21
0
 internal static HandleRef getCPtr(SWIGTYPE_p_std__istream obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
 public void unserialize(SWIGTYPE_p_std__istream s) {
   libtischPINVOKE.smartPtrFeatureBase_unserialize(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(s));
   if (libtischPINVOKE.SWIGPendingException.Pending) throw libtischPINVOKE.SWIGPendingException.Retrieve();
 }
 public override void ReadBinFromStream(SWIGTYPE_p_std__istream arg0) {
   VisionLabPINVOKE.__NumHSV161616Image_ReadBinFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public override void ReadAsciiFromStream(SWIGTYPE_p_std__istream arg0) {
   VisionLabPINVOKE.__NumInt8Pixel_ReadAsciiFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 public override void unserialize(SWIGTYPE_p_std__istream s) {
   libtischPINVOKE.FeatureVector_unserialize(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(s));
   if (libtischPINVOKE.SWIGPendingException.Pending) throw libtischPINVOKE.SWIGPendingException.Retrieve();
 }
示例#26
0
 public virtual void ReadAsciiFromStream(SWIGTYPE_p_std__istream arg0) {
   VisionLabPINVOKE.Image_ReadAsciiFromStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
 internal static HandleRef getCPtr(SWIGTYPE_p_std__istream obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }