/*******************************************************************************
 *  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.IDictionaryReader;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITransferSyntax;
import cdac.medinfo.sdk.dcm30_04.enums.EnumFlowCompensation;
import cdac.medinfo.sdk.dcm30_04.enums.EnumInversionRecovery;
import cdac.medinfo.sdk.dcm30_04.exceptions.ConditionFailedException;
import cdac.medinfo.sdk.dcm30_04.exceptions.InvalidItemException;
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;

import cdac.medinfo.sdk.dcm30_04.enums.EnumFlowCompensationDirection;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSpoiling;
import cdac.medinfo.sdk.dcm30_04.enums.EnumT2Preparation;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSpectrallySelectedExcitation;
import cdac.medinfo.sdk.dcm30_04.enums.EnumSpatialPreSaturation;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPartialFourier;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPartialFourierDirection;
import cdac.medinfo.sdk.dcm30_04.enums.EnumParallelAcquisition;
import  cdac.medinfo.sdk.dcm30_04.enums.EnumParallelAcquisitionTechnique;
/**
* This item class contains methods to validate, set and get attributes in {@link MRModifierSequence}. 
*/
public class MRModifierSequenceItem extends Item
{
	

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

	/**
	 * This constructor creates the item and internal MRModifierSequenceItem with default TransferSyntax 
	 */
	MRModifierSequenceItem()
	{
		super();
	}

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

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

