public Section(boolean red, boolean green, boolean blue,
                   ListOrderedMap knownPoints)
    {
        //
        // Assign class variables
        //
        this.red = red;
        this.green = green;
        this.blue = blue;

        this.knownPoints = knownPoints;

        this.knownRed = new ArrayList<Integer>();
        this.knownGreen = new ArrayList<Integer>();
        this.knownBlue = new ArrayList<Integer>();

        //
        // Constructor variables
        //

        RgbDto first = (RgbDto) knownPoints.firstKey();
        RgbDto last = (RgbDto) knownPoints.lastKey();

        int redFirst;
        int greenFirst;
        int blueFirst;
        int redLast;
        int greenLast;
        int blueLast;

        List<Integer> points = new ArrayList<Integer>();

        //
        // Get a list of known colours into array lists
        //
        for (Object key : knownPoints.keySet())
        {
            RgbDto currentRgb = (RgbDto) key;
            this.knownRed.add(currentRgb.getRed());
            this.knownGreen.add(currentRgb.getGreen());
            this.knownBlue.add(currentRgb.getBlue());
        }

        //
        // Determine each channels slope
        //
        if (red)
        {
            this.redDownwards = first.getRed() > last.getRed() ? true : false;
        }
        if (green)
        {
            this.greenDownwards = first.getGreen() > last.getGreen() ? true
                                                                    : false;
        }
        if (blue)
        {
            this.blueDownwards = first.getBlue() > last.getBlue() ? true
                                                                 : false;
        }

        //
        // Find max/min RGB's for this section
        //

        points = new ArrayList<Integer>(knownRed);
        Collections.sort(points);
        redFirst = points.get(0);
        redLast = points.get(points.size() - 1);

        points = new ArrayList<Integer>(knownGreen);
        Collections.sort(points);
        greenFirst = points.get(0);
        greenLast = points.get(points.size() - 1);

        points = new ArrayList<Integer>(knownBlue);
        Collections.sort(points);
        blueFirst = points.get(0);
        blueLast = points.get(points.size() - 1);

        this.min = new int[] { redFirst, greenFirst, blueFirst };
        this.max = new int[] { redLast, greenLast, blueLast };
    }