@Override
	public void applyComponent(Mat inputMat, ProcessInfo info) {

		Integer dilateSize = (Integer) dilateSizeSpinner.getValue();
		Integer erodeSize = (Integer) erodeSizeSpinner.getValue();
		
		int shape = Imgproc.MORPH_ELLIPSE;
		
		switch ((Shape)comboBox.getSelectedItem()) {
		case CIRCLE:
			shape = Imgproc.MORPH_ELLIPSE;
			break;
		case CROSS:
			shape = Imgproc.MORPH_CROSS;
			break;
		case SQUARE:
			shape = Imgproc.MORPH_RECT;
			break;
		default:
			break;
		}

		Mat dilateKernel = Imgproc.getStructuringElement(shape, new Size(dilateSize, dilateSize));
		Mat erodeKernel = Imgproc.getStructuringElement(shape, new Size(erodeSize, erodeSize));
		
		if(!chckbxNewCheckBox.isSelected()){
			Imgproc.dilate(inputMat, inputMat, erodeKernel);
		}
			
		Imgproc.erode(inputMat, inputMat, erodeKernel);
			
		if(chckbxNewCheckBox.isSelected()){
			Imgproc.dilate(inputMat, inputMat, dilateKernel);
		}
	}