// Path: src/main/java/com/quantumsoft/qupathcloud/entities/DicomAttribute.java
// public class DicomAttribute<T> {
// 
//   private String vr;
//   @JsonProperty
//   private T[] Value;
// 
//   /**
//    * Check if is tag is empty.
//    *
//    * @return result of tag empty check
//    */
//   @JsonIgnore
//   public boolean isEmpty() {
//     return Value == null || Value.length == 0;
//   }
// 
//   /**
//    * Gets vr.
//    *
//    * @return the vr
//    */
//   public String getVr() {
//     return vr;
//   }
// 
//   /**
//    * Sets vr.
//    *
//    * @param vr the vr
//    */
//   public void setVr(String vr) {
//     this.vr = vr;
//   }
// 
//   /**
//    * Sets value.
//    *
//    * @param Value the value
//    */
//   public void setValue(T[] Value) {
//     this.Value = Value;
//   }
// 
//   /**
//    * Gets first value in the array.
//    *
//    * @return the first value in the array
//    */
//   @JsonIgnore
//   public T getValue1() {
//     return Value[0];
//   }
// 
//   /**
//    * Gets second value in the array.
//    *
//    * @return the second value in the array
//    */
//   @JsonIgnore
//   public T getValue2() {
//     return Value[1];
//   }
// 
//   /**
//    * Gets all array values of an attribute.
//    *
//    * @return the array values of an attribute
//    */
//   @JsonIgnore
//   public T[] getValue() {
//     return Value;
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     if (this == o) {
//       return true;
//     }
//     if (o == null || getClass() != o.getClass()) {
//       return false;
//     }
//     DicomAttribute<?> that = (DicomAttribute<?>) o;
//     return Objects.equals(vr, that.vr) &&
//         Arrays.equals(Value, that.Value);
//   }
// 
//   @Override
//   public int hashCode() {
//     int result = Objects.hash(vr);
//     result = 31 * result + Arrays.hashCode(Value);
//     return result;
//   }
// }
// 
// Path: src/main/java/com/quantumsoft/qupathcloud/entities/instance/objects/ObjectOfPerframeFunctionalGroupsSequence.java
// public class ObjectOfPerframeFunctionalGroupsSequence {
// 
//   @JsonProperty("00209111")
//   private DicomAttribute<ObjectOfFrameContentSequence> frameContentSequence;
//   @JsonProperty("0048021A")
//   private DicomAttribute<ObjectOfPlanePositionSequence> planePositionSequence;
// 
//   /**
//    * Gets Frame Content Sequence.
//    *
//    * @return the Frame Content Sequence
//    */
//   public DicomAttribute<ObjectOfFrameContentSequence> getFrameContentSequence() {
//     return frameContentSequence;
//   }
// 
//   /**
//    * Sets Frame Content Sequence.
//    *
//    * @param frameContentSequence the Frame Content Sequence
//    */
//   public void setFrameContentSequence(
//       DicomAttribute<ObjectOfFrameContentSequence> frameContentSequence) {
//     this.frameContentSequence = frameContentSequence;
//   }
// 
//   /**
//    * Gets Plane Position Sequence.
//    *
//    * @return the Plane Position Sequence
//    */
//   public DicomAttribute<ObjectOfPlanePositionSequence> getPlanePositionSequence() {
//     return planePositionSequence;
//   }
// 
//   /**
//    * Sets Plane Position Sequence.
//    *
//    * @param planePositionSequence the Plane Position Sequence
//    */
//   public void setPlanePositionSequence(
//       DicomAttribute<ObjectOfPlanePositionSequence> planePositionSequence) {
//     this.planePositionSequence = planePositionSequence;
//   }
// }
// 
// Path: src/main/java/com/quantumsoft/qupathcloud/exception/QuPathCloudException.java
// public class QuPathCloudException extends Exception {
// 
//   /**
//    * Instantiates a new QuPath cloud exception.
//    *
//    * @param message the message
//    */
//   public QuPathCloudException(String message) {
//     super(message);
//   }
// 
//   /**
//    * Instantiates a new QuPath cloud exception.
//    *
//    * @param e the exception
//    */
//   public QuPathCloudException(Throwable e) {
//     super(e);
//   }
// }


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.quantumsoft.qupathcloud.entities.DicomAttribute;
import com.quantumsoft.qupathcloud.entities.instance.objects.ObjectOfPerframeFunctionalGroupsSequence;
import com.quantumsoft.qupathcloud.exception.QuPathCloudException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
// Copyright (C) 2019 Google LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

package com.quantumsoft.qupathcloud.entities.instance;


/**
 * The Instance class represents information about a multi-frame image or dicomized Qpdata file.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Instance {

  private static final String TILED_FULL = "TILED_FULL";

  @JsonProperty("0020000D")
  private DicomAttribute<String> studyInstanceUID; //required includefield parameter
  @JsonProperty("0020000E")
  private DicomAttribute<String> seriesInstanceUID; //required includefield parameter
  @JsonProperty("00080018")
  private DicomAttribute<String> sopInstanceUID;
  @JsonProperty("00080060")
  private DicomAttribute<String> modality;
// Path: src/main/java/com/quantumsoft/qupathcloud/entities/DicomAttribute.java
// public class DicomAttribute<T> {
// 
//   private String vr;
//   @JsonProperty
//   private T[] Value;
// 
//   /**
//    * Check if is tag is empty.
//    *
//    * @return result of tag empty check
//    */
//   @JsonIgnore
//   public boolean isEmpty() {
//     return Value == null || Value.length == 0;
//   }
// 
//   /**
//    * Gets vr.
//    *
//    * @return the vr
//    */
//   public String getVr() {
//     return vr;
//   }
// 
//   /**
//    * Sets vr.
//    *
//    * @param vr the vr
//    */
//   public void setVr(String vr) {
//     this.vr = vr;
//   }
// 
//   /**
//    * Sets value.
//    *
//    * @param Value the value
//    */
//   public void setValue(T[] Value) {
//     this.Value = Value;
//   }
// 
//   /**
//    * Gets first value in the array.
//    *
//    * @return the first value in the array
//    */
//   @JsonIgnore
//   public T getValue1() {
//     return Value[0];
//   }
// 
//   /**
//    * Gets second value in the array.
//    *
//    * @return the second value in the array
//    */
//   @JsonIgnore
//   public T getValue2() {
//     return Value[1];
//   }
// 
//   /**
//    * Gets all array values of an attribute.
//    *
//    * @return the array values of an attribute
//    */
//   @JsonIgnore
//   public T[] getValue() {
//     return Value;
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     if (this == o) {
//       return true;
//     }
//     if (o == null || getClass() != o.getClass()) {
//       return false;
//     }
//     DicomAttribute<?> that = (DicomAttribute<?>) o;
//     return Objects.equals(vr, that.vr) &&
//         Arrays.equals(Value, that.Value);
//   }
// 
//   @Override
//   public int hashCode() {
//     int result = Objects.hash(vr);
//     result = 31 * result + Arrays.hashCode(Value);
//     return result;
//   }
// }
// 
// Path: src/main/java/com/quantumsoft/qupathcloud/entities/instance/objects/ObjectOfPerframeFunctionalGroupsSequence.java
// public class ObjectOfPerframeFunctionalGroupsSequence {
// 
//   @JsonProperty("00209111")
//   private DicomAttribute<ObjectOfFrameContentSequence> frameContentSequence;
//   @JsonProperty("0048021A")
//   private DicomAttribute<ObjectOfPlanePositionSequence> planePositionSequence;
// 
//   /**
//    * Gets Frame Content Sequence.
//    *
//    * @return the Frame Content Sequence
//    */
//   public DicomAttribute<ObjectOfFrameContentSequence> getFrameContentSequence() {
//     return frameContentSequence;
//   }
// 
//   /**
//    * Sets Frame Content Sequence.
//    *
//    * @param frameContentSequence the Frame Content Sequence
//    */
//   public void setFrameContentSequence(
//       DicomAttribute<ObjectOfFrameContentSequence> frameContentSequence) {
//     this.frameContentSequence = frameContentSequence;
//   }
// 
//   /**
//    * Gets Plane Position Sequence.
//    *
//    * @return the Plane Position Sequence
//    */
//   public DicomAttribute<ObjectOfPlanePositionSequence> getPlanePositionSequence() {
//     return planePositionSequence;
//   }
// 
//   /**
//    * Sets Plane Position Sequence.
//    *
//    * @param planePositionSequence the Plane Position Sequence
//    */
//   public void setPlanePositionSequence(
//       DicomAttribute<ObjectOfPlanePositionSequence> planePositionSequence) {
//     this.planePositionSequence = planePositionSequence;
//   }
// }
// 
// Path: src/main/java/com/quantumsoft/qupathcloud/exception/QuPathCloudException.java
// public class QuPathCloudException extends Exception {
// 
//   /**
//    * Instantiates a new QuPath cloud exception.
//    *
//    * @param message the message
//    */
//   public QuPathCloudException(String message) {
//     super(message);
//   }
// 
//   /**
//    * Instantiates a new QuPath cloud exception.
//    *
//    * @param e the exception
//    */
//   public QuPathCloudException(Throwable e) {
//     super(e);
//   }
// }


// Path: src/main/java/com/quantumsoft/qupathcloud/entities/instance/Instance.java
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.quantumsoft.qupathcloud.entities.DicomAttribute;
import com.quantumsoft.qupathcloud.entities.instance.objects.ObjectOfPerframeFunctionalGroupsSequence;
import com.quantumsoft.qupathcloud.exception.QuPathCloudException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

// Copyright (C) 2019 Google LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

package com.quantumsoft.qupathcloud.entities.instance;


/**
 * The Instance class represents information about a multi-frame image or dicomized Qpdata file.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Instance {

  private static final String TILED_FULL = "TILED_FULL";

  @JsonProperty("0020000D")
  private DicomAttribute<String> studyInstanceUID; //required includefield parameter
  @JsonProperty("0020000E")
  private DicomAttribute<String> seriesInstanceUID; //required includefield parameter
  @JsonProperty("00080018")
  private DicomAttribute<String> sopInstanceUID;
  @JsonProperty("00080060")
  private DicomAttribute<String> modality;
  @JsonProperty("00480006")