src/main/java/sc/fiji/pQCT/selectroi/liveWireEngine/LiveWireCosts.java
private double[][] checkNeighbours(final double[][] tempLap,
		final int[][] neighbourhood, final int[] centre)
	{
		for (final int[] coordinates : neighbourhood) {
			final double atCoordinates = laplacian[coordinates[0]][coordinates[1]];
			final double atCenter = laplacian[centre[0]][centre[1]];
			if (Math.signum(atCenter) != Math.signum(atCoordinates) && Math.abs(
				atCenter) < Math.abs(atCoordinates))
			{
				/*zero-crossing detected, change to 0 to disable laplacian*/
				tempLap[centre[0]][centre[1]] = 0;
			}
		}
		return tempLap;
	}
/**
	 * Check neighbours for Laplacian zero-crossing
	 * 
	 * @param tempLap mask of zero-crossings
	 * @param neighbourhood the neighbourhood to check
	 * @param centre the coordinates of the centre pixel to check the
	 *          neighbourhood for
	 * @return tempLap the zero-crossings mask
	 */
Check neighbours for Laplacian zero-crossing

@param tempLap mask of zero-crossings
@param neighbourhood the neighbourhood to check
@param centre the coordinates of the centre pixel to check the
neighbourhood for
@return tempLap the zero-crossings mask
Check neighbours for Laplacian zero - crossing @param tempLap mask of zero - crossings @param neighbourhood the neighbourhood to check @param centre the coordinates of the centre pixel to check the neighbourhood for @return tempLap the zero - crossings mask
private double[][] checkNeighbours(final double[][] tempLap,
		final int[][] neighbourhood, final int[] centre)
	{
		for (final int[] coordinates : neighbourhood) {
			final double atCoordinates = laplacian[coordinates[0]][coordinates[1]];
			final double atCenter = laplacian[centre[0]][centre[1]];
			if (Math.signum(atCenter) != Math.signum(atCoordinates) && Math.abs(
				atCenter) < Math.abs(atCoordinates))
			{
				/*zero-crossing detected, change to 0 to disable laplacian*/
				tempLap[centre[0]][centre[1]] = 0;
			}
		}
		return tempLap;
	}
private double [ ] [ ] checkNeighbours ( final double [ ] [ ] tempLap , final int [ ] [ ] neighbourhood , final int [ ] centre ) { for ( final int [ ] coordinates : neighbourhood ) { final double atCoordinates = laplacian [ coordinates [ 0 ] ] [ coordinates [ 1 ] ] ; final double atCenter = laplacian [ centre [ 0 ] ] [ centre [ 1 ] ] ; if ( Math . signum ( atCenter ) != Math . signum ( atCoordinates ) && Math . abs ( atCenter ) < Math . abs ( atCoordinates ) ) { /*zero-crossing detected, change to 0 to disable laplacian*/ tempLap [ centre [ 0 ] ] [ centre [ 1 ] ] = 0 ; } } return tempLap ; }
Check neighbours for Laplacian zero-crossing
Check neighbours for Laplacian zero - crossing