# Repeatedly applying a function

I have writing a code in order to get pixel values of a image along a line. I want to repeatedly to apply the function to the image to get pixel values along multiple lines. My question is how can create such loop in mathematica.

IMGV1 = ImageValue[img, Table[{i, 1111}, {i, 300, 2451, 0.5}]];
IMGV2 = ImageValue[img, Table[{i, 1112}, {i, 300, 2451, 0.5}]];
IMGV3 = ImageValue[img, Table[{i, 1113}, {i, 300, 2451, 0.5}]];
IMGV4 = ImageValue[img, Table[{i, 1114}, {i, 300, 2451, 0.5}]];
IMGV5 = ImageValue[img, Table[{i, 1115}, {i, 300, 2451, 0.5}]];
IMGV6 = ImageValue[img, Table[{i, 1116}, {i, 300, 2451, 0.5}]];

• It sounds highly unlikely that you'll do better than a built-in function. What exactly do you want to achieve, and how exactly do you need your output to look like? (Keep this in mind, by the way.) – Emilio Pisanty Aug 9 '16 at 13:21
• Not sure I completely understand. Can't you just do {IMGV1,IMGV2,....}=Table[ImageValue[img,Table[{i,j}....]],{j,1111,...}]? – Feyre Aug 9 '16 at 13:25
• @Feyre, Yes, you are right I can create multiple variables with iterated names and assign them with each tuple. – Ji Daoyuan Aug 9 '16 at 13:52
• Have you seen ImageData and ImageTake? – Michael E2 Aug 9 '16 at 14:13
• @Feyre. I would do Evaluate[Array[IMGV, 6]] = Table[ImageValue[img, Table[{i, j} ....]], {j, 1111, ...}] instead so that OP can indexed variables that can actually be operated on using Table, Map, etc. – march Aug 9 '16 at 15:39