need help MS powersation fortran external [message #18507] |
Wed, 05 January 2000 00:00  |
Bill Sanfilipo
Messages: 3 Registered: December 1999
|
Junior Member |
|
|
I'm new to the world of IDL, and the first thing I want
to learn how to do is re-use my fortran via call external.
So I tried compiling/linking the IDL example p112 of
the external development guide (also provided in the
"help" examples, "sum_array") and found that my MS
powerstation fortran (using f77 option) gags on the
mismatch of data types passed in the call statement,
which is in theory supposed to work as arrays passed
via reference. Since the "wrapper" routine with the
array passing scheme seems essential for idl interface,
I don't see how to get around it. The RSI technical
support uses a different compiler/linker with no problem.
Does anyone out there use MS powerstation (running
on win95) to create .dll's (I don't want to use the C
wrapper because I don't even have a C compiler on my system).
thanks, BS
|
|
|
Re: need help [message #19289 is a reply to message #18507] |
Sun, 12 March 2000 00:00  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
Hi Hamid,
I've used class "lookup" etc in a different context (sticking
classification info on a byte image I created myself) -I haven't
actually used "class_doit". But from what I know your code looks
okay. One thing you didn't show though - "num_classes". In your
case this should be 6. (Might seem obvious, but you have to include
the "unclassified" class here.)
I also used it on a 24-bit-colour machine, although I can't see that
making any difference considering the colours you're specifying.
Perhaps try changing the result image to straight byte and checking
that its values are 0..5?
I hope this is of some help,
Cheers
Peter Mason
Hamid Kohen <kohen@jpl.nasa.gov> wrote:
> Does any one know how to use lookup command under envi programming?
>
> for an example I have used it like this ...
>
> class_names = ['Unclassified', 'Glass', 'Cell Walls', 'Nuclei',
> 'Cytoplasm', 'Stroma Blood Vessel']
> lookup = [[0,0,0], [255,255,255],
> [0,0,255],[255,0,0],[0,255,0],[0,125,125]]
>
> ;run the classification
> envi_check_save, /classification
> class_doit, fid=fid, pos=pos, dims=dims, out_name=kmeans_out_name, $
> method=7, r_fid=c_fid, mean=mean, $
> out_bname="Kohonen Classifier", iterations=1, change_thresh=0.1, $
> num_classes=num_classes, lookup=lookup,stdv=stdv, in_memory=0, $
> class_names=class_names, Thresh = ((total(mean)) / nbands) * 1.968
>
> however when I run the program ... classes are colored differently..
> Does anyone know how to use lookup properly ..
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|