RSS/Atom feed Twitter
Site is read-only, email is disabled

viewing Dectris X-ray detector data

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

11 of 11 messages available
Toggle history

Please log in to manage your subscriptions.

viewing Dectris X-ray detector data Halina STANLEY 21 Dec 15:11
  viewing Dectris X-ray detector data Rob Antonishen 22 Dec 13:26
   viewing Dectris X-ray detector data Burnie 22 Dec 20:39
  viewing Dectris X-ray detector data Nicolas Robidoux 22 Dec 20:57
   viewing Dectris X-ray detector data Dov Grobgeld 23 Dec 06:50
   viewing Dectris X-ray detector data stanley@esrf.fr 10 Jan 09:32
    viewing Dectris X-ray detector data Nicolas Robidoux 10 Jan 16:36
viewing Dectris X-ray detector data stanley@esrf.fr 21 Dec 15:14
  viewing Dectris X-ray detector data gg@catking.net 21 Dec 15:39
  viewing Dectris X-ray detector data Mukund Sivaraman 21 Dec 15:40
   viewing Dectris X-ray detector data gg@catking.net 21 Dec 15:48
Halina STANLEY
2011-12-21 15:11:53 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

Hi there

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

http://www.dectris.com/sites/pilatus1m.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

thanks for any replies !

Halina

stanley@esrf.fr
2011-12-21 15:14:46 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

Hi there

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

http://www.dectris.com/sites/pilatus1m.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

thanks for any replies !

Halina

gg@catking.net
2011-12-21 15:39:48 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

On 12/21/11 16:14, stanley@esrf.fr wrote:

Hi there

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

http://www.dectris.com/sites/pilatus1m.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

thanks for any replies !

Halina _______________________________________________

assuming their "TIF" format is tiff, that should be readable in gimp.

If not maybe you could provide a more specific link to what those data formats actually are.

/gg

Mukund Sivaraman
2011-12-21 15:40:00 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

Hi Stanley

On Wed, Dec 21, 2011 at 04:14:46PM +0100, stanley@esrf.fr wrote:

Hi there

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

Don't fork off a new GIMPX project.

GIMP uses a plug-in system to read/write files. You can easily write support for a new file format by creating a plug-in for it.

Use any existing plug-in's source code as an example: http://git.gnome.org/browse/gimp/tree/plug-ins/common/

Plug-ins for PPM, TGA, RAW (raw data, not camera RAW photos), XPM, etc. are rather simple and can be a good foundation to start a new plug-in.

http://developer.gimp.org/plug-ins.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

If you don't need a GUI, you could also try using GEGL for image processing which will give you more precision. GEGL also supports plug-ins, which are called operations in its nomenclature.

http://git.gnome.org/browse/gegl/tree/operations/external/

http://gegl.org/

Kind regards,

Mukund

gg@catking.net
2011-12-21 15:48:34 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

On 12/21/11 16:40, Mukund Sivaraman wrote:

Hi Stanley

On Wed, Dec 21, 2011 at 04:14:46PM +0100, stanley@esrf.fr wrote:

Hi there

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

Don't fork off a new GIMPX project.

GIMP uses a plug-in system to read/write files. You can easily write support for a new file format by creating a plug-in for it.

Use any existing plug-in's source code as an example: http://git.gnome.org/browse/gimp/tree/plug-ins/common/

Plug-ins for PPM, TGA, RAW (raw data, not camera RAW photos), XPM, etc. are rather simple and can be a good foundation to start a new plug-in.

http://developer.gimp.org/plug-ins.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

If you don't need a GUI, you could also try using GEGL for image processing which will give you more precision. GEGL also supports plug-ins, which are called operations in its nomenclature.

http://git.gnome.org/browse/gegl/tree/operations/external/

http://gegl.org/

Kind regards,

Mukund

for repetitive batch processing you could also look at imagemagick which operates from text commands.

If your processing is repetitive this would be a lot more efficient than an interactive interface like gimp.

/gg

Rob Antonishen
2011-12-22 13:26:55 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

http://www.dectris.com/sites/pilatus1m.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

thanks for any replies !

Halina

A quick look at the link provided indicates that these devices produce 20 bit data:
"Dynamic range 20 bits (1:1,048,576)"

Currently GIMP is limited to 8 bits per channel, so it is not likely capable of dealing with these images at this time.

-Rob A>

Burnie
2011-12-22 20:39:09 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

On 12/22/2011 05:26 AM, Rob Antonishen wrote:

I was wondering how easy (?!) it might be to change the GIMP data input/output routines so that instead of reading/writing jpg images "GIMPX" could read/write Dectris X-ray detector format data...

http://www.dectris.com/sites/pilatus1m.html

In fact, we would really only be interested in a very small subset of all the image processing that GIMP can do. For example, certain zones of the 2d detector need to be masked before further data analysis can proceed. The ability to select contiguous regions based on count-rate would be very helpful.

