/// <summary> /// Initialize DES_Writer object /// </summary> /// <param name="factory"></param> public override void Initialize(PicFactory factory) { // save factory _factory = factory; // build .des file header DES_Header header = new DES_Header(); Box2D bbox = Tools.BoundingBox(factory, 0.0); header._xmin = (float)bbox.XMin; header._xmax = (float)bbox.XMax; header._ymin = (float)bbox.YMin; header._ymax = (float)bbox.YMax; // initialize des writer _desWriter = new DES_WriterMem(header); DES_SuperBaseHeader superBaseHeader = new DES_SuperBaseHeader(); _desWriter.WriteSuperBaseHeader(superBaseHeader); }
/// <summary> /// Initialize DES_Writer object /// </summary> /// <param name="factory"></param> public override void Initialize(PicFactory factory) { // save factory _factory = factory; // build .des file header DES_Header header = new DES_Header(); PicVisitorBoundingBox bbVisitor = new PicVisitorBoundingBox(); factory.ProcessVisitor(bbVisitor); header._xmin = (float)bbVisitor.Box.XMin; header._xmax = (float)bbVisitor.Box.XMax; header._ymin = (float)bbVisitor.Box.YMin; header._ymax = (float)bbVisitor.Box.YMax; // initialize des writer _desWriter = new DES_WriterMem(header); DES_SuperBaseHeader superBaseHeader = new DES_SuperBaseHeader(); _desWriter.WriteSuperBaseHeader(superBaseHeader); }