Re: Extracting image profile? [message #1179] |
Tue, 06 July 1993 02:56 |
martin
Messages: 18 Registered: January 1993
|
Junior Member |
|
|
Thanks to all those who responded to my original query...as I suspected,
the solution to my problem was pretty simple and straightforward.
Martin Black
|
|
|
Re: Extracting image profile? [message #1190 is a reply to message #1179] |
Fri, 02 July 1993 07:37  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <1993Jul1.151614.13789@ousrvr.oulu.fi> martin@phoenix.oulu.fi (Martin Black) writes:
> Being a fairly novice IDL user, I haven't been able to figure out how
> to extract an arbitrary profile of data values (as opposed to pixel values)
> from an image. The routine PROFILE returns pixel values (i.e., numbers in
> the range 0-255), but what I want is the actual values of the underlying
> data. Can anyone help me out?
>
> Thanks,
> Martin Black
> martin@hiisi.oulu.fi
In general once you display an image on the screen you have lost the
information about the underlying data, and so you can only retrieve the
screen data values.
I have written a routine called IMG_SCL which is like TVSCL but does the
following:
- By default it zooms and centers the image to maximally fill the
window.
- One can specify the minimum and maximum values (i.e. black and white
values)
- One can explictly set zoom values in X and Y and centering
information.
- It copies the input ("raw data") to a common block where my own
version of a routine like PROFILE can get at it. Then when I extract
profiles I can get back the original "RAW" data values, not just the
screen pixel values.
- It allows zooming by pixel replication or by interpolation.
If interested I can mail you the required routines.
--
Mark Rivers (516) 282-7708 or 5626
Building 815 rivers@bnlx26.nsls.bnl.gov (Internet)
Brookhaven National Laboratory rivers@bnl (Bitnet)
Upton, NY 11973 BNLX26::RIVERS (Physnet)
|
|
|
Re: Extracting image profile? [message #1194 is a reply to message #1190] |
Fri, 02 July 1993 06:24  |
dieh2133
Messages: 11 Registered: December 1992
|
Junior Member |
|
|
PROFILES will do it if used like this:
byt=bytscl((dat),min=(mini),max=(maxi),top=30)
tv,byt,px(0),py(0)
profiles,dat,sx=px(0),sy=py(0)
--
Mit freundlichen Gruessen
Rolf Diehl.
____________________________________________________________ _________
|Dipl.-Ing. Rolf Diehl, TU Berlin, Institut fuer technische Akustik |
|Tel 030-314-22889, Fax -23222, dieh2133@files1zrz.zrz.tu-berlin.de |
|___________________________________________________________ ________|
|
|
|
Re: Extracting image profile? [message #1195 is a reply to message #1194] |
Fri, 02 July 1993 06:20  |
dieh2133
Messages: 11 Registered: December 1992
|
Junior Member |
|
|
profiles will show the real values if used like this
byt=bytscl((dat)........)
tv,byt,px(0),py(0)
profiles,dat,sx=px(0),sy=py(0)
I that is what You wanted.
--
Mit freundlichen Gruessen
Rolf Diehl.
____________________________________________________________ _________
|Dipl.-Ing. Rolf Diehl, TU Berlin, Institut fuer technische Akustik |
|Tel 030-314-22889, Fax -23222, dieh2133@files1zrz.zrz.tu-berlin.de |
|___________________________________________________________ ________|
|
|
|
Re: Extracting image profile? [message #1196 is a reply to message #1195] |
Fri, 02 July 1993 05:48  |
add
Messages: 3 Registered: May 1993
|
Junior Member |
|
|
In article <1993Jul1.151614.13789@ousrvr.oulu.fi>, martin@phoenix.oulu.fi
(Martin Black) wrote:
>
> Being a fairly novice IDL user, I haven't been able to figure out how
> to extract an arbitrary profile of data values (as opposed to pixel values)
> from an image. The routine PROFILE returns pixel values (i.e., numbers in
> the range 0-255), but what I want is the actual values of the underlying
> data. Can anyone help me out?
>
> Thanks,
> Martin Black
> martin@hiisi.oulu.fi
How about just grabbing a slice of your image into another
variable. Ex,
IDL>help,img
IMG FLOAT = Array(512,512)
IDL>slice=img(*,128)
IDL>plot,slice
This will give you a plot of all of the 'x' values in line
128 (center line) of your image.
You could now write a very simple procedure to do this
using the CURSOR command to determine either the 'x' or 'y'
line you would like to plot.
\ | /
Al Ducharme \|/
--------------------------------------------------------*---
/|\
"Science is a cruel mistress!" / | \
-Unknown
|
|
|