[cctbxbb] CBF compositing

Graeme.Winter at diamond.ac.uk Graeme.Winter at diamond.ac.uk
Mon Dec 3 03:01:39 PST 2012


Hi Frank,

It would be easy to write one, as pycbf is included in there as is some code to unpack the byte-offset compression quickly in iotbx.detectors -

    from iotbx.detectors import ImageFactory

    image = ImageFactory(filename)
    image.read()
    image.get_raw_data()

You would however need to create and pack the data to a new CBF file, which IIRC requires some new additions to the pycbf bindings - I asked Herbert B about this a while back and he needed to make some patches as it was not generally possible. That said, what I was after was creating a full cbf not e.g. miniCBF.

Adding the new version to a live version of cctbx/python is easy enough.

I take it as a given that this is for visualizing - you're not too worried about the image headers? Otherwise this will be somewhat more tricky.

Email from Herbert B follows. It went to the imgCIF mailing list so is public already :o)

Best wishes,

Graeme

-------------


Dear Graeme,

   I have made a new example that uses setters and writes a byte-offset compressed image.  Testing revealed some bugs in the wrapper for some of the setters, so I have also updated the release kit.  The whole thing is  available on the  CBFlib_bleeding_edge svn on sourceforge as well as a release kit

   http://downloads.sf.net/cbflib/CBFlib-0.9.2.6.tar.gz

Please give it a try and take a look at pycbf/pycbf_test4.py for an example of writing a byte-offset CBF.  Let me know if it does what you need.  If not, tell me what is missing or wrong and I'll be happy to fix things and add more pycbf examples to the kit.

   Regards,
     Herbert

P.S.  This was a very useful question because it relate to testing the HDF5 changes.

-----Original Message-----
From: cctbxbb-bounces at phenix-online.org [mailto:cctbxbb-bounces at phenix-online.org] On Behalf Of Frank Murphy
Sent: 01 December 2012 14:22
To: cctbx mailing list
Subject: [cctbxbb] CBF compositing

Hello,

Does anyone have a CCTBX-based method for compositing multiple CBFs to a single image a la merge2cbf?

Thanks in advance,
Frank Murphy



_______________________________________________
cctbxbb mailing list
cctbxbb at phenix-online.org
http://phenix-online.org/mailman/listinfo/cctbxbb

-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 





More information about the cctbxbb mailing list