/*******************************************************************************
 *  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.IDataSet;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDicomValue;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDictionaryReader;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IItem;
import cdac.medinfo.sdk.dcm30_04.exceptions.ConditionFailedException;
import cdac.medinfo.sdk.dcm30_04.exceptions.InvalidMacroException;
import cdac.medinfo.sdk.dcm30_04.exceptions.MandatoryMissingException;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConfig;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConstants;
import cdac.medinfo.sdk.dcm30_04.utils.DicomLogger;




/**
 * This Macro specifies the common attributes Enhanced MR Image Module and MR Spectroscopy Module.
 */
public class MRImageAndSpectroscopyInstanceMacro extends Macro  
{
	


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/*
	 * This constructor sets the DataSet as the DataHolder for this Macro.
	 * It also sets the TransferSyntax,DictionaryReader as the same as in DataSet
	 */
	/**
	 * This constructor constructs a Macro with specified DataSet.
	 * @param objDataSet Collection of DataElements 
	 */
	public MRImageAndSpectroscopyInstanceMacro(IDataSet objDataSet)
	{
		super(objDataSet);
	}

	/*
	 * This constructor sets the Dataset and the specified dictionaryReader into the Macro
	 * It also sets the transfersyntax as same as in Dataset
	 */
	/**
	 * This constructor constructs a Macro with specified DataSet and DictionaryReader
	 * @param objDataSet specifies the DataSet
	 * @param objDictionaryReader specifies the DICOM Dictionary reader to be used 
	 */
	public MRImageAndSpectroscopyInstanceMacro(IDataSet objDataSet,IDictionaryReader objDictionaryReader)
	{
		super(objDataSet,objDictionaryReader);
	}

	/*
	 * This constructor sets the Item as the DataHolder for this Macro.
	 * It also sets the TransferSyntax,DictionaryReader as the same as in Item
	 */
	/**
	 * This constructor constructs a Macro with the specified Item
	 * @param objItem specifies instance of Item class
	 */
	public MRImageAndSpectroscopyInstanceMacro(IItem objItem)
	{
		super(objItem);
	}

	/*
	 * This constructor sets the Item and the specified dictionaryReader into the Macro
	 * It also sets the transfersyntax as same as in Item
	 */
	/**
	 * This constructor constructs a Macro with the specified Item and DictionaryReader
	 * @param objItem specifies instance of Item class
	 * @param objDictionaryReader specifies the DICOM Dictionary reader to be used 
	 */
	public MRImageAndSpectroscopyInstanceMacro(IItem objItem,IDictionaryReader objDictionaryReader)
	{
		super(objItem, objDictionaryReader);
	}

	/**
	 * Validates all the attributes.
	 * @return boolean - Success -true, Failure -false.
	 * @throws InvalidMacroException throws InvalidMacroException If Mandatory or Conditional element fails.
	 */
	public boolean validate() throws InvalidMacroException
	{
		if(iMacroLevel == DicomConstants.DCM_MODULE_LEVEL_MACRO)
			return validate(objIDataSet);
		else if(iMacroLevel == DicomConstants.DCM_ITEM_LEVEL_MACRO)
			return validate(objIItem);
		return false;
	}

