private static void initImpulse(Composite inComposite, int heightHint) {
		final Composite toolbar2 = new Composite(inComposite, SWT.BORDER);
		final Composite impulse = new Composite(inComposite, SWT.BORDER);
		GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
		gridData.grabExcessHorizontalSpace = true;
		gridData.heightHint = heightHint;
		impulse.setLayoutData(gridData);
		impulse.addListener(SWT.Paint, new Listener() {
			public void handleEvent(Event event) {
				ImageUtils.paintImage(event.gc, impulseImage, impulseImageHistogram);
			}
		});

		createToolbarGridData(toolbar2);
		toolbar2.setLayout(new GridLayout(100, false));

		Label label = new Label(toolbar2, SWT.NONE);
		label.setText("Probability of Salt Noise: ");
		final Text st = new Text(toolbar2, SWT.BORDER);
		st.setText("10");
		label = new Label(toolbar2, SWT.NONE);
		label.setText("%");

		label = new Label(toolbar2, SWT.NONE);
		label.setText(", Pepper Noise: ");
		final Text pt = new Text(toolbar2, SWT.BORDER);
		pt.setText("10");
		label = new Label(toolbar2, SWT.LEFT);
		label.setText("%");
		Button button = new Button(toolbar2, SWT.PUSH);
		button.setText("Add Impulse Noise");
		button.setBounds(0, 0, 100, 30);
		button.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true, 1, 1));
		button.addListener(SWT.MouseDown, new Listener() {
			public void handleEvent(Event event) {
				double sp = 0.1;
				try {
					sp = Double.parseDouble(st.getText()) / 100;
				} catch (Exception e) {
					e.printStackTrace();
				}

				double pp = 0.1;
				try {
					pp = Double.parseDouble(pt.getText()) / 100;
				} catch (Exception e) {
					e.printStackTrace();
				}
				impulseImage = addImpulseNoise(originalImage, sp, pp);
				impulseImageHistogram = ImageUtils.analyzeHistogram(impulseImage.getImageData());
				ImageUtils.paintImage(new GC(impulse), impulseImage, impulseImageHistogram);
			}

		});
	}