	/**
	 * Validates all the attributes in MRModifierSequenceItem  that are present in the DataSet
	 * @return int - Success -true, Failure - false
	 * @throws InvalidItemException throws InvalidItemException If Mandatory or Conditional element fails.
	 */
	public boolean validateForModule()  throws InvalidItemException
	{
		try
		{
			/*
			 * Since this class is implemented while implementing MACRO, Validations required for modules
			 * is not cleared that is modules using this item is not known now.
			 *  Validation conditions for attributes of these Item is not cleared.  
			 *  Refer p.d.f Chapter 3
			 *  Page No :- 610
			 */
		}
		catch( ConditionFailedException ce)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(ce.getMessage());
			}
			throw new InvalidItemException(this.getClass().getSimpleName(),ce); 
		}
		catch( MandatoryMissingException me)
		{
			if(DicomConfig.createInstance().isLoggingOn())
			{
				DicomLogger.getLogger().log(me.getMessage());
			}
			throw new InvalidItemException(this.getClass().getSimpleName(),me);
		}
		return true;
	}
	
	/**
	 * Sets Inversion Recovery preparatory sequence.
	 * @param enumInversionRecovery Enum value of Inversion Recovery.
	 */
	public void setInversionRecovery(EnumInversionRecovery enumInversionRecovery)
	{
		/* Accept the Inversion Recovery 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,0x9009, enumInversionRecovery.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9009,DicomConstants.DCM_DT_CS, enumInversionRecovery.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Inversion Recovery preparatory sequence.
	 * @return String value of Inversion Recovery.
	 */
	public String getInversionRecovery()
	{
		Object objValue = getValue(0x0018,0x9009);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Times in ms after the middle of inverting RF pulse to middle of excitation pulse to 
	 * detect the amount of longitudinal magnetization.
	 * @param arrdblInversionTimes array of double values for Real World Value LUT Data
	 */
	public void setInversionTimes(double[] arrdblInversionTimes)
	{
		/*Accept the Value Type in double format of type FD.
		 * 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,0x9079, arrdblInversionTimes,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9079,DicomConstants.DCM_DT_FD, arrdblInversionTimes);

		addDataElement(objIDataElement);

	}

	/**
	 * Retrieves Times in ms after the middle of inverting RF pulse to middle of excitation pulse to 
	 * detect the amount of longitudinal magnetization.
	 * @return double[] - double values of cosines in normal vector
	 */
	public double[] getInversionTimes()
	{
		Object objValue = getValue(0x0018,0x9079);
		if(objValue != null)
			return (double[])objValue;
		return null;
	}
	
	/**
	 * Sets Flow Compensation.
	 * @param enumFlowCompensation Enum value of Flow Compensation.
	 */
	public void setFlowCompensation(EnumFlowCompensation enumFlowCompensation)
	{
		/* Accept the Flow Compensation 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,0x9010, enumFlowCompensation.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9010,DicomConstants.DCM_DT_CS, enumFlowCompensation.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Flow Compensation.
	 * @return String value of Flow Compensation.
	 */
	public String getFlowCompensation()
	{
		Object objValue = getValue(0x0018,0x9010);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Flow Compensation Direction.
	 * @param enumFlowCompensation Enum value of Flow Compensation Direction.
	 */
	public void setFlowCompensationDirection(EnumFlowCompensationDirection enumFlowCompensationDirection)
	{
		/* Accept the Flow Compensation Direction 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,0x9183, enumFlowCompensationDirection.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9183,DicomConstants.DCM_DT_CS, enumFlowCompensationDirection.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Flow Compensation Direction.
	 * @return String value of Flow Compensation Direction.
	 */
	public String getFlowCompensationDirection()
	{
		Object objValue = getValue(0x0018,0x9183);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Spoiling.
	 * @param enumSpoiling Enum value of Spoiling.
	 */
	public void setSpoiling(EnumSpoiling enumSpoiling)
	{
		/* Accept the Spoiling 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,0x9016, enumSpoiling.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9016,DicomConstants.DCM_DT_CS, enumSpoiling.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Spoiling.
	 * @return String value of Spoiling.
	 */
	public String getSpoiling()
	{
		Object objValue = getValue(0x0018,0x9016);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets T2 prepared Pulse Sequence.
	 * @param enumT2Preparation Enum value of T2 Preparation.
	 */
	public void setT2Preparation(EnumT2Preparation enumT2Preparation)
	{
		/* Accept the T2 Preparation 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,0x9021, enumT2Preparation.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9021,DicomConstants.DCM_DT_CS, enumT2Preparation.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves T2 prepared Pulse Sequence.
	 * @return String value of T2 Preparation.
	 */
	public String getT2Preparation()
	{
		Object objValue = getValue(0x0018,0x9021);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Spectrally Selected Excitation.
	 * @param enumSpectrallySelectedExcitation Enum value of Spectrally Selected Excitation.
	 */
	public void setSpectrallySelectedExcitation(EnumSpectrallySelectedExcitation enumSpectrallySelectedExcitation)
	{
		/* Accept the Spectrally Selected Excitation 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,0x9026, enumSpectrallySelectedExcitation.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9026,DicomConstants.DCM_DT_CS, enumSpectrallySelectedExcitation.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Spectrally Selected Excitation.
	 * @return String value of Spectrally Selected Excitation.
	 */
	public String getSpectrallySelectedExcitation()
	{
		Object objValue = getValue(0x0018,0x9026);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Spatial Pre-saturation.
	 * @param enumSpatialPreSaturation Enum value of Spatial Pre-saturation.
	 */
	public void setSpatialPreSaturation(EnumSpatialPreSaturation enumSpatialPreSaturation)
	{
		/* Accept the Spatial Pre-saturation 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,0x9027, enumSpatialPreSaturation.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9027,DicomConstants.DCM_DT_CS, enumSpatialPreSaturation.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Spatial Pre-saturation.
	 * @return String value of Spatial Pre-saturation.
	 */
	public String getSpatialPreSaturation()
	{
		Object objValue = getValue(0x0018,0x9027);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Partial Fourier.
	 * @param enumPartialFourier Enum value of Partial Fourier.
	 */
	public void setPartialFourier(EnumPartialFourier enumPartialFourier)
	{
		/* Accept the Partial Fourier 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,0x9081, enumPartialFourier.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9081,DicomConstants.DCM_DT_CS, enumPartialFourier.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Partial Fourier.
	 * @return String value of Partial Fourier.
	 */
	public String getPartialFourier()
	{
		Object objValue = getValue(0x0018,0x9081);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Direction of Partial Fourier.
	 * @param enumPartialFourierDirection Enum value of Partial Fourier Direction.
	 */
	public void setPartialFourierDirection(EnumPartialFourierDirection enumPartialFourierDirection)
	{
		/* Accept the Partial Fourier Direction 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,0x9036, enumPartialFourierDirection.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9036,DicomConstants.DCM_DT_CS, enumPartialFourierDirection.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Direction of Partial Fourier.
	 * @return String value of Partial Fourier Direction.
	 */
	public String getPartialFourierDirection()
	{
		Object objValue = getValue(0x0018,0x9036);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Parallel acquisition has been used to reduce measurement time.
	 * @param enumParallelAcquisition Enum value of Parallel Acquisition.
	 */
	public void setParallelAcquisition(EnumParallelAcquisition enumParallelAcquisition)
	{
		/* Accept the Parallel Acquisition 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,0x9077, enumParallelAcquisition.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9077,DicomConstants.DCM_DT_CS, enumParallelAcquisition.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Parallel acquisition has been used to reduce measurement time.
	 * @return String value of Parallel Acquisition.
	 */
	public String getParallelAcquisition()
	{
		Object objValue = getValue(0x0018,0x9077);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Parallel acquisition characteristics.
	 * @param enumParallelAcquisitionTechnique Enum value of Parallel Acquisition.
	 */
	public void setParallelAcquisitionTechnique(EnumParallelAcquisitionTechnique enumParallelAcquisitionTechnique)
	{
		/* Accept the Parallel Acquisition Technique 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,0x9078, enumParallelAcquisitionTechnique.getValue(),getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9078,DicomConstants.DCM_DT_CS, enumParallelAcquisitionTechnique.getValue());

		addDataElement(objIDataElement);
	}

	/**
	 * Retrieves Parallel acquisition characteristics.
	 * @return String value of Parallel Acquisition Technique.
	 */
	public String getParallelAcquisitionTechnique()
	{
		Object objValue = getValue(0x0018,0x9078);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Measurement time reduction factor expressed as ratio of original and reduced measurement time for the inplane direction.
	 * @param dblParallelReductionFactorInplane String array of coordinates
	 */
	public void setParallelReductionFactorInplane(double dblParallelReductionFactorInplane)
	{
		/*Accept the Parallel Reduction Factor In-plane in double format of type FD.
		 * 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,0x9069, dblParallelReductionFactorInplane,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9069,DicomConstants.DCM_DT_FD, dblParallelReductionFactorInplane);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Measurement time reduction factor expressed as ratio of original and reduced measurement time for the inplane direction.
	 * @return double - double value of coordinates
	 */
	public double getParallelReductionFactorInplane()
	{
		Object objValue = getValue(0x0018,0x9069);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}
	
	/**
	 * Sets Measurement time reduction factor expressed as ratio of original and reduced measurement time for the out-ofplane direction
	 * @param dblParallelReductionFactoroutofplane String array of coordinates
	 */
	public void setParallelReductionFactoroutofplane(double dblParallelReductionFactoroutofplane)
	{
		/*Accept the Parallel Reduction Factor out-of-plane in double format of type FD.
		 * 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,0x9155, dblParallelReductionFactoroutofplane,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9155,DicomConstants.DCM_DT_FD, dblParallelReductionFactoroutofplane);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Measurement time reduction factor expressed as ratio of original and reduced measurement time for the out-ofplane direction
	 * @return double - double value of coordinates
	 */
	public double getParallelReductionFactoroutofplane()
	{
		Object objValue = getValue(0x0018,0x9155);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}
	
	/**
	 * Sets Measurement time reduction factor expressed as ratio of original and reduced measurement time for the out-ofplane direction
	 * @param dblParallelReductionFactorSecondInplane String array of coordinates
	 */
	public void setParallelReductionFactorSecondInplane(double dblParallelReductionFactorSecondInplane)
	{
		/*Accept the Parallel Reduction Factor Second In-plane in double format of type FD.
		 * 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,0x9168, dblParallelReductionFactorSecondInplane,getDictionaryReader());
		else
			objIDataElement = new ExplicitDE(0x0018,0x9168,DicomConstants.DCM_DT_FD, dblParallelReductionFactorSecondInplane);

		addDataElement(objIDataElement);
	}
	/**
	 * Retrieves Measurement time reduction factor expressed as ratio of original and reduced measurement time for the out-ofplane direction
	 * @return double - double value of coordinates
	 */
	public double getParallelReductionFactorSecondInplane()
	{
		Object objValue = getValue(0x0018,0x9168);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}
}
