/*******************************************************************************
 *  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.BasicPixelSpacingCalibrationMacro;
import cdac.medinfo.sdk.dcm30_04.baselibs.GeneralAnatomyOptionalMacro;
import cdac.medinfo.sdk.dcm30_04.baselibs.Tag;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITag;
import cdac.medinfo.sdk.dcm30_04.enums.EnumCassetteOrientation;
import cdac.medinfo.sdk.dcm30_04.enums.EnumCassetteSize;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPhotometricInterpretation;

import cdac.medinfo.sdk.dcm30_04.exceptions.InvalidModuleException;
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.utils.ISingleCollection;
import cdac.medinfo.sdk.dcm30_04.utils.SingleCollection;

// TODO: Auto-generated Javadoc
/**
 \* The class CRImageModule.
 */
public class CRImageModule extends Module  
{


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

	/**
	 * The obj general anatomy optional macro.
	 */
	
	BasicPixelSpacingCalibrationMacro objBasicPixelSpacingCalibrationMacro = null;

	GeneralAnatomyOptionalMacro objGeneralAnatomyOptionalMacro = null;

	/**
	 * Instantiates a new cR image module.
	 * 
	 * @param objIDataSet the obj i data set
	 */
	public CRImageModule(IDataSet objIDataSet)
	{
		super(objIDataSet);
	}
	static
	{
		objSingleCollection = new SingleCollection<ITag>();

		objSingleCollection.add(new Tag(0x0018,0x0060));
		objSingleCollection.add(new Tag(0x0018,0x1004));
		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,0x1164));
		objSingleCollection.add(new Tag(0x0018,0x1170));
		objSingleCollection.add(new Tag(0x0018,0x1400));
		objSingleCollection.add(new Tag(0x0018,0x1401));
		objSingleCollection.add(new Tag(0x0018,0x1402));
		objSingleCollection.add(new Tag(0x0018,0x1403));
		objSingleCollection.add(new Tag(0x0018,0x6000));
		objSingleCollection.add(new Tag(0x0028,0x0004));
		//Include 'General Anatomy Optional Macro' Table 10-7
	}

	/**
	 * 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 success or failure
	 * 
	 * @throws InvalidModuleException - If validation of Module fails
	 */
	public  boolean validateModule() throws InvalidModuleException
	{

		try
		{			if(!isPresent(0x0028,0x0004))
			throw new MandatoryMissingException("Missing Mandatory Element 0x0028,0x0004");
		}
		catch(MandatoryMissingException mme)
		{
			if(DicomConfig.createInstance().isLoggingOn())
				DicomLogger.getLogger().log(mme.getMessage());

			
				throw new InvalidModuleException(this.getClass().getSimpleName(),mme);

		}
		return true;
	}

	/**
	 * The method is used to set Specifies the intended interpretation of the pixel data.
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * Enumerated Values:
	 * MONOCHROME1
	 * MONOCHROME2
	 * 
	 * @param enumPhotometricInterpretation the enum photometric interpretation
	 */
	public void setPhotometricInterpretation(EnumPhotometricInterpretation enumPhotometricInterpretation)
	{
		/*Accept Specifies the intended interpretation of the pixel data in String format of type ST.
		 * 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(0x0028, 0x0004, DicomConstants.DCM_DT_CS, enumPhotometricInterpretation.getValue());
	}

	/**
	 * The method is used to set Peak kilo voltage output of the x-ray generator used
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @param strKVP the str 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);
	}

	/**
	 * The ID or serial number of the sensing plate upon which the image was acquired.
	 * 
	 * @param strPlateID - Specifies ID or serial number of the sensing plate
	 */ 
	public void setPlateID(String strPlateID)
	{
		/*Accept Plate ID .
		 * in String format of type LO.
		 * 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, 0x1004, DicomConstants.DCM_DT_LO, strPlateID);
	}

	/**
	 * The method is used to set Distance in mm from source to detector center.
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @param strDistanceSourceToDetector :String value of Data Reconstruction Diameter
	 */
	public void setDistanceSourceToDetector(String strDistanceSourceToDetector)
	{
		/*AcceptDistance in mm from source to detector center 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, 0x1110, DicomConstants.DCM_DT_DS, strDistanceSourceToDetector);
	}

	/**
	 * The method is used to set Distance in mm from source to isocenter
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @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);
	}

	/**
	 * The method is used to set Time of x-ray exposure in msec
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @param strExposureTime :String value of Time of x-ray exposure in msec
	 */
	public void setExposureTime(String strExposureTime)
	{
		/*Accept Time of x-ray exposure in msec 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);
	}

	/**
	 * The method is used to set X-ray Tube Current in mA.
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @param strXrayTubeCurrent :String value of X-ray Tube Current in mA.
	 */
	public void setXrayTubeCurrent(String strXrayTubeCurrent)
	{
		/*Accept X-ray Tube Current in mA 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);
	}

	/**
	 * The method is used to set The exposure expressed in mAs
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @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);
	}

	/**
	 * The method is used to set The exposure expressed in MicroAs
	 * The function accepts a String Value and creates the
	 * DE based on the transfer syntax and populates the DE with right values.
	 * This De is then added to the Module HashMap
	 * 
	 * @param strExposureinMicroAs :String value of The exposure expressed in mAs
	 */
	public void setExposureinMicroAs(String strExposureinMicroAs)
	{
		/*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, strExposureinMicroAs);
	}

	/**
	 * Set the Physical distance measured at the front plane of the Image Receptor housing
	 * between the center of each pixel. Specified by a numeric pair - row spacing value
	 * (delimiter) column spacing value - in mm. In the case of CR, the front plane is defined
	 * to be the external surface of the CR plate closest to the patient and radiation source.
	 * 
	 * @param arrStrImagerPixelSpacing the arr str imager pixel spacing
	 */
	public void setImagerPixelSpacing(String[] arrStrImagerPixelSpacing)
	{
		/*Accept Imager Pixel Spacing in String Array 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(0x0018, 0x1164, DicomConstants.DCM_DT_DS, arrStrImagerPixelSpacing);
	}

	/**
	 * The method is used to set Power in kW to the x-ray generator.
	 * 
	 * @param strGeneratorPower :String value of Power in kW to the x-ray generator.
	 */
	public void setGeneratorPower(String strGeneratorPower)
	{
		/*Accept Power in kW to the x-ray generator. 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, 0x1170, DicomConstants.DCM_DT_IS, strGeneratorPower);
	}

	/**
	 * Set the device-specific processing associated with the image (e.g. Organ
	 * Description)
	 * 
	 * @param strAcquisitionDeviceProcessingDescription the str acquisition device processing description
	 */
	public void setAcquisitionDeviceProcessingDescription(String strAcquisitionDeviceProcessingDescription)
	{
		/*Accept Acquisition Device Processing Description.
		 * in String format of type LO.
		 * 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, 0x1400, DicomConstants.DCM_DT_LO, strAcquisitionDeviceProcessingDescription);
	}

	/**
	 * Sets Code representing the device-specific processing associated with the image (e.g.
	 * CR Organ Filtering code)
	 * 
	 * @param strAcquisitionDeviceProcessingCode the str acquisition device processing code
	 */
	public void setAcquisitionDeviceProcessingCode(String strAcquisitionDeviceProcessingCode)
	{
		/*Accept Acquisition Device Processing Code.
		 * in String format of type LO.
		 * 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, 0x1401, DicomConstants.DCM_DT_LO, strAcquisitionDeviceProcessingCode);
	}

	/**
	 * Sets the Orientation of cassette, used to properly position the image for display.
	 * Enumerated Values: LANDSCAPE, PORTRAIT
	 * 
	 * @param enumCassetteOrientation the enum cassette orientation
	 */
	public void setCassetteOrientation(EnumCassetteOrientation enumCassetteOrientation)
	{
		/*Accept Cassette Orientation.
		 * 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, 0x1402, DicomConstants.DCM_DT_CS, enumCassetteOrientation.getValue());
	}

	/**
	 * Sets the Size of cassette. Defined Terms: 18CMX24CM,8INX10IN,24CMX30CM,10INX12IN,30CMX35CM,30CMX40CM,
	 * 11INX14IN,35CMX35CM,14INX14IN,35CMX43CM,14INX17IN
	 * 
	 * @param enumCassetteSize the enum cassette size
	 */
	public void setCassetteSize(EnumCassetteSize enumCassetteSize)
	{
		/*Accept Cassette Size.
		 * 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, 0x1403, DicomConstants.DCM_DT_CS, enumCassetteSize.getValue());
	}

	/**
	 * Total number of x-ray exposures that have been made on the plate identified in Plate
	 * ID (0018,1004).
	 * 
	 * @param shExposuresOnPlate the sh exposures on plate
	 */
	public void setExposuresOnPlate(short shExposuresOnPlate)
	{
		/*Accept Exposures on Plate.
		 * in String format 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 DataSet
		 */
		addDataElement(0x0018, 0x1404, DicomConstants.DCM_DT_US, shExposuresOnPlate);
	}

	/**
	 * 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);
	}

	/**
	 * Read out sensitivity.
	 * 
	 * @param strSensitivity the str sensitivity
	 */
	public void setSensitivity(String strSensitivity)
	{
		/*Accept Sensitivity.
		 * 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, 0x6000, DicomConstants.DCM_DT_DS, strSensitivity);
	}

	/**
	 * Gets the photometric interpretation.
	 * 
	 * @return the photometric interpretation
	 */
	public String getPhotometricInterpretation()
	{
		Object objValue = getValue(0x0028,0x0004);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the plate id.
	 * 
	 * @return the plate id
	 */
	public String getPlateID()
	{
		Object objValue = getValue(0x0018,0x1004);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the kVP.
	 * 
	 * @return the kVP
	 */
	public String getKVP()
	{
		Object objValue = getValue(0x0018,0x0060);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the distance source to detector.
	 * 
	 * @return the distance source to detector
	 */
	public String getDistanceSourceToDetector()
	{
		/*IDataElement objIDataElement = objIDataSet.getDataForTag(0x0018, 0x1110);
		if(objIDataElement == null)
			return null;
		IDicomValue objIDicomValue = objIDataElement.getDicomValue();
		if(objIDicomValue == null)
			return null;
		if(objIDicomValue.getValue() == null)
			return null;
		return objIDicomValue.getValue().toString();*/
		Object objValue = getValue(0x0018,0x1110);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the distance source to patient.
	 * 
	 * @return the distance source to patient
	 */
	public String getDistanceSourceToPatient()
	{
		Object objValue = getValue(0x0018,0x1111);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the exposure time.
	 * 
	 * @return the exposure time
	 */
	public String getExposureTime()
	{
		Object objValue = getValue(0x0018,0x1150);
		if(objValue != null)
			return objValue.toString();
		return null;

	}

	/**
	 * Gets the xray tube current.
	 * 
	 * @return the xray tube current
	 */
	public String getXrayTubeCurrent()
	{
		Object objValue = getValue(0x0018,0x1151);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the exposure.
	 * 
	 * @return the exposure
	 */
	public String getExposure()
	{
		Object objValue = getValue(0x0018,0x1152);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the exposurein micro as.
	 * 
	 * @return the exposurein micro as
	 */
	public String getExposureinMicroAs()
	{
		Object objValue = getValue(0x0018,0x1153);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the filter type.
	 * 
	 * @return the filter type
	 */
	public String getFilterType()
	{
		Object objValue = getValue(0x0018,0x1160);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the imager pixel spacing.
	 * 
	 * @return the imager pixel spacing
	 */
	public String[] getImagerPixelSpacing()
	{
		Object objValue = getValue(0x0018,0x1164);
		if(objValue != null)
			return (String[])objValue;
		return null;

	}
	/**
	 * Get the Instance of Basic Pixel Spacing Calibration Macro Attributes.
	 * Calling this method multiple times will return the same Marco
	 * Instance that was created at first. Hence, any attributes in this Macro,if set multiple times will contain the value that was
	 * set in the last call to its setter method.
	 * 
	 * @return - object of Basic Pixel Spacing Calibration MacroAttributes which the user programmer can populate
	 */
	public BasicPixelSpacingCalibrationMacro getBasicPixelSpacingCalibrationMacro()
	{
		if(objBasicPixelSpacingCalibrationMacro == null)
			objBasicPixelSpacingCalibrationMacro = new BasicPixelSpacingCalibrationMacro(objIDataSet);
		return objBasicPixelSpacingCalibrationMacro; 
	}

	/**
	 * Gets the generator power.
	 * 
	 * @return the generator power
	 */
	public String getGeneratorPower()
	{
		Object objValue = getValue(0x0018,0x1170);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the acquisition device processing description.
	 * 
	 * @return the acquisition device processing description
	 */
	public String getAcquisitionDeviceProcessingDescription()
	{
		Object objValue = getValue(0x0018,0x1400);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the acquisition device processing code.
	 * 
	 * @return the acquisition device processing code
	 */
	public String getAcquisitionDeviceProcessingCode()
	{
		Object objValue = getValue(0x0018,0x1401);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the cassette orientation.
	 * 
	 * @return the cassette orientation
	 */
	public String getCassetteOrientation()
	{
		Object objValue = getValue(0x0018,0x1402);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the cassette size.
	 * 
	 * @return the cassette size
	 */
	public String getCassetteSize()
	{
		Object objValue = getValue(0x0018,0x1403);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the exposures on plate.
	 * 
	 * @return the exposures on plate
	 */
	public short getExposuresOnPlate()
	{
		Object objValue = getValue(0x0018, 0x1404);
		if(objValue != null)
			return Short.parseShort(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Gets the relative x ray exposure.
	 * 
	 * @return the relative x ray exposure
	 */
	public String getRelativeXRayExposure()
	{
		Object objValue = getValue(0x0018,0x1405);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Gets the sensitivity.
	 * 
	 * @return the sensitivity
	 */
	public String getSensitivity()
	{
		Object objValue = getValue(0x0018,0x6000);
		if(objValue != null)
			return objValue.toString();
		return null;
	}

	/**
	 * Retrieves the instance of GeneralAnatomyOptionalMacro. If the instance is not already present a new instance
	 * is created and returned. It is used to set the attribtues of GeneralAnatomyOptionalMacro in CR Image Module.
	 * 
	 * @return - instance of GeneralAnatomyOptionalMacro.
	 */
	public GeneralAnatomyOptionalMacro getGeneralAnatomyOptionalMacro()
	{
		if(objGeneralAnatomyOptionalMacro == null)
		{
			objGeneralAnatomyOptionalMacro = new GeneralAnatomyOptionalMacro(objIDataSet);
			return objGeneralAnatomyOptionalMacro;
		}
		return objGeneralAnatomyOptionalMacro;
	}

	/**
	 * This method returns the collection of keys representing the DataElements
	 * that belong to this module.
	 * 
	 * @return collection of Tags - returns the vector containing the collection of tags
	 */
	public ISingleCollection<ITag> getVectorOfKeys()
	{
		return objSingleCollection;
	}
}
