/*******************************************************************************
 *  Copyright 2017-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.baselibs;

import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataElement;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDicomValue;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDictionaryReader;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITransferSyntax;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPatientSupportType;
import cdac.medinfo.sdk.dcm30_04.enums.EnumScanMode;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConstants;

/**
* This item class contains the methods to set, get and validate the attribute present in Ion Machine Verification Sequence .
 */

public class IonMachineVerificationSequenceItem extends Item
{

	private static final long serialVersionUID = 1L;
	/**
	 * This constructor creates the item and internal code sequence macro with default TransferSyntax 
	 */
	IonMachineVerificationSequenceItem()
	{
		super();
	}


	/**
	 * This constructor creates the item and internal code sequence macro with specified TransferSyntax 
	 * and default DictionaryReader
	 * @param objITransferSyntax specifies the DICOM Standard defined TransfeSyntax
	 */
	IonMachineVerificationSequenceItem(ITransferSyntax objITransferSyntax)
	{
		super(objITransferSyntax);
	}

	/**
	 * This constructor creates IonMachineVerificationSequenceItem with specified TransferSyntax and
	 * specified DictionaryReader
	 * @param objTransferSyntax specifies the DICOM Standard defined TransfeSyntax
	 * @param objDictionaryReader specifies the DICOM Dictionary reader to be used 
	 */
	IonMachineVerificationSequenceItem(ITransferSyntax objTransferSyntax, IDictionaryReader objDictionaryReader)
	{
		super(objTransferSyntax,objDictionaryReader);
	}

	/**
	 * Retrieves pre-initialized object of Ion Control Point Verification Sequence.If the module contains the sequence object
	 * it returns the same otherwise it creates the sequence adds to the module with proper initialization
	 * and then returns the object of sequence.
	 * @return IonControlPointVerificationSequence - instance of IonControlPointVerificationSequence. 
	 */
	public IonControlPointVerificationSequence getIonControlPointVerificationSequence()
	{
		IonControlPointVerificationSequence objIonControlPointVerificationSequence = null;
		IDataElement objIDataElement =  getDataForTag(0x0074, 0x104E);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objIonControlPointVerificationSequence = (IonControlPointVerificationSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objIonControlPointVerificationSequence = (IonControlPointVerificationSequence)objDicomV3Factory.createSequence(0x0074, 0x104E, objITransferSyntax, objIDictionaryReader);

			if(iVRTransferSyntax == DicomConstants.DCM_VR_IMPLICIT)
				objIDataElement = new ImplicitDE(0x0074, 0x104E, objIonControlPointVerificationSequence.getValue(),objIDictionaryReader);
			else
				objIDataElement = new ExplicitDE(0x0074, 0x104E, DicomConstants.DCM_DT_SQ, objIonControlPointVerificationSequence.getValue());
			objIDataElement.setTransferSyntax(objITransferSyntax);
			if(objIDataElement != null)
				addDataElement(objIDataElement);
		}
		return objIonControlPointVerificationSequence;
	}

	/**
	 * Retrieves pre-initialized object of IRecorded Snout Sequence.If the module contains the sequence object
	 * it returns the same otherwise it creates the sequence adds to the module with proper initialization
	 * and then returns the object of sequence.
	 * @return RecordedSnoutSequence - instance of RecordedSnoutSequence. 
	 */
	public RecordedSnoutSequence getRecordedSnoutSequence()
	{
		RecordedSnoutSequence objRecordedSnoutSequence = null;
		IDataElement objIDataElement =  getDataForTag(0x3008, 0x00F0);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objRecordedSnoutSequence = (RecordedSnoutSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objRecordedSnoutSequence = (RecordedSnoutSequence)objDicomV3Factory.createSequence(0x3008, 0x00F0, objITransferSyntax, objIDictionaryReader);

			if(iVRTransferSyntax == DicomConstants.DCM_VR_IMPLICIT)
				objIDataElement = new ImplicitDE(0x3008, 0x00F0, objRecordedSnoutSequence.getValue(),objIDictionaryReader);
			else
				objIDataElement = new ExplicitDE(0x3008, 0x00F0, DicomConstants.DCM_DT_SQ, objRecordedSnoutSequence.getValue());
			objIDataElement.setTransferSyntax(objITransferSyntax);
			if(objIDataElement != null)
				addDataElement(objIDataElement);
		}
		return objRecordedSnoutSequence;
	}

