| 
					
	
	
	
	
				 | 
				
					
	
	 
		Hi radio,
  On Thu, 15 Sep 2011, radioradio wrote:
  > My problem is that the stack should rotate around a point selection by 
 > an angle and show a slice with the point in it's center. I also tried 
 > the great Reorient3TP, but somehow I don't get it right. Maybe it's my 
 > lack of geometry knowledge?
  Probably the best idea is to extend the canvas to an appropriate size 
 first. Something like this should get you started with a macro to do what 
 you want:
  -- snipsnap --
 getSelectionCoordinates(x, y);
 width = getWidth();
 height = getHeight();
  if (x[0] != width / 2 || y [0] != height / 2) {
         offsetX = 0;
         halfWidth = width - x[0];
         if (halfWidth < x[0]) {
                 halfWidth = x[0];
         }
         else {
                 offsetX = halfWidth - x[0];
         }
          offsetY = 0;
         halfHeight = height - y[0];
         if (halfHeight < y[0]) {
                 halfHeight = y[0];
         }
         else {
                 offsetY = halfHeight - y[0];
         }
          run("Select All");
         run("Copy");
         title = getTitle();
         getMinAndMax(min, max);
          newImage(title, "32-bit", 2 * halfWidth, 2 * halfHeight, 1);
         makeRectangle(offsetX, offsetY, width, height);
         run("Paste");
         setMinAndMax(min, max);
         run("Select None");
 }
  run("Rotate... ", "angle=30");
 makePoint(getWidth() / 2, getHeight() / 2);
 
	
	
	
	 
				 |