thanks for any replies !

Halina

A quick look at the link provided indicates that these devices produce 20 bit data:
"Dynamic range 20 bits (1:1,048,576)"

Currently GIMP is limited to 8 bits per channel, so it is not likely capable of dealing with these images at this time.

I also noticed this 20-bit range - however, GIMP processes 24 bits per pixel, eight bits of each red, green, and blue.

The 20-bit outputs of the photon counters could be partitioned into three colored data streams; seems likely that the masking and partitioning of the counter data could be handled by an appropriately designed plug-in.

Just reading a TIFF file with 20-bit resolution grayscale probably would not work, as the data probably would be truncated. But don't give up on current GIMP yet. A TIF front-end in a plug-in that properly partitioned might help.

-Rob A>

_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

Nicolas Robidoux
2011-12-22 20:57:57 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

Dear Halina:

Could you please post an example image somewhere?

For example, it would not suprise me if VIPS/NIP2 http://www.vips.ecs.soton.ac.uk/index.php?title=VIPS or ImageMagick http://www.imagemagick.org/ could read it right out of the box.

Dov Grobgeld
2011-12-23 06:50:22 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

In the gimp Dicom plugin, I solved this by calculating the minimum and maximum gray levels and then rescaling these to 8-bit. Very primitive, but if someone just wants to paste an MRI-image of their brain into a larger image it is enough.

A more sophisticated approach is my image viewer, giv, that supports various image pixel depths, including floating point and 32 bit images. Giv has a Contrast tool that allows interactively seeing the histogram and choosing part of it to be displayed in the image. Search for Dicom in the giv manual at http://giv.sourceforge.net/giv/giv.html to see an example. Giv allows plugins so if all you are looking for is to view the image, that might be enough.

(If someone (yes, me included) would feel board on a rainy day, I think it would be cool to add the giv contrast tool to the gimp dicom plugin to allow playing around with the gray levels before committing yourself and choosing a certain window for import. This could be a general way of dealing with high-contrast images).

Regards, Dov

On Thu, Dec 22, 2011 at 22:57, Nicolas Robidoux wrote:

Dear Halina:

Could you please post an example image somewhere?

For example, it would not suprise me if VIPS/NIP2 http://www.vips.ecs.soton.ac.uk/index.php?title=VIPS or ImageMagick http://www.imagemagick.org/ could read it right out of the box.

-- Nicolas Robidoux
Image processing and applied mathematics consultant https://www.ohloh.net/accounts/NicolasRobidoux nicolas.robidoux@gmail.com
_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

stanley@esrf.fr
2012-01-10 09:32:34 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

Hi Nicolas

It's really kind of you to follow this up.

I've put an example data set (raw output from the detector) here: https://docs.google.com/open?id=0B_tFwWNVPR8jOGJlNTIwZDYtNjdlYS00N2E2LTlmZjMtZTQ1MWU0YmM1OWFl

which I hope you can open. The file has a header containing various parameters - some to do with data organisation, others experimental... It starts with:
headSize, ByteOrder, DataType, NbCols, NbRows, epoch, sec, mon, I2, I1, intens, photo (this is a photdiode count not a photograph :-)), p1M, p300k, frleon, voltage, current, bpmy, bpmz, byfwhm, bzfwhm, bintens, T_euro

This is followed by the counts in the channels. These data are from a silver behenate sample that gives circular rings around the direct beam (high intensity) position. The part of the detector in the highest intensity area is protected by a rectangular beam stop. There are a couple of wires visible leading away from this area. In these data the direct beam position is off-set from the centre of the detector.

It ought to look pretty....

thanks again ! best wishes
Halina

Quoting Nicolas Robidoux :

Dear Halina:

Could you please post an example image somewhere?

For example, it would not suprise me if VIPS/NIP2 http://www.vips.ecs.soton.ac.uk/index.php?title=VIPS or ImageMagick http://www.imagemagick.org/ could read it right out of the box.

-- Nicolas Robidoux
Image processing and applied mathematics consultant https://www.ohloh.net/accounts/NicolasRobidoux nicolas.robidoux@gmail.com
_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

Nicolas Robidoux
2012-01-10 16:36:04 UTC (almost 13 years ago)

viewing Dectris X-ray detector data

Daer Halina:

I've put an example data set (raw output from the detector) here: https://docs.google.com/open?id=0B_tFwWNVPR8jOGJlNTIwZDYtNjdlYS00N2E2LTlmZjMtZTQ1MWU0YmM1OWFl

This file (Ag_Be_SAXS_0000.edf_orig) is in .edf (European Data Format http://en.wikipedia.org/wiki/European_Data_Format) format?

Adding the "_orig" postfix to the filename would most likely confuse any reasonably all purpose image processing system.

nicolas