1
$\begingroup$
Import["img.tiff"];
Show[Colorize[ImageAdjust[%, 0, {.00000002, .00000009}],ColorFunction -> "SunsetColors", 
ColorFunctionScaling -> True], Graphics[{Cyan, Thickness -> .003,
Line[{{736.7 + 70*Cos[45*Pi/180],589.5 + 70*Sin[45*Pi/180]}, 
{736.7 + 550*Cos[45*Pi/180],589.5 + 550*Sin[45*Pi/180]}}],Line[{{736.7 + 70*Cos[135*Pi/180], 
589.5 + 70*Sin[135*Pi/180]},{736.7+550*Cos[135*Pi/180],589.5+550*Sin[135*Pi/180]}}],Circle[{736.7, 589.5}, 70, {45*Pi/180, 135*Pi/180}],
Circle[{736.7, 589.5}, 550, {45*Pi/180, 135*Pi/180}]}],
ImageSize -> 400] 

img.tiff can be downloaded from my google drive.

I did this one only for one image, but I want to do same thing for group of images. I want to do same thing for group of images. And images should be display each other

enter image description here

$\endgroup$
8
  • $\begingroup$ The code is syntactically incorrect as many pink brackets and braces in the notebook should indicate to you. Lacking a further description, I cannot tell what you try to achieve here. $\endgroup$ Sep 3, 2018 at 5:46
  • $\begingroup$ @Henrik I try to fixed and edit my question, also I publish what I did, but I could not do same thing for group of images $\endgroup$
    – Rony Saha
    Sep 3, 2018 at 6:02
  • 1
    $\begingroup$ How is the 'group of images' specified? You can Map your procedure on a list of urls or Table. Also, better use img = Import[... and use it rather than %. $\endgroup$
    – Kuba
    Sep 3, 2018 at 13:42
  • $\begingroup$ @Kuba I can import group of images(more then one pictures) by using Map. Problem is apply this graphics to all of those import images together. $\endgroup$
    – Rony Saha
    Sep 3, 2018 at 13:50
  • $\begingroup$ Do you want to display several images next to each other? Perhaps you should check out Inset which allows to place them in the same Graphics. Also the first argument of Show should be a list of Graphics you want to combine, although it often works the way you have used. $\endgroup$
    – Johu
    Sep 3, 2018 at 14:49

1 Answer 1

3
$\begingroup$

As I understand, the goal is to take several images, add a same Graphcis to each one of them and dipslay them all next to each other. Maybe it is not exactly what you need, but perhaps it gets you started and shows you a the Mathematica style a bit.

First I import multiple images

filenamelist = {
   "DTC5C9_Dimer_cool_T127.891C_30.00s_444875_saxs.tiff",
   "DTC5C9_Dimer_cool_T127.891C_30.00s_444875_saxs.tiff",
   "DTC5C9_Dimer_cool_T127.891C_30.00s_444875_saxs.tiff"
   };
imgList = Import /@ filenamelist;

then I manipulate and overlay each one of them before displaying them in a Row

overlay = 
  Graphics[{Cyan, Thickness -> .003, 
    Line[{{736.7 + 70*Cos[45*Pi/180], 
       589.5 + 70*Sin[45*Pi/180]}, {736.7 + 550*Cos[45*Pi/180], 
       589.5 + 550*Sin[45*Pi/180]}}], 
    Line[{{736.7 + 70*Cos[135*Pi/180], 
       589.5 + 70*Sin[135*Pi/180]}, {736.7 + 550*Cos[135*Pi/180], 
       589.5 + 550*Sin[135*Pi/180]}}], 
    Circle[{736.7, 589.5}, 70, {45*Pi/180, 135*Pi/180}], 
    Circle[{736.7, 589.5}, 550, {45*Pi/180, 135*Pi/180}]}];
myColors = 
  Colorize[ImageAdjust[#, 0, {.00000002, .00000009}], 
    ColorFunction -> "SunsetColors", ColorFunctionScaling -> True] &;
Row@Table[

 Show[{myColors@img, overlay}, ImageSize -> 400], {img, imgList}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much, I was looking exactly like this. $\endgroup$
    – Rony Saha
    Sep 3, 2018 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.