|
-
Dec 25th, 2001, 07:30 AM
#1
Thread Starter
Lively Member
Troublesome picture
Hello to all api gurus.
I have a problem here that have been giving me a headache for the pass few months now.
I want to print out an image stored in a fits file. Fits or Flexible Image Transport System contains quite a long header which ends with the word "END" and then followed by a 16 bit grayscale image. I need to display this image out on a picturebox but has not been successful so far. I was told it could be done with API functions but i am not an API expert.
So sorry that i cant attach any fits file cause its too large around 300 k.
But there are plenty here that will give u a better idea of what it is
http://www.telescope.org/rti/examples/index.html
Pleasee help me out. I really need it.
-------------------------------------------------------------------------------
VB RuLeS
-
Dec 26th, 2001, 01:23 PM
#2
Okay.
I investigated the FITS format - it was interesting. First off, the graphics in a FITS file can be different types, all seem to be raster images using one of 5 different datatypes in an array. The images ARE NOT necessarily windows compatible. You have to read the FITS header information to figure out how to open & read the graphics. api will not solve your problem. You will have to write a FITS viewer application from scratch, or copy one. There is no magic bullet to solve your problem.
But I did find this:
http://www.sira.it/msb/avis.htm
The page is for a utility that will convert FITS graphics to BMP files.
AVIS FITS viewer. Everything there is freeware. Chances are good that is was written in C++. There is an email contact.
If it was written in VB, he may share some code with you. I cannot say.
However.
You can open the app in VB (shell), use SendMessage to control what the app does, and get it to open a FITS file, then EXPORT the file to a format you can handle in VB, like BMP. This is a poor work around, but if you must use your own app to view files, this is about your only choice.
-
Dec 26th, 2001, 01:40 PM
#3
Here is sourcecode for a dll (written in C++). If you know somebody who has Visual C++, get them to compile it for you.
It creates a .dll that you can use to view FITS files from VB.
http://www.projectpluto.com/get_dss.htm#what_oses
-
Dec 26th, 2001, 02:05 PM
#4
Thread Starter
Lively Member
thanks for the help
i will try to compile the dll
u saved my life
-
Dec 26th, 2001, 02:19 PM
#5
Thread Starter
Lively Member
wow....so many files
would u happen to know how to use the get_dss.dll with vb after compiling ?
-
Dec 26th, 2001, 02:38 PM
#6
I haven't read the code. If you read the
get_dss.def
file, it lists the functions that are exported by the dll. Go into the C code and look at the function prototype (or header) for each of the exported functions.
That will show you how to call the dll functions.
-
Dec 26th, 2001, 02:45 PM
#7
Thread Starter
Lively Member
do you think its possible to read in the 16 bit greyscale values from the fits image and display it using code ?
i tried to compile the dll but there seems to be a lot of errors.
-
Dec 26th, 2001, 02:53 PM
#8
Thread Starter
Lively Member
i have finally compiled the dll file
would it be too much to ask if u could teach me how to use it ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|