/*******************************************************************************
 *  Copyright 2018 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 * 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.
 *******************************************************************************/
package cdac.medinfo.sdk.dcm30_04.templates.generaltemplates;

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.enums.EnumGraphicType;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_VolumetricROIMeasurements;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_VolumetricROIMeasurements;

/**
 * This class represents VolumetricROIMeasurements - TID1411
 */
public class VolumetricROIMeasurements_TID1411 extends Template{

	/**
	 * Object of TimePointContext_TID1502
	 */
	private TimePointContext_TID1502 objTimePointContext_TID1502;
	/**
	 * Object of TimePointContext_TID1502
	 */
	private ROIMeasurements_TID1419 objROIMeasurements_TID1419;
	/**
	  * Instantiates a new VolumetricROIMeasurements_TID1411 Template.
	  * @param objTree Object of SRTree.
	  */
	public VolumetricROIMeasurements_TID1411(SRTree objTree)
	{
		super(objTree);
	}
	/**
	 * Retrieves TimePointContext_TID1502 
	 * @return objTimePointContext_TID1502 Object of ObserverContext_TID1002 
	 */
	public TimePointContext_TID1502 getObserverContext() 
	{
		if(null == this.objTimePointContext_TID1502)
			this.objTimePointContext_TID1502 = new TimePointContext_TID1502(getSRTree());
		return this.objTimePointContext_TID1502;
	}
	/**
	 * Retrieves ObserverContext_TID1002 
	 * @return objTimePointContext_TID1502 Object of ObserverContext_TID1002 
	 */
	public ROIMeasurements_TID1419 getROIMeasurements() 
	{
		if(null == this.objROIMeasurements_TID1419)
			this.objROIMeasurements_TID1419 = new ROIMeasurements_TID1419(getSRTree());
		return this.objROIMeasurements_TID1419;
	}
	/**
	 * Sets the value for Measurement Group
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setMeasurementGroup(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.MEASUREMENT_GROUP.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.MEASUREMENT_GROUP_125007.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type UIDREF and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setTrackingUniqueIdentifier(int[] arrPosition, String strTrackingUniqueIdentifier)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.TRACKING__UNIQUE_IDENTIFIER.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.TRACKING__UNIQUE_IDENTIFIER_112040.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type UIDREF and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createUIDREFNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strTrackingUniqueIdentifier);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for TrackingIdentifier
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strTrackingIdentifier String value for RoomIdentification.
	 */
	public void setTrackingIdentifier(int[] arrPosition, String strTrackingIdentifier)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.TRACKING_IDENTIFIER.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.TRACKING_IDENTIFIER_122039.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type TEXT and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createTextNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strTrackingIdentifier);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for ImageRegion
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrFlGraphicData Float array for FlGraphicData.
	 * @param enumGraphicType Enumerated value for GraphicType.
	 */
	public void setImageRegion(int[] arrPosition, float []arrFlGraphicData, EnumGraphicType enumGraphicType)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.IMAGE_REGION.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.IMAGE_REGION_111030.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type SCOORD and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createSCOORDNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, arrFlGraphicData, enumGraphicType);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for ReferencedSegment
	 * @param arrPosition dentifier which shows the position of the node in the SR Tree.
	 *@param strRefSOPClassUIDForCORefMacro Reference SOP Class UID for Composite Object Reference Macro.
	 * @param strRefSOPInstanceUIDForCORefMacro Reference SOP Instance UID for Composite Object Reference Macro.
	 * @param arrStrReferencedFrameNumber String Array of Referenced Frame Number.
	 * @param strRefSOPClassUID Referenced SOP Class UID.
	 * @param strRefSOPInstanceUID Referenced SOP Instance UID.
	 */
	public void setReferencedSegment(int[] arrPosition, String strRefSOPClassUIDForCORefMacro, String strRefSOPInstanceUIDForCORefMacro, String[] arrStrReferencedFrameNumber, String strRefSOPClassUID, String strRefSOPInstanceUID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.REFERENCED_SEGMENT.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.REFERENCED_SEGMENTATION_FRAME_121214.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type IMAGE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createImageNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strRefSOPClassUIDForCORefMacro, strRefSOPInstanceUIDForCORefMacro, arrStrReferencedFrameNumber, strRefSOPClassUID, strRefSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for Source image forsegmentation
	 * @param arrPosition dentifier which shows the position of the node in the SR Tree.
	 *@param strRefSOPClassUIDForCORefMacro Reference SOP Class UID for Composite Object Reference Macro.
	 * @param strRefSOPInstanceUIDForCORefMacro Reference SOP Instance UID for Composite Object Reference Macro.
	 * @param arrStrReferencedFrameNumber String Array of Referenced Frame Number.
	 * @param strRefSOPClassUID Referenced SOP Class UID.
	 * @param strRefSOPInstanceUID Referenced SOP Instance UID.
	 */
	public void setSourceImageForSegmentation(int[] arrPosition, String strRefSOPClassUIDForCORefMacro, String strRefSOPInstanceUIDForCORefMacro, String[] arrStrReferencedFrameNumber, String strRefSOPClassUID, String strRefSOPInstanceUID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.SOURCE_IMAGE_FOR_SEGMENTATION.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.SOURCE_IMAGE_FOR_SEGMENTATION_121233.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type IMAGE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createImageNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strRefSOPClassUIDForCORefMacro, strRefSOPInstanceUIDForCORefMacro, arrStrReferencedFrameNumber, strRefSOPClassUID, strRefSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets value for Illustration Of ROI
	 * @param arrPosition dentifier which shows the position of the node in the SR Tree.
	 *@param strRefSOPClassUIDForCORefMacro Reference SOP Class UID for Composite Object Reference Macro.
	 * @param strRefSOPInstanceUIDForCORefMacro Reference SOP Instance UID for Composite Object Reference Macro.
	 * @param arrStrReferencedFrameNumber String Array of Referenced Frame Number.
	 * @param strRefSOPClassUID Referenced SOP Class UID.
	 * @param strRefSOPInstanceUID Referenced SOP Instance UID.
	 */
	public void setIllustrationOfROI(int[] arrPosition, String strRefSOPClassUIDForCORefMacro, String strRefSOPInstanceUIDForCORefMacro, String[] arrStrReferencedFrameNumber, String strRefSOPClassUID, String strRefSOPInstanceUID)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.ILLUSTRATION_OF_ROI.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.ILLUSTRATION_OF_ROI_121200.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type IMAGE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createImageNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strRefSOPClassUIDForCORefMacro, strRefSOPInstanceUIDForCORefMacro, arrStrReferencedFrameNumber, strRefSOPClassUID, strRefSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets Real World Value Map used for measurement
	 * @param arrPosition position at which the node will get added in the tree.
	 * @param strReferencedSOPClassUID Referenced SOP Class UID
	 * @param strReferencedSOPInstanceUID Referenced SOP Instance UID
	 */
	public void setRealWorldValueMapusedformeasurement(int[] arrPosition, String strReferencedSOPClassUID, String strReferencedSOPInstanceUID)
	{
		
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.REAL_WORLD_VALUE_MAP_USED_FOR_MEASUREMENT.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.REAL_WORLD_VALUE_MAP_USED_FOR_MEASUREMENT_126100.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		/**
		 * Creating a node of Value Type COMPOSITE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCompositeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strReferencedSOPClassUID, strReferencedSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setSourceseriesForImageSegmentation(int[] arrPosition, String strTrackingUniqueIdentifier)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_VolumetricROIMeasurements.SOURCE_SERIES_FOR_IMAGE_SEGMENTATION.getValue();
		String strCodeValue = EnumCV_VolumetricROIMeasurements.SOURCE_SERIES_FOR_IMAGE_SEGMENTATION_121232.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();
		
		/**
		 * Creating a node of Value Type UIDREF and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createUIDREFNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strTrackingUniqueIdentifier);
		getSRTree().addChild(objContentSequenceItem);
	}
}