	/**
	 * Retrieves pre-initialized object of Recorded Range Shifter Sequence.If the module contains the sequence object
	 * it returns the same otherwise it creates the sequence adds to the module with proper initialization
	 * and then returns the object of sequence.
	 * @return RecordedRangeShifterSequence - instance of Recorded Range Shifter Sequence. 
	 */
	public RecordedRangeShifterSequence getRecordedRangeShifterSequence()
	{
		RecordedRangeShifterSequence objRecordedRangeShifterSequence = null;
		IDataElement objIDataElement =  getDataForTag(0x3008, 0x00F2);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objRecordedRangeShifterSequence = (RecordedRangeShifterSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objRecordedRangeShifterSequence = (RecordedRangeShifterSequence)objDicomV3Factory.createSequence(0x3008, 0x00F2, objITransferSyntax, objIDictionaryReader);

			if(iVRTransferSyntax == DicomConstants.DCM_VR_IMPLICIT)
				objIDataElement = new ImplicitDE(0x3008, 0x00F2, objRecordedRangeShifterSequence.getValue(),objIDictionaryReader);
			else
				objIDataElement = new ExplicitDE(0x3008, 0x00F2, DicomConstants.DCM_DT_SQ, objRecordedRangeShifterSequence.getValue());
			objIDataElement.setTransferSyntax(objITransferSyntax);
			if(objIDataElement != null)
				addDataElement(objIDataElement);
		}
		return objRecordedRangeShifterSequence;
	}

	/**
	 * Retrieves pre-initialized object of Recorded Lateral Spreading Device Sequence.If the module contains the sequence object
	 * it returns the same otherwise it creates the sequence adds to the module with proper initialization
	 * and then returns the object of sequence.
	 * @return RecordedLateralSpreadingDeviceSequence - instance of Recorded Lateral Spreading Device Sequence. 
	 */
	public RecordedLateralSpreadingDeviceSequence getRecordedLateralSpreadingDeviceSequence()
	{
		RecordedLateralSpreadingDeviceSequence objRecordedLateralSpreadingDeviceSequence = null;
		IDataElement objIDataElement =  getDataForTag(0x3008, 0x00F4);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objRecordedLateralSpreadingDeviceSequence = (RecordedLateralSpreadingDeviceSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objRecordedLateralSpreadingDeviceSequence = (RecordedLateralSpreadingDeviceSequence)objDicomV3Factory.createSequence(0x3008, 0x00F4, objITransferSyntax, objIDictionaryReader);

			if(iVRTransferSyntax == DicomConstants.DCM_VR_IMPLICIT)
				objIDataElement = new ImplicitDE(0x3008, 0x00F4, objRecordedLateralSpreadingDeviceSequence.getValue(),objIDictionaryReader);
			else
				objIDataElement = new ExplicitDE(0x3008, 0x00F4, DicomConstants.DCM_DT_SQ, objRecordedLateralSpreadingDeviceSequence.getValue());
			objIDataElement.setTransferSyntax(objITransferSyntax);
			if(objIDataElement != null)
				addDataElement(objIDataElement);
		}
		return objRecordedLateralSpreadingDeviceSequence;
	}
	
