I have a task which I can perform easily using ImageJ in "point-and-click" mode, but
which I would like to automate, in stages. I'm looking for general guidance on how to approach this - and perhaps sample code from a system that does something similar. This is a query for serious developers willing to help a newbie. The task is to define several piecewise-linear curves (somewhere between 3 and 20) and write the x,y coordinates to a file, for use by other programs. I can do this now, manually - I get a single file of x,y coordinates for every polyline. The cycle is: define polyline, write x,y's to a file. Repeat for each feature. I can write a simple protocol for someone to follow, to keep the features/filenames straight, but it feels very clunky. I want to improve my current method (in stages), to: a) guide the user by prompting for the polyline to enter, and write each one to a file after a single "done" click. (automatically generating filenames) b) collect all of the x,y sequences and write out a .csv file suitable for input to Excel. (only ONE file to output! much less work later!) This will also help enforce constraints among the features. c) (more ambitious, now) assist the user in tweaking the polyline to match the underlying image. The idea here is to use the user input as a guide and relax the polyline to image features. This will vary from polyline to polyline - but seems very do-able (especially since the program can punt and accept the user input if it can't do a better job of localizing the image features). The features are all extended, smooth, linear boundaries where the boundary is very indistinct/jumbled - and some are just at the limits of the imaging setup. They are also "almost parallel" and each feature "informs" the other. The features are "obvious" at the macro level, but very indistinct at the micro level. Some of these features are routinely found now by commercial instruments - others will remain "challenging" for some time, I fear. d) (the eventual goal...which will always be just beyond reach) automatically find and trace all the features - while perhaps giving an observer the opportunity to step in and correct gross errors. All of this seems to involve programmer-level access to ROI's, and direct control of graphics overlay(s). I can do that - but it would be great to have a working copy of a similar system that demonstrates all the mechanisms. I would categorize myself as an expert level Java programmer and image hacker, but relatively ignorant of the inner workings of ImageJ. All clues gratefully accepted. With a lot of luck, I hope to have something that can be demonstrated at Luxembourg. -- Kenneth Sloan [hidden email] |
On Monday 28 Jun 2010 15:03:00 you wrote:
> a) guide the user by prompting for the polyline to enter, and write each > one to a file after a single "done" click. (automatically generating > filenames) b) collect all of the x,y sequences and write out a .csv file > suitable for input to Excel. (only ONE file to output! much less work > later!) This will also help enforce constraints among the features. Not sure if this is what you want, but the above could perhaps be written in a loop that prompts the user to draw the line and calls the WaitForUser function, so the user can now set the line and so on. When one presses OK then macro/code carries forward setting the file name with an increment, save, etc. and loops again for the next curve. Regards Gabriel |
Free forum by Nabble | Edit this page |