Results 1 to 8 of 8

Thread: Troublesome picture

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87

    Angry 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

  2. #2
    jim mcnamara
    Guest
    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.

  3. #3
    jim mcnamara
    Guest
    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

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87
    thanks for the help
    i will try to compile the dll


    u saved my life

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87
    wow....so many files
    would u happen to know how to use the get_dss.dll with vb after compiling ?

  6. #6
    jim mcnamara
    Guest
    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.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87
    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.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87
    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
  •  



Click Here to Expand Forum to Full Width