IDL for Windows and MAC... [message #26778] |
Wed, 26 September 2001 23:20  |
mauricio_maur19
Messages: 1 Registered: September 2001
|
Junior Member |
|
|
Hi:
Sometime ago, I created an image processing software using IDL 5.2
for Windows... That simple widget software, reads a DICOM image (lung
CT images; 2 bytes per pixel), displays it, you could change the color
palette (I used xcolors.pro of David Fanning), and it computes some
statistics from a ROI selected in the image (I used CW_DEFROI
procedure to define the ROI)... That statistics are, for example, the
histogram in a fixed interval, and other values computed with it...
That software in Windows runs very well...
I tried to ran my software using IDL 5.2 for MAC (in a iMAC
computer), but it didn't work ok... It read and displayed the image
well, the ROI is created well... but all the statistics that it
computed, was wrong... The histogram, etc, etc. was wrong... There
exist a problem with little endian-big endian ?... Besides, I tested
an "!ORDER = 1" at the beginning of the software... Then, obviously
the software shows the images rotated, but for what reason if I define
a ROI in the same relative position that with !ORDER = 0, my software
computes different values ?...
Please, send me the answer, urgently...
Thanks in advance...
Mauricio Costa
|
|
|
Re: IDL for Windows and MAC... [message #26850 is a reply to message #26778] |
Fri, 28 September 2001 00:57  |
Martin Downing
Messages: 136 Registered: September 1998
|
Senior Member |
|
|
Hi Gonzalo,
I dont know of any fundamental reasons, most of the time a problem like this
has the simplest solution, so here are some pointers to get you started:
Firstly, the system variable !ORDER just controls the transfer or "painting"
of an image to your screen, it does not change the coordinates of the
display. The keywords in CW_DEFROI control how the display coordinates are
tranlated into image coordinates, (these also include an ORDER keyword).
Make sure all keywords are being set correctly -e.g. if you dont set
IMAGE_SIZE then the function assumes the image and window have the same
dimentions, and the window may be a different size now you have switched
machines/OS.
It is of course possible that when you transferred all your software
routines that now different versions of some routines are being called. The
method of checking what routines are currently compiled and exactly _where_
they live was discussed last week and is simply:
IDL> HELP, /SOURCE_FILES
I would try some simple tests, like seeing whether for example after loading
the image "Print, pixel[10,10]" has the same value on both systems (for the
same image!!). Maybe create test images to test the stats on (checker board
(for min max average) or random normal noise (with known std dev):
checkbd_im = rebin(indgen(2,2),512,512) ;
noise_im = fix((randomn(s,512,512)*10)+100)
maybe save these as dicom on windows then import. If it is still wrong
analyse the roi's values independantly by putting a break in the code.
well you get the idea, at least of what another average user would do :)
good luck!
Martin
!ORDER System Variable
Controls the direction of image transfers when using the TV, TVSCL, and TVRD
procedures. If !ORDER is 0, images are transferred from bottom to top, i.e.
the row with a 0 subscript is written on the bottom. Setting !ORDER to 1,
transfers images from top to bottom.
--
----------------------------------------
Martin Downing,
Clinical Research Physicist,
Orthopaedic RSA Research Centre,
Woodend Hospital, Aberdeen, AB15 6LS.
"Gonzalo Rojas" <rojas_gonzalo@hotmail.com> wrote in message
news:3BB3A216.A82F8987@hotmail.com...
> Hi:
>
> Sometime ago, I created an image processing software using IDL 5.2
> for Windows... That simple widget software, reads a DICOM image (lung CT
> images; 2 bytes per pixel), displays it, you could change the color
> palette (I used xcolors.pro of David Fanning), and it computes some
> statistics from a ROI selected in the image (I used CW_DEFROI procedure
> to define the ROI)... That statistics are, for example, the histogram in
> a fixed interval, and other values computed with it... That software in
> Windows runs very well...
>
> I tried to ran my software using IDL 5.2 for MAC (in a iMAC
> computer), but it didn't work ok... It read and displayed the image
> well, the ROI is created well... but all the statistics that it
> computed, was wrong... The histogram, etc, etc. was wrong... There exist
> a problem with little endian-big endian ?... Besides, I tested an
> "!ORDER = 1" at the beginning of the software... Then, obviously the
> software shows the images rotated, but for what reason if I define a ROI
> in the same relative position that with !ORDER = 0, my software computes
> different values ?...
>
> Please, send me the answer, urgently...
>
> Thanks in advance...
>
>
> Gonzalo Rojas
> Medicine School
> Universidad Catolica de Chile
>
|
|
|