Welcome to iraf.net Friday, April 26 2024 @ 06:53 PM GMT


 Forum Index > Help Desk > Misc New Topic Post Reply
 Want to build a dedicated BPM maker
   
Jason Quinn
 08/15/2009 12:32AM (Read 5092 times)  
+++++
Active Member

Status: offline


Registered: 04/07/2006
Posts: 175
Hi, guys. I'm considering to develop a dedicated bad pixel mask generator. I'd like it to be as cross platform as possible. The basic functionality and operation of the program will be the following:1) display a FITS image
2) use the mouse to click and toggle pixels as flagged/not flagged
3) use the mouse to draw regions to toggle pixels
4) a menu bar with obvious operations to flag pixels
5) save the flagged pixels as a FITS imageThe problem is that my GUI programming experience is extremely limited and mostly limited to small Java and TCL applications, and none of them have had functionality that displays and interacts with an image.Is there any advice you can offer as to which language and toolkits could be most appropriate to my endeavor? Or even alert to me a program that does this already if I'm unaware of it.Jason

 
Profile Email
 Quote
fitz
 08/15/2009 12:32AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Jason,There may be some functionality in the DS9 'regions' menu that can be of use, but answers depend on what you mean by 'cross platform'.Basic image display and interaction could be done within a script with standard tasks like DISPLAY and TVMARK, perhaps reading the CL 'imcur' parameter to read image cursors to implement commands to flag pixels or set region types. This would also allow you to use e.g. IMEXPR to create mask values given a threshold value, or some of the many other tasks to deal with masks (see "cl> references mask" for a list). This is of course a script and perhaps a bit clunky, but a PyRAF script might let you add some GUI elements using Tk.The Client-Display Library (CDL) in X11IRAF is a C library that lets you display and mark images on XImtool/DS9, this could be used from a TCL app or wrapped with JNI if you wanted to use Java, but then you're left to implement a lot of the mask making/writing functionality yourself.This sounds like an interesting app and Frank may have some other ideas, if you want to keep things in IRAF then you might consider a number of smaller tasks to do specific things e.g. automate the masking of saturated stars but allow interactive toggling of individual pixels. Hope this helps.Cheers,
-Mike

 
Profile Email
 Quote
Jason Quinn
 08/15/2009 12:32AM  
+++++
Active Member

Status: offline


Registered: 04/07/2006
Posts: 175
[quote:6d348fcc39="fitz"]Hi Jason,There may be some functionality in the DS9 'regions' menu that can be of use, but answers depend on what you mean by 'cross platform'.Basic image display and interaction could be done within a script with standard tasks like DISPLAY and TVMARK, perhaps reading the CL 'imcur' parameter to read image cursors to implement commands to flag pixels or set region types. This would also allow you to use e.g. IMEXPR to create mask values given a threshold value, or some of the many other tasks to deal with masks (see "cl> references mask" for a list). This is of course a script and perhaps a bit clunky, but a PyRAF script might let you add some GUI elements using Tk.The Client-Display Library (CDL) in X11IRAF is a C library that lets you display and mark images on XImtool/DS9, this could be used from a TCL app or wrapped with JNI if you wanted to use Java, but then you're left to implement a lot of the mask making/writing functionality yourself.This sounds like an interesting app and Frank may have some other ideas, if you want to keep things in IRAF then you might consider a number of smaller tasks to do specific things e.g. automate the masking of saturated stars but allow interactive toggling of individual pixels. Hope this helps.Cheers,
-Mike[/quote:6d348fcc39]Thanks for the feedback.I've tried various scenarios in IRAF and always found them too time-consuming. (Could just be the methods I know are inefficient. I will take a closer look at CDL though because I don't know what it is fully capable of.) I am considering situations where it is desired to create hand-generated BPMs for hundreds of images on a weekly basis, and to do so with only a couple hours a pop with minimal stress. I think that sort of production rate is possible with a dedicated, well-designed single purpose program.I'd had this idea in mind for quite some time. The complexity of the program is actually quite low except for the display of the fits image. The GUI design is on my whiteboard but, unfortunately, I never gained proficiency with a GUI toolkit to quickly turn my ideas into a reality. As it stands, I'm learning as I go, which usually results in a project that has to be re-written a few times before it's "made right".I started with the FLTK toolkit and I've made from minor progress. I still have yet to write a FITS display class, which will be the hard part, and I'm just using the native JPG class to get a skeleton program working. I might hop over to Qt or GTK if FLTK can't do what I need.A co-worker also pointed out the existence of a very interesting set of python bindings for ds9 and xpa ( http://code.google.com/p/python-sao/ ). This may or may not be of direct use to me for this purpose but was good to know about in any case.Enjoy your weekend,
Jason

 
Profile Email
 Quote
valdes
 08/15/2009 12:32AM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Creating BPM masks interactively is like a paint program. A nice specialized task like that would be nice. Maybe some interface between a real paint program and creating the mask would be useful.My solution was to make a slightly more specialized version of the older imedit called bpmedit. It was added fairly recently. You should look at it and consider the specializations I found useful. Some of the specializations were actually added to imedit (now called ximedit) such as painting vectors and mask above or below some level.So I would certainly welcome a super convenient BPM painting program but I think bpmedit is reasonable for what I do.Frank Valdes

 
Profile Email
 Quote
   
Content generated in: 0.17 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login