/*
 * Copyright 2016 Jan Dorazil <deu439@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef DATAUNIT_HPP
#define DATAUNIT_HPP

#define TEMP  0
#define TROI  1
#define INPU  2
#define GTRU  3
#define OUTP  4

#define NIMG  5

#include <opencv2/opencv.hpp>

using namespace cv;

struct DataUnit
{
  Mat mMat[NIMG];
  std::string mPath[NIMG];
  
  // Create a deep copy of all matrices
  DataUnit clone() const {
    DataUnit out;
    for( int i = 0; i < NIMG; i++ ){
      out.mMat[i] = mMat[i].clone();
      out.mPath[i] = mPath[i]; // No need to clone the path as its const
    }
   
    return out;
  }
  
  // Assign other dataunit
  DataUnit &operator=(const DataUnit &other){
    for( int i = 0; i < NIMG; i++ ){
      mMat[i] = other.mMat[i];
      mPath[i] = other.mPath[i];
    }
    
    return *this;
  }
};

#endif // DATAUNIT_HPP
