public void makeSegmentation(String type) {
        String request = "";
        if(type.equals(SIMPLY_SEGM))
            request = "Enter simply segments count";
        else if(type.equals(ROUND_N_TIMES))
            request = "Enter rounding count";
        else if(type.equals(ROUND_TO_N_SEGM))
            request = "Enter smart segments count";
        Object result = JOptionPane.showInputDialog(this, request);
        try{
            int r = Integer.parseInt((String) result);
            if (r > 255 || r < 0)
                return;
            if(type.equals(SIMPLY_SEGM))
                imageProcessor.simplySegmentation(r);
            else if(type.equals(ROUND_N_TIMES))
                imageProcessor.roundNAndSegment(r);
            else if(type.equals(ROUND_TO_N_SEGM))
                imageProcessor.roundTillNSegments(r);
        }
        catch (Exception ignored)
        {
        }
    }