/*******************************************************************************
 *  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.dicommodel.modules;




import cdac.medinfo.sdk.dcm30_04.baselibs.ExposureIndexMacro;
import cdac.medinfo.sdk.dcm30_04.baselibs.Tag;
import cdac.medinfo.sdk.dcm30_04.baselibs.XRayFiltrationMacro;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITag;
import cdac.medinfo.sdk.dcm30_04.enums.EnumAnodeTargetMaterial;
import cdac.medinfo.sdk.dcm30_04.enums.EnumOrganExposed;
import cdac.medinfo.sdk.dcm30_04.enums.EnumRectificationType;
import cdac.medinfo.sdk.dcm30_04.exceptions.InvalidModuleException;
import cdac.medinfo.sdk.dcm30_04.utils.DicomConstants;
import cdac.medinfo.sdk.dcm30_04.utils.ISingleCollection;
import cdac.medinfo.sdk.dcm30_04.utils.SingleCollection;

// TODO: Auto-generated Javadoc
/**
 \* This module describes the attributes related to dose delivery from an X-Ray source during the
 * acquisition of an X-Ray image.
 * 
 * 
 */
public class XRayAcquisitionDoseModule extends Module  
{

 
 /**
  * The obj single collection.
  */
 public static ISingleCollection<ITag> objSingleCollection = null;
	 

	/**
	 * Instantiates a new x ray acquisition dose module.
	 * 
	 * @param objIDataSet the obj i data set
	 */
 
 	XRayFiltrationMacro objXRayFiltrationMacro=null;
 	ExposureIndexMacro objExposureIndexMacro=null;
	public XRayAcquisitionDoseModule(IDataSet objIDataSet)
	{
		super(objIDataSet);
	}

	static
	{
		objSingleCollection = new SingleCollection<ITag>();
		objSingleCollection.add(new Tag(0x0018,0x0060));
		objSingleCollection.add(new Tag(0x0018,0x1110));
		objSingleCollection.add(new Tag(0x0018,0x1111));
		objSingleCollection.add(new Tag(0x0018,0x1150));
		objSingleCollection.add(new Tag(0x0018,0x1151));
		objSingleCollection.add(new Tag(0x0018,0x1152));
		objSingleCollection.add(new Tag(0x0018,0x1153));
		objSingleCollection.add(new Tag(0x0018,0x1156));
		objSingleCollection.add(new Tag(0x0018,0x1191));
		objSingleCollection.add(new Tag(0x0018,0x115E));
		objSingleCollection.add(new Tag(0x0018,0x11A0));
		objSingleCollection.add(new Tag(0x0018,0x1405));
		objSingleCollection.add(new Tag(0x0018,0x7050));
		objSingleCollection.add(new Tag(0x0018,0x7052));
		objSingleCollection.add(new Tag(0x0018,0x7054));
		objSingleCollection.add(new Tag(0x0018,0x8150));
		objSingleCollection.add(new Tag(0x0018,0x8151));
		objSingleCollection.add(new Tag(0x0040,0x0302));
		objSingleCollection.add(new Tag(0x0040,0x0303));
		objSingleCollection.add(new Tag(0x0040,0x0306));
		objSingleCollection.add(new Tag(0x0040,0x0310));
		objSingleCollection.add(new Tag(0x0040,0x0312));
		objSingleCollection.add(new Tag(0x0040,0x0314));
		objSingleCollection.add(new Tag(0x0040,0x0316));
		objSingleCollection.add(new Tag(0x0040,0x0318));
		objSingleCollection.add(new Tag(0x0040,0x8302));
	}