	/**
	 * Validates all the attributes in CodeSequenceMacro that are present in the DataSet
	 * @param objIDataSet collection of DataElements
	 * @return boolean - Success -true, Failure - false
	 * @throws InvalidMacroException throws InvalidMacroException If Mandatory or Conditional element fails.
	 */
	public static boolean validate(IDataSet objIDataSet) throws InvalidMacroException
	{
		try
		{

		}
		catch( ConditionFailedException ce)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(ce.getMessage());
			}
			throw new InvalidMacroException(MRImageAndSpectroscopyInstanceMacro.class.getSimpleName(),ce); 
		}
		catch( MandatoryMissingException me)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(me.getMessage());
			}
			throw new InvalidMacroException(MRImageAndSpectroscopyInstanceMacro.class.getSimpleName(),me);
		}
		return true;
	}

	/**
	 * Validates all the attributes in CodeSequenceMacro that are present in the DataSet
	 * @param objIItem collection of DataElements in a sequence
	 * @return boolean - Success -true, Failure - false
	 * @throws InvalidMacroException throws InvalidMacroException If Mandatory or Conditional element fails.
	 */
	public static boolean validate(IItem objIItem) throws InvalidMacroException
	{
		try
		{
		}
		catch( ConditionFailedException ce)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(ce.getMessage());
			}
			throw new InvalidMacroException(MRImageAndSpectroscopyInstanceMacro.class.getSimpleName(),ce); 
		}
		catch( MandatoryMissingException me)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(me.getMessage());
			}
			throw new InvalidMacroException(MRImageAndSpectroscopyInstanceMacro.class.getSimpleName(),me);
		}
		return true;
	}

	/**
	 * Sets a number identifying the single continuous gathering of data over a period of time which resulted in this image.
	 * @param strAcquisitionNumber String value of Acquisition Number
	 */
	public void setAcquisitionNumber(String strAcquisitionNumber)
	{
		/*Accept number identifying the single continuous gathering of data
		 * in String format of type IS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create.
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0020, 0x0012,strAcquisitionNumber,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0020, 0x0012, DicomConstants.DCM_DT_IS,strAcquisitionNumber);

		objIDataSet.addDataElement(objIDataElement);
	}

	/**
	 * Return the String value of the attribute Acquisition Number.
	 * @return String - returns the Acquisition Number
	 */
	public String getAcquisitionNumber()
	{
		Object objValue = getValue(0x0020, 0x0012);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets the date and time the acquisition of data that resulted in this image started.
	 * @param strAcquisitionDatetime String value of Acquisition Date and Time.
	 */
	public void setAcquisitionDatetime(String strAcquisitionDatetime)
	{
		/*Accept The Date and Time the acquisition of data that resulted in this image started in String format of type TM.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create.
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0008, 0x002A,strAcquisitionDatetime,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0008, 0x002A, DicomConstants.DCM_DT_DT,strAcquisitionDatetime);

		objIDataSet.addDataElement(objIDataElement);
	}

	/**
	 * Retrieves the Date and Time of Acquisition
	 * @return String - returns the Date and Time of Acquisition
	 */
	public String getAcquisitionDatetime()
	{
		Object objValue = getValue(0x0008, 0x002A);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets the time in seconds needed to run the prescribed pulse sequence.
	 * @param dAcquisitionDuration double value of Acquisition Duration.
	 */
	public void setAcquisitionDuration(double dAcquisitionDuration)
	{
		/* Accept Acquisition Duration in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create.
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0018, 0x9073,dAcquisitionDuration,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9073, DicomConstants.DCM_DT_FD,dAcquisitionDuration);

		objIDataSet.addDataElement(objIDataElement);
	}

	/**
	 * Retrieves the time in seconds needed to run the prescribed pulse sequence.
	 * @return double - double value of Acquisition Duration.
	 */
	public double getCardiacRRIntervalSpecified()
	{
		Object objValue = getValue(0x0018,0x9073);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Retrieves pre-initialized object of Referenced Raw Data 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 ReferencedRawDataSequence - instance of ReferencedRawDataSequence. 
	 */
	public ReferencedRawDataSequence getReferencedRawDataSequence()
	{
		ReferencedRawDataSequence objReferencedRawDataSequence = null;
		IDataElement objIDataElement =  getDataElement(0x0008,0x9121);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objReferencedRawDataSequence = (ReferencedRawDataSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objReferencedRawDataSequence = (ReferencedRawDataSequence)objDicomV3Factory.createSequence(0x0008,0x9121, objITransferSyntax, objIDictionaryReader);

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

	/**
	 * Retrieves pre-initialized object of Referenced Waveform 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 ReferencedWaveformSequence - instance of ReferencedWaveformSequence. 
	 */
	public ReferencedWaveformSequence getReferencedWaveformSequence()
	{
		ReferencedWaveformSequence objReferencedWaveformSequence = null;
		IDataElement objIDataElement =  getDataElement(0x0008,0x113A);
		if(objIDataElement != null)
		{
			IDicomValue objIDicomValue = objIDataElement.getDicomValue();
			if(objIDicomValue != null)
				objReferencedWaveformSequence = (ReferencedWaveformSequence)objIDicomValue;
		}
		else
		{
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			int iVRTransferSyntax = objITransferSyntax.getVRTransferSyntax();
			objIDataElement = null;
			objReferencedWaveformSequence = (ReferencedWaveformSequence)objDicomV3Factory.createSequence(0x0008,0x113A, objITransferSyntax, objIDictionaryReader);

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

	/**
	 * Sets Content Qualification Indicator.
	 * Enumerated Values:
	 * 1) PRODUCT.
	 * 2) RESEARCH.
	 * 3) SERVICE.
	 * @param strContentQualification String value of Content Qualification.
	 */
	public void setContentQualification(String strContentQualification)
	{
		/*Accept the Content Qualification in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0018, 0x9004, strContentQualification,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9004,DicomConstants.DCM_DT_CS, strContentQualification);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Content Qualification Indicator.
	 * @return String - value of Content Qualification.
	 */
	public String getContentQualification()
	{
		Object objValue = getValue(0x0018,0x9004);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets Nucleus that is resonant at the transmitter frequency.
	 * Defined Terms:
	 * 1H,3HE,7LI,13C,19F,23NA,31P,129XE.
	 * @param arrStrContentQualification String value of Resonant Nucleus.
	 */
	public void setResonantNucleus(String[] arrStrContentQualification)
	{
		/* Accept the Resonant Nucleus in String array format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0018, 0x9100, arrStrContentQualification,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9100,DicomConstants.DCM_DT_CS, arrStrContentQualification);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Nucleus that is resonant at the transmitter frequency.
	 * @return String - value of Resonant Nucleus.
	 */
	public String getResonantNucleus()
	{
		Object objValue = getValue(0x0018,0x9100);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets k-space filtering applied. Shall be NONE if no k-space filter.
	 *  Defined Terms:
	 *  1) COSINE.
	 *  2) COSINE_SQUARED.
	 *  3) FERMI.
	 *  4) GAUSSIAN.
	 *  5) HAMMING.
	 *  6) HANNING.
	 *  7) LORENTZIAN.
	 *  8) LRNTZ_GSS_TRNSFM.
	 *  9) RIESZ.
	 *  10) TUKEY.
	 *  11) NONE.
	 * @param strKSpaceFiltering String value of k-space Filtering.
	 */
	public void setKSpaceFiltering(String strKSpaceFiltering)
	{
		/*Accept the k-space Filtering in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)	
			objIDataElement = new ImplicitDE(0x0018, 0x9064, strKSpaceFiltering,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9064,DicomConstants.DCM_DT_CS, strKSpaceFiltering);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Content Qualification Indicator.
	 * @return String - value of k-space Filtering.
	 */
	public String getKSpaceFiltering()
	{
		Object objValue = getValue(0x0018,0x9064);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets nominal field strength of the MR Magnet,in Tesla.
	 * @param strMagneticFieldStrength String value of Magnetic Field Strength. 
	 */
	public void setMagneticFieldStrength(String strMagneticFieldStrength)
	{
		/*Accept the Magnetic Field Strength in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0018, 0x9087, strMagneticFieldStrength,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9087,DicomConstants.DCM_DT_DS, strMagneticFieldStrength);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves nominal field strength of the MR Magnet,in Tesla.
	 * @return String - value of Magnetic Field Strength. 
	 */
	public String getMagneticFieldStrength()
	{
		Object objValue = getValue(0x0018,0x9087);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets agency that established MR safety standard applicable to the acquisition of this Instance.
	 *  Defined Terms:
	 *  1) IEC.
	 *  2) FDA.
	 *  3) MHW.
	 * @param strApplicableSafetyStandardAgency String value of Applicable Safety Standard Agency.
	 */
	public void setApplicableSafetyStandardAgency(String strApplicableSafetyStandardAgency)
	{
		/*Accept the Applicable Safety Standard Agency in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0018, 0x9174, strApplicableSafetyStandardAgency,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9174,DicomConstants.DCM_DT_CS, strApplicableSafetyStandardAgency);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves agency that established MR safety standard applicable to the acquisition of this Instance.
	 * @return String - value of Applicable Safety Standard Agency.
	 */
	public String getApplicableSafetyStandardAgency()
	{
		Object objValue = getValue(0x0018,0x9174);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets name and Version of the applicable standard.
	 * @param strApplicableSafetyStandardDescription String value of Applicable Safety Standard Description.
	 */
	public void setApplicableSafetyStandardDescription(String strApplicableSafetyStandardDescription)
	{
		/*Accept the Applicable Safety Standard Description in String format of type CS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0018, 0x9175, strApplicableSafetyStandardDescription,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0018, 0x9175,DicomConstants.DCM_DT_LO, strApplicableSafetyStandardDescription);

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves agency that established MR safety standard applicable to the acquisition of this Instance.
	 * @return String - value of Applicable Safety Standard Description.
	 */
	public String getApplicableSafetyStandardDescription()
	{
		Object objValue = getValue(0x0018,0x9175);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Sets User-defined comments about the image.
	 * @param strImageComments String value of Image Comments.
	 */
	public void setImageComments(String strImageComments)
	{
		/*Accept the Image Comments in String format of type LT.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x0020, 0x4000, strImageComments,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x0020, 0x4000,DicomConstants.DCM_DT_LT, strImageComments);

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves User-defined comments about the image.
	 * @return String - value of Image Comments.
	 */
	public String getImageComments()
	{
		Object objValue = getValue(0x0020, 0x4000);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Isocenter coordinates (x,y,z), in mm. Specifies the location of themachine isocenter in the patient-based coordinate system associatedwith the Frame of Reference.
	 * @param strIsocenterPosition String value of Slice Thickness.
	 */
	public void setIsocenterPosition(String strIsocenterPosition)
	{
		/*Accept the strIsocenterPosition in String format of type DS.
		 * Read the Transfer Syntax and check if ImplicitDE or ExplicitDE to create
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Data Set
		 */
		IDataElement objIDataElement = null;
		if(objITransferSyntax.getVRTransferSyntax() == DicomConstants.DCM_VR_IMPLICIT)
			objIDataElement = new ImplicitDE(0x300A,0x012C, strIsocenterPosition,objIDictionaryReader);
		else
			objIDataElement = new ExplicitDE(0x300A,0x012C,DicomConstants.DCM_DT_DS, strIsocenterPosition);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Isocenter coordinates (x,y,z), in mm. 
	 * Specifies the location of themachine isocenter in the patient-based coordinate system associatedwith the Frame of Reference.
	 * @return String - value of Slice Thickness.
	 */
	public String getIsocenterPosition()
	{
		Object objValue = getValue(0x300A,0x012C);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

}
