private static void fft2() {
		ImageData imageData = originalImage.getImageData();
		int[][] data = new int[imageData.height][imageData.width];
		for (int row = 0; row < data.length; row++) {// height
			for (int col = 0; col < data[0].length; col++) {// width
				int pixel = imageData.getPixel(col, row);
				data[row][col] = pixel;
				System.out.print(pixel + "\t");
			}
			System.out.println();
		}
		System.out.println("===============");
		FFT2 fft2 = new FFT2();

		complexData = fft2.fft2(data);// for later use.

		for (int row = 0; row < imageData.height; row++) {
			for (int col = 0; col < imageData.width; col++) {
				int pixel = (int) data[col][row];
				imageData.setPixel(col, row, pixel);
			}
		}
		frequncyImage = new Image(originalImage.getDevice(), imageData);
		
		//
		int[][] phaseSpectrumGrayData = new int[imageData.height][imageData.width];
		fft2.toPixel2(phaseSpectrumGrayData,imageData.width,  imageData.height);
		ImageData phaseSpectrumImageData = originalImage.getImageData();
		for (int row = 0; row < phaseSpectrumImageData.height; row++) {
			for (int col = 0; col < phaseSpectrumImageData.width; col++) {
				int pixel = (int) phaseSpectrumGrayData[col][row];
				phaseSpectrumImageData.setPixel(col, row, pixel);
			}
		}
		phaseSpectrumImage = new Image(originalImage.getDevice(), phaseSpectrumImageData);
	
	}