Generate multiple cell image from Marview View?

User 9d72be7cd4

19-11-2007 21:01:08

What would be the best method to programmatically create an image of all molecules in an Mview pane (ie, all cells)?





Here is what we're doing:





We've integrated Marvin with our java-based electronic notebooks. Molecules for reactants and reaction products are shown in two mview panes (one for reactants, another for reaction products).





We want to create a printed summary, and so need to generate two images, one for all reactants, another for all reaction products, and pass this to a form in our application to print with other relevant data (ie, protocol, materials list, labor totals, etc.).





Currently, I'm setting it up to process each cell individually, grab and generate an image, store all these temporarily, then use HTML to format / layout the structure images in preparation for printing.





Then, though...there has to be an easier way.





Is there? what would be a good method to generate a displayable (printable) image / output from a mview pane that can be passed to other applications to print with other data?





Any thoughts? ideas?





Thanks!





NCM


FSCI

User 9d72be7cd4

19-11-2007 21:19:35

Ok...I found I can use a java get image method from our application and Marvin will return the full Mview "image" of all cells.








But, would like to know what the best way (working within Marvin itself) to create an image from multiple mview cells would be:





Grabbing each individually and use toBinFormat





or use MolPrinter to some extent.





Any examples on how to create an image of a series of 3-4 molecules that are currently displayed in mview?





Thanks!


NCM

User 9d72be7cd4

19-11-2007 23:25:26

Well, the java getImage method returns a very low quality image. Our larger molecules need a better resolution.





so, still looking for ideas on how to create a nice, printable image from all the cells in an Mview pane ( 150dpi).





Thanks for any information,





NCM


FSCI

ChemAxon 7c2d26e5cf

21-11-2007 20:25:18

Can you show an example where the image quality is not enough good?


I can not suggest a better way to grab the full grid than hacking the print process. Currently, there is no API for saving the view table.


By the way, we are working on a new table render system (JTable based).


I believe that saving the table content with the new system will be easier.

User 9d72be7cd4

05-12-2007 22:13:23

Our marvinview bean is roughly 450 x 150 in the application. It can load up to 4 molecules in a row... so each about 110 x 150.





Taking a getImage of these, and the result is not sufficient for printing or PDF's (ie, electronic notebooks, etc.) - ie, resolution is not good. If there was an API call to generate a image from ALL molecules in the view pane, that would be perfect - toBinFormatFromTable?





We've worked around it by redirecting to a page with a 4000 x 1000 marviewview pane, using the getimage then creates an image at a good resolution. We place that image in our printform, so users are none the wise (although it takes about 1.5 sec. extra to print our mixed form with custom fields, the images generated via the view pane, etc.)





The other options we've looked at is iterating through the molecules, and generating individual images from each (using toBinFormat with parameters to generate good resolution), then just stringing these together via HTML to send to our print form.





There are some difficulties with this, however, within our application, and so we'll continue to try things as we have time.





NCM


FSCI

ChemAxon 7c2d26e5cf

06-12-2007 16:41:25

Thanks for sharing your experience.


In the writting of the new table render system, we are going to regard creating a good quality image from the grid in all cases.