Home > Software engineering >  make picture of pixeldata in xml-file
make picture of pixeldata in xml-file

Time:11-23

I use a microscope taking images of particles. I get data out in an xml-file that contain information( see extract of a file) and I wonder if the entry pixel can be used to get the picture that has been taken of the particle. I'm confused if it is pixel data, because some entries also have letters. If it is possible, how can it be done?

<particledata FileVersion="1.0"> <data measurement="2022-09-26 13:31:34.4610 0228 Q" product="EQPT" filter="<<DIAMETER_EQPC >= 1E-5>> AND <<DIAMETER_EQPC <= 0.0002>>"/> <particle frame="181" EQPC="5.92777219475097e-05" FERET_MAX="6.16502327208423e-05" FERET_MIN="5.96099987626077e-05" FERET_MEAN="6.09342368979882e-05" SPHERICITY="0.947197455424963" ASPECT_RATIO="0.966906305650574" CONVEXITY="0.956224350205198"> <image width="30" height="30" pixel="0E0000000100090001000B00070002001000060003001200050004001400040005001600030006001800020007001A00020008001A00010009001C0001000A001C0000000B001D0000000C001D0000000D001E0000000E001E0000000F001E00000010001E00000011001E00000012001D00010013001C00010014001C00010015001C00020016001A00020017001A0003001800180004001900160005001A00140006001B00110008001C000E000A001D000900"/> </particle> <particle frame="439" EQPC="1.75112776854003e-05" FERET_MAX="2.70261182554826e-05" FERET_MIN="1.98699995875359e-05" FERET_MEAN="2.33606593187573e-05" SPHERICITY="0.539453245456778" ASPECT_RATIO="0.735214706000371" CONVEXITY="0.635416666666667"> <image width="12" height="10" pixel="0800000001000500010005000500020005000100010003000100020003000100030009000100040004000600040005000100050005000700050004000000060004000800060002000100070002000800070004000200080001000800080002000B0008000100080009000100"/> </particle>

CodePudding user response:

Though it's an unknown data format, but it seems, a series of integer coordinates (x,y) in 16bit enter image description here enter image description here


I note that there are pixel positions of 0 and 30 in the data, giving a range of 31 pixels, however the image size is given as 30. There is some inconsistency in the input data, or our understanding of it at least. I made the image 1 pixel taller and wider than its dimensions suggest.

  • Related