	/**
	 * Retrieves pre-initialized object of Recorded Range Modulator Sequence.If the module contains the sequence object
	 * it returns the same otherwise it creates the sequence adds to the module with proper initialization
	 * and then returns the object of sequence.
	 * @return RecordedRangeModulatorSequence - instance of Recorded Range Modulator Sequence. 
	 */
	public RecordedRangeModulatorSequence getRecordedRangeModulatorSequence()
	{
		RecordedRangeModulatorSequence objRecordedRangeModulatorSequence = null;
		IDataElement objIDataElement =  getDataForTag(0x3008, 0x00F6);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objRecordedRangeModulatorSequence = (RecordedRangeModulatorSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objRecordedRangeModulatorSequence = (RecordedRangeModulatorSequence)objDicomV3Factory.createSequence(0x3008, 0x00F6, objITransferSyntax, objIDictionaryReader);

			if(iVRTransferSyntax == DicomConstants.DCM_VR_IMPLICIT)
				objIDataElement = new ImplicitDE(0x3008, 0x00F6, objRecordedRangeModulatorSequence.getValue(),objIDictionaryReader);
			else
				objIDataElement = new ExplicitDE(0x3008, 0x00F6, DicomConstants.DCM_DT_SQ, objRecordedRangeModulatorSequence.getValue());
			objIDataElement.setTransferSyntax(objITransferSyntax);
			if(objIDataElement != null)
				addDataElement(objIDataElement);
		}
		return objRecordedRangeModulatorSequence;
	}

	
	/**
	 * Sets Radiation Mass Number. 
	 * Mass number of radiation.
	 * @param strRadiationAtomicNumber String value of Radiation Atomic Number.
	 */
	public void setRadiationMassNumber (String strRadiationMassNumber )
	{
		/* Accept the Radiation Atomic Number  in String format of type IS.
		 * Mass number of radiation.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0302, strRadiationMassNumber ,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0302,DicomConstants.DCM_DT_IS, strRadiationMassNumber);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Radiation Mass Number. 
	 * Mass number of radiation.
	 * @return String - value of Radiation Mass Number.
	 */
	public String getRadiationMassNumber()
	{
		Object objValue = getValue(0x300A,0x0302);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Radiation Atomic Number. 
	 * Atomic number of radiation.
	 * @param strRadiationAtomicNumber String value of Radiation Atomic Number.
	 */
	public void setRadiationAtomicNumber (String strRadiationAtomicNumber )
	{
		/* Accept the Radiation Atomic Number  in String format of type IS.
		 * Atomic number of radiation.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0304, strRadiationAtomicNumber ,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0304,DicomConstants.DCM_DT_IS, strRadiationAtomicNumber );

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Radiation Atomic Number. 
	 * Atomic number of radiation.
	 * @return String - value of Atomic number of radiation.
	 */
	public String getRadiationAtomicNumber()
	{
		Object objValue = getValue(0x300A,0x0304);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets RadiationChargeState
	 * Charge state of radiation.
	 * @param sRadiationChargeState short array of LUT Descriptor values. 
	 */
	public void setRadiationChargeState(short[] sRadiationChargeState)
	{
		/* Accept the RadiationChargeState in short Array format of type SS.
		 * Charge state of radiation.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0306, sRadiationChargeState,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x300A,0x0306,DicomConstants.DCM_DT_US, sRadiationChargeState);
		addDataElement(objIDataElement);
	}
	/**
	 * Returns the Charge state of radiation .
	 * @return short[] - short array of RadiationChargeState.
	 */
	public short[] getRadiationChargeState()
	{
		Object objValue = getValue(0x300A,0x0306);
		if(objValue != null)
			return (short[])objValue;
		return null;
	}
	
	/**
	 * Sets the Value Type Defined in Terms of
	 * Enumerated Values:
	 * NONE	: No beam scanning is performed
	 * UNIFORM	: The beam is scanned between control points to create a uniform lateral fluence distribution across the field
	 * MODULATED : The beam is scanned between control points to create a modulated lateral fluence distribution across the field
	 * The method of beam scanning to be used during treatment.
	 * @param enumScanMode Specifies type of the value encoded in this Item
	 */
	public void setScanMode(EnumScanMode enumScanMode)
	{
		/* Accept the Value Type in Enum format of type CS.
		 * The method of beam scanning to be used during treatment.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0308, enumScanMode.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0308,DicomConstants.DCM_DT_CS, enumScanMode.getValue());

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves type of the value encoded in this Item
	 * @return String - Type of the value encoded in this Item
	 */
	public String getScanMode()
	{
		Object objValue = getValue(0x300A,0x0308);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Number of Range Shifters.
	 * Number of range shifters associated with current beam.
	 * @param strReferencedReferenceImageNumber String value of Referenced Reference Image Number.
	 */
	public void setNumberofRangeShifters(String strReferencedReferenceImageNumber )
	{
		/* Accept the Number of Range Shifters  in String format of type IS.
		 * Number of range shifters associated with current beam.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0312, strReferencedReferenceImageNumber ,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0312,DicomConstants.DCM_DT_IS, strReferencedReferenceImageNumber );

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Number of Range Shifters.
	 * Number of range shifters associated with current beam.
	 * @return String - value of Referenced Reference Image Number.
	 */
	public String getNumberofRangeShifters()
	{
		Object objValue = getValue(0x300A,0x0312);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Number of Lateral Spreading Devices. 
	 * Number of lateral spreading devices associated with current beam.
	 * @param strNumberofLateralSpreadingDevices String value of Number of Lateral Spreading Devices.
	 */
	public void setNumberofLateralSpreadingDevices(String strNumberofLateralSpreadingDevices )
	{
		/* Accept the strNumberofLateralSpreadingDevices  in String format of type IS.
		 * Number of lateral spreading devices associated with current beam.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0330, strNumberofLateralSpreadingDevices ,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0330,DicomConstants.DCM_DT_IS, strNumberofLateralSpreadingDevices );

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Number of Lateral Spreading Devices. 
	 * @return String - value of Number of Lateral Spreading Devices.
	 */
	public String getNumberofLateralSpreadingDevices()
	{
		Object objValue = getValue(0x300A,0x0330);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Number of Range Modulators. 
	 * Number of range modulators associated with current beam.
	 * @param strNumber of Range Modulators String value of NumberofNumberofRangeModulators.
	 */
	public void setNumberofRangeModulators(String strNumberofRangeModulators)
	{
		/* Accept the strNumberofRangeModulators  in String format of type IS.
		 * Number of range modulators associated with current beam.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0340, strNumberofRangeModulators ,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0340,DicomConstants.DCM_DT_IS, strNumberofRangeModulators );

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Number of Number of Range Modulators. 
	 * @return String - value of Number of Range Modulators.
	 */
	public String getNumberofRangeModulators()
	{
		Object objValue = getValue(0x300A,0x0340);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets the Value Type Defined in Terms of Enum
	 * TABLE : Treatment delivery system table
	 * CHAIR : Treatment delivery system chair
	 * @param strPatientSupportType type of the value encoded in this Item
	 */
	public void setPatientSupportType(EnumPatientSupportType enumPatientSupportType)
	{
		/* Accept the Value Type in String format of type CS.
		 * TABLE : Treatment delivery system table
	     * CHAIR : Treatment delivery system chair
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A, 0x0350, enumPatientSupportType.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A, 0x0350,DicomConstants.DCM_DT_CS, enumPatientSupportType.getValue());

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves type of the PatientSupportType value encoded in this Item
	 * @return String - Type of the PatientSupportType encoded in this Item
	 */
	public String getPatientSupportType()
	{
		Object objValue = getValue(0x300A, 0x0350);
		if(objValue != null)
			return objValue.toString();
		return null;
	}


	/**
	 * Sets the PatientSupportID.
	 * @param strPatientSupportID
	 */
	public void setPatientSupportID(String strPatientSupportID)
	{
		/* Accept the strPatientSupportID in String format of type SH.
		 * User-specified identifier for manufacturer specific patient support devices.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A, 0x0352, strPatientSupportID,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x300A, 0x0352,DicomConstants.DCM_DT_SH, strPatientSupportID);

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves User-specified identifier for manufacturer specific patient support devices.
	 * @return String - value of PatientSupportID.
	 */
	public String getPatientSupportID()
	{
		Object objValue = getValue(0x300A, 0x0352);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Rescale Type.
	 * @param strPatientSupportAccessoryCode String value of Rescale Type.
	 */
	public void setPatientSupportAccessoryCode(String strPatientSupportAccessoryCode)
	{
		/* Accept the Patient Support Accessory Code in String format of type LO.
		 * A Patient Support accessory identifier to be read by a device such as a bar code reader.
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0354, strPatientSupportAccessoryCode,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0354,DicomConstants.DCM_DT_LO, strPatientSupportAccessoryCode);

		addDataElement(objIDataElement);
	}

	/**
	 * Return user-defined label identifier for Patient Support Accessory Code.
	 * @return String - value of PatientSupportAccessoryCode.
	 */
	public String getPatientSupportAccessoryCode()
	{
		Object objValue = getValue(0x300A,0x0354);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets FixationLightAzimuthalAngle
	 * Azimuthal angle in degrees of the fixation light coordinate around the IEC BEAM LIMITING DEVICE Y-axis. Used for eye treatments. 
	 * @param arrFixationLightAzimuthalAngle pair of floating point numbers
	 */
	public void setFixationLightAzimuthalAngle(float[] arrFixationLightAzimuthalAngle)
	{
		/* Accept the Fixation Light Azimuthal Angle in degree format of type FL.
		 * Azimuthal angle in degrees of the fixation light coordinate around the IEC BEAM LIMITING DEVICE Y-axis. Used for eye treatments. 
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0356, arrFixationLightAzimuthalAngle,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0356,DicomConstants.DCM_DT_FL, arrFixationLightAzimuthalAngle);

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Fixation Light Azimuthal Angle.
	 * @return float[] - Float array of FixationLightAzimuthalAngle.
	 */
	public float[] getFixationLightAzimuthalAngle()
	{
		Object objValue = getValue(0x300A,0x0356);
		if(objValue != null)
			return (float[])objValue;
		return null;
	}

	/**
	 * Sets FixationLightPolarAngle
	 * Polar angle in degrees of the fixation light coordinate. Used for eye treatments. 
	 * @param arrFixationLightPolarAngle pair of floating point numbers
	 */
	public void setFixationLightPolarAngle(float[] arrFixationLightAzimuthalAngle)
	{
		/* Accept the Fixation Light Polar Angle in degree format of type FL.
		 * Polar angle in degrees of the fixation light coordinate. Used for eye treatments. 
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x0358, arrFixationLightAzimuthalAngle,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x300A,0x0358,DicomConstants.DCM_DT_FL, arrFixationLightAzimuthalAngle);

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Fixation Light Polar Angle.
	 * @return float[] - Float array of FixationLightPolarAngle.
	 */
	public float[] getFixationLightPolarAngle()
	{
		Object objValue = getValue(0x300A,0x0358);
		if(objValue != null)
			return (float[])objValue;
		return null;
	}

	
}
