Java Assert assertXYPlanesCorrectlyOriented(final int[] dimIndices)

Here you can find the source of assertXYPlanesCorrectlyOriented(final int[] dimIndices)

Description

Throws an Exception if the planes of a Dataset are not compatible with legacy ImageJ.

License

Open Source License

Declaration

static void assertXYPlanesCorrectlyOriented(final int[] dimIndices) 

Method Source Code

//package com.java2s;

public class Main {
    /**// ww  w  .j av a  2  s .c  o  m
     * Throws an Exception if the planes of a Dataset are not compatible with
     * legacy ImageJ.
     */
    static void assertXYPlanesCorrectlyOriented(final int[] dimIndices) {
        if (dimIndices[0] != 0) {
            throw new IllegalArgumentException("Dataset does not have X as the first axis");
        }
        if (dimIndices[1] != 1) {
            throw new IllegalArgumentException("Dataset does not have Y as the second axis");
        }
    }
}

Related

  1. assertValidItemName(String itemName)
  2. assertValidKeys(Iterable keys)
  3. assertValidRange(String name, double value, double min, double max)
  4. assertValidSwfValue(String value)
  5. assertValueSize(final int expectedSize, final int got)