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

Home » Public Forums » archive » How To Display Hinode Fits files Through IDL object Graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How To Display Hinode Fits files Through IDL object Graphics [message #64904] Thu, 29 January 2009 00:39
shahmeet4@gmail.com is currently offline  shahmeet4@gmail.com
Messages: 2
Registered: January 2009
Junior Member
Hello Friends,

I am new to IDL.I am in my 8th semester of computer engineering and am
doing my major project that requires displaying Hinode FITS files that
are actually image files.
I want to display them using IDL object Graphics but it doesn't work
well. If i used the same data array with TV procedure the image gets
displayed, so the data array is fine.

I am attaching my code here ....

; Determine path to file.
imagePath ='C:\RSI\IDL63\meet notes\XRT SOT EIS\Hinode
\darts13590\hinode\sot\level0\2008\03\01\FG
\H1100\FG20080301_111137.6.fits'

; Initialize image parameters.
;imageSize=size(imagePath)

; Open file, read in FITS file , calibrate it and get image data array
in "imageDATA"
fg_prep, imagePath, -1, index, imageData, /despike, /no_darksub;,/
no_badpix

; Initialize window parameters.
xlimit=1024
ylimit=768
offset=30
windowSize = [xlimit+2*offset, ylimit+2*offset]
;windowMargin = offset

; display.
oWindow = OBJ_NEW('IDLgrWindow', RETAIN = 2, $
DIMENSIONS = windowSize, $
TITLE = FILE_BASENAME(imagePath,'.fits') ,UNITS=0)
oView = OBJ_NEW('IDLgrView',LOCATION=[30,30],DIMENSIONS=
[1024,768],UNITS=0)
oModel = OBJ_NEW('IDLgrModel')

; Initialize palette with STD GAMMA-II color table and
; use it to initialize the image object.
oPalette = OBJ_NEW('IDLgrPalette')
oPalette->LOADCT, 3
new_data=congrid(imageData,1024,768)
my_data=BYTSCL(new_data)
oImage = OBJ_NEW('IDLgrImage', my_data, $
PALETTE = oPalette)


TV ,my_data ;WORKS FINE DISPLAYS IMAGE
; Add image to model, which is added to view. Display
; the view in the window.
oModel->Add, oImage
oView->Add, oModel
oWindow->Draw, oView ;DOESN'T SHOW IMAGE

; Cleanup object references.
OBJ_DESTROY, [oView, oPalette]

end



Please Guide me in this context.

Thank You
Meet Shah
[Message index]
 
Read Message
Previous Topic: Re: How to control the order of the objects to draw [using object graphics]
Next Topic: IDL missing date and data

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

Current Time: Fri Oct 10 10:02:02 PDT 2025

Total time taken to generate the page: 3.03757 seconds