	/**
	 * This method validates each Attribute in the Module according to the Type
	 * of the Attribute.Attributes are of 5 types.
	 * Type 1,Type 2 are Mandatory:
	 * Mandatory Attributes have to present in the Module.
	 * Type 1C,2C are Conditional:
	 * Conditional Attributes' presence depend on a condition.
	 * If the condition is satisfied the Attribute has to be present.
	 * Type 3 are Optional
	 * Optional Attributes can be added as and when required.
	 * 
	 * @return boolean - returns validation status as success or failure
	 * 
	 * @throws InvalidModuleException - If validation of Module fails
	 */
	public boolean validateModule() throws InvalidModuleException
	{
		/*All attributes in this module are optional*/
		return true;
	}

	/**
	 * Sets Peak kilo voltage output of the x-ray generator used.
	 * 
	 * @param strKVP :String value of KVP
	 */
	public void setKVP(String strKVP)
	{
		/* Accept Peak kilo voltage output of the x-ray generator used.
		 * 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 Hash Map
		 */
		addDataElement(0x0018, 0x0060, DicomConstants.DCM_DT_DS, strKVP);
	}

	/**
	 * Retrieves Peak kilo voltage output of the x-ray generator used.
	 * 
	 * @return String - String value of KVP
	 */
	public String getKVP()
	{
		Object objectValue = getValue(0x0018, 0x0060);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets X-Ray Tube Current in MilliA.
	 * 
	 * @param strXRayTubeCurrent the str x ray tube current
	 */
	public void setXRayTubeCurrent(String strXRayTubeCurrent)
	{
		/* Accept X-Ray Tube Current 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
		 */
		addDataElement(0x0018, 0x1151, DicomConstants.DCM_DT_IS, strXRayTubeCurrent);
	}

	/**
	 * Retrieves X-Ray Tube Current in mA.
	 * 
	 * @return String - String value of X-Ray Tube Current
	 */
	public String getXRayTubeCurrent()
	{Object objectValue = getValue(0x0018,0x1151);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets X-Ray Tube Current in MicroA.
	 * 
	 * @param strXRayTubeCurrentInuA the str x ray tube current in micro a
	 */
	public void setXRayTubeCurrentInuA(String strXRayTubeCurrentInuA)
	{
		/* Accept X-Ray Tube Current In Micro A 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 Hash Map
		 */
		addDataElement(0x0018, 0x8151, DicomConstants.DCM_DT_DS, strXRayTubeCurrentInuA);
	}

	/**
	 * Return X-Ray Tube Current in MicroA.
	 * 
	 * @return  String - String value of X-Ray Tube Current in MicroA
	 */
	public String getXRayTubeCurrentInuA()
	{
		Object objectValue = getValue(0x0018, 0x8151);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets duration of X-Ray exposure in msec.
	 * 
	 * @param strExposureTime the str exposure time
	 */
	public void setExposureTime(String strExposureTime)
	{
		/* Accept Exposure Time 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
		 */
		addDataElement(0x0018, 0x1150, DicomConstants.DCM_DT_IS, strExposureTime);
	}

	/**
	 * Return duration of X-Ray exposure in msec.
	 * 
	 * @return  String - String value of Exposure Time
	 */
	public String getExposureTime()
	{
		Object objectValue = getValue(0x0018, 0x1150);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets duration of X-Ray exposure in micro second.
	 * 
	 * @param strExposureTimeInuS the str exposure time in micro s
	 */
	public void setExposureTimeInuS(String strExposureTimeInuS)
	{
		/* Accept Exposure Time in Micro Seconds 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 Hash Map
		 */
		addDataElement(0x0018, 0x8150, DicomConstants.DCM_DT_IS, strExposureTimeInuS);
	}

	/**
	 * Return duration of X-Ray exposure in Micro seconds.
	 * 
	 * @return  String - String value of Exposure Time in Micro seconds
	 */
	public String getExposureTimeInuS()
	{
		Object objectValue = getValue(0x0018, 0x8150);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets the exposure expressed in mAs, for example calculated from Exposure Time
	 * and X-ray Tube Current.
	 * 
	 * @param strExposure : String value of The exposure expressed in mAs
	 */
	public void setExposure(String strExposure)
	{
		/*Accept The exposure expressed in mAs 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
		 */
		addDataElement(0x0018, 0x1152, DicomConstants.DCM_DT_IS, strExposure);
	}

	/**
	 * Returns exposure expressed in mAs, for example calculated from Exposure Time.
	 * 
	 * @return String - String value of Exposure
	 */
	public String getExposure()
	{
		Object objectValue = getValue(0x0018, 0x1152);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets the exposure expressed in Micro As, for example calculated from Exposure Time
	 * and X-ray Tube Current.
	 * 
	 * @param strExposureInuAs :String value of The exposure expressed in Micro As
	 */
	public void setExposureInuAs(String strExposureInuAs)
	{
		/*Accept The exposure expressed in MicroAs 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
		 */
		addDataElement(0x0018, 0x1153, DicomConstants.DCM_DT_IS, strExposureInuAs);
	}

	/**
	 * Returns the exposure expressed in Micro As.
	 * 
	 * @return String - String value of Exposure in Micro As
	 */
	public String getExposureInuAs()
	{
		Object objectValue = getValue(0x0018, 0x1153);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets Distance in mm from transmission source to the detector face. Required if Image
	 * Type (0008,0008) Value 4 is TRANSMISSION, Value 3 is not TOMO,
	 * and a sequence Item is present.
	 * 
	 * @param strDistanceSourceToDetector the str distance source to detector
	 * 
	 * @return the int
	 */
	public void setDistanceSourceToDetector(String strDistanceSourceToDetector)
	{
		/*Accept the Distance Source to Detector 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
		 */
		addDataElement(0x0018,0x1110, DicomConstants.DCM_DT_DS, strDistanceSourceToDetector);
	}

	/**
	 * Return Distance in mm from transmission source to the detector face.
	 * 
	 * @return String - String value of Distance Source to Detector
	 */
	public String getDistanceSourceToDetector()
	{Object objectValue = getValue(0x0018,0x1110);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}


	/**
	 * Sets Distance in mm from source to isocenter.
	 * 
	 * @param strDistanceSourceToPatient :String value of Distance of Source To Patient
	 */
	public void setDistanceSourceToPatient(String strDistanceSourceToPatient)
	{
		/*Accept Distance in mm from source to isocenter 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 Hash Map
		 */
		addDataElement(0x0018, 0x1111, DicomConstants.DCM_DT_DS, strDistanceSourceToPatient);
	}

	/**
	 * Retrieves Distance in mm from source to isocenter.
	 * 
	 * @return String - String value of DistanceSource To Patient.
	 */
	public String getDistanceSourceToPatient()
	{Object objectValue = getValue(0x0018,0x1111);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets X-Ray dose, measured in dGy*cm*cm, to which the patient was exposed for the
	 * acquisition of this image plus any nondigitally recorded fluoroscopy which may
	 * have been performed to prepare for the acquisition of this image.
	 * 
	 * @param strImageAndFluoroscopyAreaDoseProduct the str image area dose product
	 */
	public void setImageAndFluoroscopyAreaDoseProduct(String strImageAndFluoroscopyAreaDoseProduct)
	{
		/*Accept Image identification characteristics in String format of type CS.
		 * Read the Transfer Syntax and check to create ImplicitDE or ExplicitDE .
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		addDataElement(0x0018,0x115E, DicomConstants.DCM_DT_DS, strImageAndFluoroscopyAreaDoseProduct);
	}

	/**
	 * Returns shape of the Image Intensifier Field of View.
	 * 
	 * @return String - String value of Image Area Dose Product
	 */
	public String getImageAndFluoroscopyAreaDoseProduct()
	{
		 Object objValue = getValue(0x0018,0x115E);
   if(objValue!=null)
      return objValue.toString();
   return null;

	}

	/**
	 * Sets the average thickness in mm of the body part examined when compressed, if
	 * compression has been applied during exposure.
	 * 
	 * @param strBodyPartThickness the str body part thickness
	 */
	public void setBodyPartThickness(String strBodyPartThickness)
	{
		/* Accept Body Part Thickness 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 Hash Map
		 */
		addDataElement(0x0018, 0x11A0, DicomConstants.DCM_DT_DS, strBodyPartThickness);
	}

	/**
	 * Retrievs the average thickness in mm of the body part examined when compressed, if
	 * compression has been applied during exposure.
	 * 
	 * @return String - String value of Body Part Thickness
	 */
	public String getBodyPartThickness()
	{
		 Object objValue = getValue(0x0018,0x11A0);
   if(objValue!=null)
      return objValue.toString();
   return null;

	}

	/**
	 * Sets the Relative x-ray exposure on the plate. Meaning of values is implementation
	 * specific. May be used to adjust the dynamic range of the plate digitizer (scanner).
	 * 
	 * @param strRelativeXRayExposure the str relative x ray exposure
	 */
	public void setRelativeXRayExposure(String strRelativeXRayExposure)
	{
		/*Accept Relative X-ray Exposure.
		 * 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
		 */
		addDataElement(0x0018, 0x1405, DicomConstants.DCM_DT_IS, strRelativeXRayExposure);
	}

	/**
	 * Retrieves the Relative x-ray exposure on the plate.
	 * 
	 * @return String - String value of Relative X-ray Exposure.
	 */
	public String getRelativeXRayExposure()
	{Object objectValue = getValue(0x0018,0x1405);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets Average entrance dose value measured in dGy at the surface of the patient during
	 * the acquisition of this image.
	 * 
	 * @param shEntranceDose - short value of Entrance Dose.
	 */
	public void setEntranceDose(short shEntranceDose)
	{
		/* Accept the Entrance Dose of type US.
		 * 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
		 */
		addDataElement(0x0040,0x0302, DicomConstants.DCM_DT_US, shEntranceDose);
	}

	/**
	 * Retrieves Average entrance dose value measured in dGy.
	 * 
	 * @return short - short value of Entrance Dose.
	 */
	public short getEntranceDose()
	{Object objectValue = getValue(0x0018,0x1405);
		if(objectValue!=null)
			return Short.parseShort(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Sets Average entrance dose value measured in mGy at the surface of the patient during
	 * the acquisition of this image.
	 * 
	 * @param strEntranceDoseInMGy - String value of Entrance Dose In MGy.
	 */
	public void setEntranceDoseInMGy(String strEntranceDoseInMGy)
	{
		/*Accept Entrance Dose in mGy in String format of type DS.
		 * Read the Transfer Syntax and check to create ImplicitDE or ExplicitDE .
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		addDataElement(0x0040,0x8302, DicomConstants.DCM_DT_DS, strEntranceDoseInMGy);
	}

	/**
	 * Retrieves Average entrance dose value measured in mGy.
	 * 
	 * @return String - String value of Entrance Dose In MGy.
	 */
	public String getEntranceDoseInMGy()
	{Object objectValue = getValue(0x0040,0x8302);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets Typical dimension of the exposed area at the detector plane. If Rectangular: row
	 * dimension followed by column; if Round: diameter. Measured in cm.
	 * 
	 * @param arrShExposedArea - short array of Exposed Area.
	 */
	public void setExposedArea(short[] arrShExposedArea)
	{
		/*Accept Image identification characteristics in String Array format of type CS.
		 * Read the Transfer Syntax and check to create ImplicitDE or ExplicitDE .
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		addDataElement(0x0040,0x0303, DicomConstants.DCM_DT_US, arrShExposedArea);
	}

	/**
	 * Retrieves Typical dimension of the exposed area at the detector plane.
	 * 
	 * @return short[] - short array of Exposed Area.
	 */
	public short[] getExposedArea()
	{Object objectValue = getValue(0x0040,0x0303);
		if(objectValue!=null)
			return (short[])objectValue;
		return null;
	}

	/**
	 * Sets Distance in mm from the source to the surface of the patient closest to the source
	 * during the acquisition of this image.
	 * 
	 * @param strDistanceSourceToEntrance - String value of Distance Source To Entrance.
	 */
	public void setDistanceSourceToEntrance(String strDistanceSourceToEntrance)
	{
		/*Accept Image identification characteristics in String format of type CS.
		 * Read the Transfer Syntax and check to create ImplicitDE or ExplicitDE .
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		addDataElement(0x0040,0x0306, DicomConstants.DCM_DT_DS, strDistanceSourceToEntrance);
	}

	/**
	 * Retrieves Distance in mm from the source to the surface of the patient closest to the source
	 * during the acquisition of this image.
	 * 
	 * @return String - String value of Distance Source To Entrance.
	 */
	public String getDistanceSourceToEntrance()
	{Object objectValue = getValue(0x0040,0x0306);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets User-defined comments on any special conditions related to radiation dose
	 * encountered during the acquisition of this image.
	 * 
	 * @param strCommentsOnRadiationDose - String value of Comments on Radiation Dose.
	 */
	public void setCommentsOnRadiationDose(String strCommentsOnRadiationDose)
	{
		/*Accept Image identification characteristics in String format of type CS.
		 * Read the Transfer Syntax and check to create ImplicitDE or ExplicitDE .
		 * Set the iGroupNumber and iElementNumber to ImplicitDE object 
		 * Set the iVRType
		 * Set length from the element
		 * Add this element to the Hash Map
		 */
		addDataElement(0x0040,0x0310, DicomConstants.DCM_DT_ST, strCommentsOnRadiationDose);
	}

	/**
	 * Retrieves User-defined comments on any special conditions related to radiation dose
	 * encountered during the acquisition of this image.
	 * 
	 * @return String - String value of Comments on Radiation Dose.
	 */
	public String getCommentsOnRadiationDose()
	{Object objectValue = getValue(0x0040,0x0310);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * The X-Ray output at the patient entrance surface and kVp used to acquire the image, measured in mGy/mAs.
	 * 
	 * @param strXRayOutput String value of XRay Output
	 */
	public void setXRayOutput(String strXRayOutput)
	{
		/* Accept X-Ray Output 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 Hash Map
		 */
		addDataElement(0x0040,0x0312, DicomConstants.DCM_DT_DS, strXRayOutput);
	}

	/**
	 * Retrieves X-Ray output at the patient entrance surface and kVp used to acquire the image, measured in mGy/mAs.
	 * 
	 * @return String - String value of X-Ray Output.
	 */
	public String getXRayOutput()
	{Object objectValue = getValue(0x0040,0x0312);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets the thickness of Aluminum in mm required to reduce the X-Ray Output (0040,0312) by a factor of two.
	 * 
	 * @param strHalfValueLayer - String value of Half Value Layer.
	 */
	public void setHalfValueLayer(String strHalfValueLayer)
	{
		/* Accept Half Value Layer 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 Hash Map
		 */
		addDataElement(0x0040,0x0314, DicomConstants.DCM_DT_DS, strHalfValueLayer);
	}

	/**
	 * Retrieves the thickness of Aluminum in mm required to reduce the X-Ray Output (0040,0312) by a factor of two.
	 * 
	 * @return String - String value of Half Value Layer.
	 */
	public String getHalfValueLayer()
	{Object objectValue = getValue(0x0040,0x0314);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets Average organ dose value measured in dGy during the acquisition of this image.
	 * 
	 * @param strOrganDose - String value of Organ Dose.
	 */
	public void setOrganDose(String strOrganDose)
	{
		/* Accept Organ Dose 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 Hash Map
		 */
		addDataElement(0x0040,0x0316, DicomConstants.DCM_DT_DS, strOrganDose);
	}

	/**
	 * Retrieves Average organ dose value measured in dGy during the acquisition of this image.
	 * 
	 * @return String - String value of Organ Dose.
	 */
	public String getOrganDose()
	{Object objectValue = getValue(0x0040,0x0316);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets Organ to which Organ Dose (0040,0316) applies. Defined Terms:BREAST,GONADS,BONE MARROW,FETUS,LENS.
	 * 
	 * @param enumOrganExposed - Enum value of Organ Exposed.
	 */
	public void setOrganExposed(EnumOrganExposed enumOrganExposed)
	{
		/* Accept Organ Exposed 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
		 */
		addDataElement(0x0040,0x0318, DicomConstants.DCM_DT_DS, enumOrganExposed.getValue());
	}

	/**
	 * Retrieves Organ to which Organ Dose (0040,0316) applies.
	 * 
	 * @return String - String value of Organ Exposed.
	 */
	public String getOrganExposed()
	{Object objectValue = getValue(0x0040,0x0318);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets the primary material in the anode of the X-Ray source. Defined Terms: TUNGSTEN,MOLYBDENUM,RHODIUM.
	 * 
	 * @param enumAnodeTargetMaterial - enum value of the primary material in the anode of the X-Ray source.
	 */
	public void setAnodeTargetMaterial(EnumAnodeTargetMaterial enumAnodeTargetMaterial)
	{
		/* Accept Organ Exposed 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
		 */
		addDataElement(0x0018,0x1191, DicomConstants.DCM_DT_CS, enumAnodeTargetMaterial.getValue());
	}

	/**
	 * Retrieves primary material in the anode of the X-Ray source.
	 * 
	 * @return String - String value of Anode Target Material.
	 */
	public String getAnodeTargetMaterial()
	{Object objectValue = getValue(0x0018,0x1191);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	

	/**
	 * Sets type of rectification used in the X-Ray generator.Defined Terms:SINGLE PHASE,THREE PHASE,CONST POTENTIAL,
	 * 
	 * @param enumRectificationType - enum value of Rectification Type.
	 */
	public void setRectificationType(EnumRectificationType enumRectificationType)
	{
		/* Accept Rectification Type 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
		 */
		addDataElement(0x0018,0x1156, DicomConstants.DCM_DT_CS, enumRectificationType.getValue());
	}

	/**
	 * Retrieves type of rectification used in the X-Ray generator.
	 * 
	 * @return String - String value of Rectification Type.
	 */
	public String getRectificationType()
	{Object objectValue = getValue(0x0018,0x1156);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}
	
	/**
	 * Returns instance of Basic Pixel Spacing Calibration Macro.
	 * 
	 * @return Instance of Basic Pixel Spacing Calibration Macro
	 */
	public XRayFiltrationMacro getXRayFiltrationMacro()
	{
		if(objXRayFiltrationMacro == null)
		{
			objXRayFiltrationMacro = new XRayFiltrationMacro(objIDataSet,objIDictionaryReader);
		}
		return objXRayFiltrationMacro;
	}
	
	/**
	 * Returns instance of Basic Pixel Spacing Calibration Macro.
	 * 
	 * @return Instance of Basic Pixel Spacing Calibration Macro
	 */
	public ExposureIndexMacro getExposureIndexMacro()
	{
		if(objExposureIndexMacro == null)
		{
			objExposureIndexMacro = new ExposureIndexMacro(objIDataSet,objIDictionaryReader);
		}
		return objExposureIndexMacro;
	}

	/**
	 * This method returns the custom collection containing the list of DataElements belonging to the
	 * XRay Acquisition Dose Module specified by DICOM Standard.
	 * 
	 * @return collection - custom collection containing the list of DataElements belonging to the XRay Acquisition Dose Module
	 */
	public ISingleCollection<ITag> getVectorOfKeys()
	{
		return objSingleCollection;
	}
}
