/*******************************************************************************
 *  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.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.DiagnosticImagingReportPurposesOfReference_CID7003;

/**
 * This class represents BasicDiagnosticImagingReportObservations_TID2001
 */
public class BasicDiagnosticImagingReportObservations_TID2001 extends Template{

	/**
	 * Object of LinearMeasurementTemplate_TID1400
	 */
	private LinearMeasurementTemplate_TID1400 objLinearMeasurementTemplate_TID1400;
	/**
	 * Object of AreaMeasurementTemplate_TID1401
	 */
	private AreaMeasurementTemplate_TID1401 objAreaMeasurementTemplate_TID1401;
	/**
	 * Retrieves the LinearMeasurementTemplate_TID1400 
	 * @return objLinearMeasurementTemplate_TID1400 Object of LinearMeasurementTemplate_TID1400 
	 */
	public LinearMeasurementTemplate_TID1400 getLinearMeasurementTemplate() 
	{
		if(objLinearMeasurementTemplate_TID1400 == null )
			this.objLinearMeasurementTemplate_TID1400 = new LinearMeasurementTemplate_TID1400(getSRTree());

		return this.objLinearMeasurementTemplate_TID1400;
	}
	/**
	 * Instantiates a new BasicDiagnosticImagingReportObservations_TID2001
	 * @param objTree Object of SRTree.
	 */
	public BasicDiagnosticImagingReportObservations_TID2001(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Retrieves the AreaMeasurementTemplate_TID1401 
	 * @return objAreaMeasurementTemplate_TID1401 Object of AreaMeasurementTemplate_TID1401 
	 */
	public AreaMeasurementTemplate_TID1401 getAreaMeasurementTemplate() 
	{
		if(objAreaMeasurementTemplate_TID1401 == null )
			this.objAreaMeasurementTemplate_TID1401 = new AreaMeasurementTemplate_TID1401(getSRTree());

		return this.objAreaMeasurementTemplate_TID1401;
	}
	/**
	 * Object of VolumeMeasurementTemplate_TID1401
	 */
	private VolumeMeasurementTemplate_TID1402 objVolumeMeasurementTemplate_TID1402;
	
	/**
	 * Retrieves the VolumeMeasurementTemplate_TID1402 
	 * @return objVolumeMeasurementTemplate_TID1402 Object of VolumeMeasurementTemplate_TID1402 
	 */
	public VolumeMeasurementTemplate_TID1402 getVolumeMeasurementTemplate() 
	{
		if(objVolumeMeasurementTemplate_TID1402 == null )
			this.objVolumeMeasurementTemplate_TID1402 = new VolumeMeasurementTemplate_TID1402(getSRTree());

		return this.objVolumeMeasurementTemplate_TID1402;
	}
	/**
	 * Object of NumericMeasurement_TID1404
	 */
	private NumericMeasurement_TID1404 objNumericMeasurement_TID1404;
	private DiagnosticImagingReportPurposesOfReference_CID7003 objDiagnosticImagingReportPurposesOfReference_CID7003;
	/**
	 * Retrieves the NumericMeasurement_TID1404 
	 * @return objNumericMeasurement_TID1404 Object of NumericMeasurement_TID1404 
	 */
	public NumericMeasurement_TID1404 getobjNumericMeasurement() 
	{
		if(objNumericMeasurement_TID1404 == null )
			this.objNumericMeasurement_TID1404 = new NumericMeasurement_TID1404(getSRTree());

		return this.objNumericMeasurement_TID1404;
	}
	public void setDiagnosticImagingReportPurposesOfReference(int[] arrPosition, String strRefSOPClassUIDForCORefMacro, String strRefSOPInstanceUIDForCORefMacro, String[] arrStrReferencedFrameNumber, String strRefSOPClassUID, String strRefSOPInstanceUID)
	{
		String strCM = objDiagnosticImagingReportPurposesOfReference_CID7003.getCodeMeaning();
		String strCV = objDiagnosticImagingReportPurposesOfReference_CID7003.getCodeValue();
		String strCSD1 = objDiagnosticImagingReportPurposesOfReference_CID7003.getCodingSchemeDesignator();


		/**
		 * Creating a node of Value Type IMAGE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createImageNode(arrPosition, strCM, strCV, strCSD1, strRefSOPClassUIDForCORefMacro, strRefSOPInstanceUIDForCORefMacro, arrStrReferencedFrameNumber, strRefSOPClassUID, strRefSOPInstanceUID);
		getSRTree().addChild(objContentSequenceItem);
	}
}
