src/main/java/sc/fiji/pQCT/selectroi/SelectSoftROILasso.java
public byte checkPath(byte[] image, ArrayList<Coordinate> pathCoordinates){
		int blocked = 0;
		for (int t = pathCoordinates.size()-2;t>0;--t){
		  if (image[(int) (pathCoordinates.get(t).ii+pathCoordinates.get(t).jj*width)] == 1){
			++blocked;
			if (blocked > 2){
				return (byte)  0; //cannot see the point
			}
		  }
		}
		return (byte) 1;	//Can get through the path
	}
//Helper function to check whether a path is blocked
Helper function to check whether a path is blocked
Helper function to check whether a path is blocked
public byte checkPath(byte[] image, ArrayList<Coordinate> pathCoordinates){
		int blocked = 0;
		for (int t = pathCoordinates.size()-2;t>0;--t){
		  if (image[(int) (pathCoordinates.get(t).ii+pathCoordinates.get(t).jj*width)] == 1){
			++blocked;
			if (blocked > 2){
				return (byte)  0; 
			}
		  }
		}
		return (byte) 1;	
	}
public byte checkPath ( byte [ ] image , ArrayList < Coordinate > pathCoordinates ) { int blocked = 0 ; for ( int t = pathCoordinates . size ( ) - 2 ; t > 0 ; -- t ) { if ( image [ ( int ) ( pathCoordinates . get ( t ) . ii + pathCoordinates . get ( t ) . jj * width ) ] == 1 ) { ++ blocked ; if ( blocked > 2 ) { return ( byte ) 0 ; } } } return ( byte ) 1 ; }
Helper function to check whether a path is blocked
Helper function to check whether a path is blocked
//cannot see the point //Can get through the path