SHARE
TWEET

Untitled

a guest Jun 11th, 2014 20 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. im= Import["C:\Research\Pictures\FloridaPowerGrid.jpg"];
  2. Module[{picturesize,i,bigger,imagesizes},
  3. picturesize={1038, 1386};
  4. values={};
  5. i=1;
  6. imagesizes=ImageDimensions[im];bigger=1;
  7. DynamicModule[{pt={0,0}},
  8. If[imagesizes[[1]]<imagesizes[[2]], bigger=2];
  9. TableForm@{
  10.         Button["Record!",AppendTo[values,{i,pt}];i++;],
  11.         LocatorPane[
  12.                 Dynamic@pt,
  13.                 Dynamic@Graphics[
  14.                         Join[
  15.                                 {Inset[im,{0,0},{0,0},{1,1}]}
  16.                                 ,Flatten[{Blue,Disk[#[[2]],.01],White,Text[#[[1]],#[[2]]]}&/@values]
  17.                         ],
  18.                         PlotRange->{{0,imagesizes[[1]]/imagesizes[[bigger]]},{0,imagesizes[[2]]/imagesizes[[bigger]]}},
  19.                         ImageSize->picturesize]
  20.         ],
  21.         Dynamic[N@pt],
  22.         Dynamic[MatrixForm@values]
  23. }]
  24. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top