comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Is there a way to use C++ code in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is there a way to use C++ code in IDL [message #34201 is a reply to message #34200] Thu, 20 February 2003 10:51 Go to previous messageGo to previous message
CelticBlues is currently offline  CelticBlues
Messages: 10
Registered: February 2003
Junior Member
The file is a home grown tagged file format containing a type of image data
and additional information about the conditions at the time the image was
taken etc. Here is an example of what a simple file may look like:
---------------------------------------------------------
[System]
Name = 1
[End]
[Data Sets] // will be at least one data set, could be as many as 3
DataSet1
[End]
[Files Attributes]
[Conditions File]
[Properties]
Name = 97918.10
CreateTime = Thu Sept 18 1997 at 11:21:36
LastAccessTime = Mon Jan 01 1601
LastModifiedTime = Thu Sept 18 1997 at 11:21:36
Size = 16882000 // bytes
[End]
[Frame information]
Width = 133
Height = 148
[End]
[End] // end [Telemetry File]

[Saved File]
CreateDate = Tue Feb 11 2003 at 16:08:54
Width = 133
Height = 148
FrameNumber = 1
DataUnits = meters
Comment =
CoordinateSystem = UTM // Latlong or UTM
[End]

[End] // end [Files Attributes]

[DataBlock:DataSet1]
R1P1 R1P2...R1P148
R2P1 R2P2...R2P148
.
.
.
R133P1 R133P2...R133P148
[End]

---------------------------------------------------------

R1P1 = Row 1 Pixel 1, R2P1 = Row 2, Pixel 2 etc.

One additional bit of info... the datablock may not actually have CR/NL
after each row, i.e. it may be

[DataBlock:DataSet1]
R1P1 R1P2...R1P148 R2P1 R2P2...R2P148 ... R133P1 R133P2...R133P148
[End]

Ok, assume that I want to rewrite the parser in IDL... From what I
understand it is simple enough to read an ascii table from a file, but what
about reading this type of format?

Ed


"David Fanning" <david@dfanning.com> wrote in message
news:MPG.18beb4cde3551d28989aef@news.frii.com...
> CelticBlues (idluser@celticblues.com) writes:
>
>> I have an ascii data file that I need to read. I already have C++ code
that
>> will parse the file and store it in a structure. Is there a way to
reuse
>> this C++ code in IDL so that I don't have to recode the parse routines?
>
> Yes, there is a way to reuse this code, but learning
> the methods to do it will far surpass (by many orders of
> magnitude) the time it will take (say 5 minutes) to
> learn to parse an ASCII file in IDL. :-)
>
> See Call_External, Make_DLL, LinkImage, etc.
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: howto bind shortcut key to button
Next Topic: Check if coordinate is in array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 08:08:11 PDT 2025

Total time taken to generate the page: 2.24328 seconds