示例#1
0
 /**
  * Default constructor which sets thread stopped to false, source and destination images to null,
  * and destination flag to false.
  */
 public AlgorithmBase() {
   this.destImage = null;
   this.srcImage = null;
   destFlag = false;
   threadStopped = false;
   nthreads = ThreadUtil.getAvailableCores();
   multiThreadingEnabled = Preferences.isMultiThreadingEnabled();
 }
示例#2
0
  /**
   * Constructor which sets thread stopped to false and sets source and destination images.
   *
   * @param destImage Destination image, can be null.
   * @param srcImage Source image, should not be null.
   */
  public AlgorithmBase(ModelImage destImage, ModelImage srcImage) {
    this.destImage = destImage;
    this.srcImage = srcImage;

    if (destImage == null) {
      destFlag = false;
    } else {
      destFlag = true;
    }

    threadStopped = false;
    nthreads = ThreadUtil.getAvailableCores();
    multiThreadingEnabled = Preferences.isMultiThreadingEnabled();
  }