/*******************************************************************************
 *  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.CTAdditionalXRaySourceSequence;
import cdac.medinfo.sdk.dcm30_04.baselibs.CTDIPhantomTypeCodeSequence;
import cdac.medinfo.sdk.dcm30_04.baselibs.DicomV3Factory;
import cdac.medinfo.sdk.dcm30_04.baselibs.GeneralAnatomyOptionalMacro;
import cdac.medinfo.sdk.dcm30_04.baselibs.OptionalViewandSliceProgressionDirectionMacro;
import cdac.medinfo.sdk.dcm30_04.baselibs.RTEquipmentCorrelationMacro;
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.EnumBitsAllocated;
import cdac.medinfo.sdk.dcm30_04.enums.EnumBitsStored;
import cdac.medinfo.sdk.dcm30_04.enums.EnumExposureModulationType;
import cdac.medinfo.sdk.dcm30_04.enums.EnumRotationDirection;

import cdac.medinfo.sdk.dcm30_04.exceptions.InvalidModuleException;
import cdac.medinfo.sdk.dcm30_04.exceptions.MandatoryMissingException;
import cdac.medinfo.sdk.dcm30_04.exceptions.ValidationException;
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
/**
 * This Class represents CT Image Module which contains
 * all Attributes that are specific to CT images.
 */
public class CTImageModule extends Module  
{


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

	/**
	 * The obj general anatomy optional macro.
	 */
	OptionalViewandSliceProgressionDirectionMacro objOptionalViewandSliceProgressionDirectionMacro=null;
	RTEquipmentCorrelationMacro objRTEquipmentCorrelationMacro=null;
	GeneralAnatomyOptionalMacro objGeneralAnatomyOptionalMacro = null;



	/**
	 * Creates CT Image Module with default initialization.
	 * 
	 * @param objIDataSet the obj i data set
	 */
	public CTImageModule(IDataSet objIDataSet)
	{
		super(objIDataSet);
	}
	static
	{
		objSingleCollection = new SingleCollection<ITag>();
		//Data Element Hash Map
		objSingleCollection.add(new Tag(0x0008,0x0008));
		objSingleCollection.add(new Tag(0x0018,0x0022));
		objSingleCollection.add(new Tag(0x0018,0x0060));
		objSingleCollection.add(new Tag(0x0018,0x0090));
		objSingleCollection.add(new Tag(0x0018,0x1100));
		objSingleCollection.add(new Tag(0x0018,0x1110));
		objSingleCollection.add(new Tag(0x0018,0x1111));
		objSingleCollection.add(new Tag(0x0018,0x1120));
		objSingleCollection.add(new Tag(0x0018,0x1130));
		objSingleCollection.add(new Tag(0x0018,0x1140));
		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,0x1160));
		objSingleCollection.add(new Tag(0x0018,0x1170));
		objSingleCollection.add(new Tag(0x0018,0x1190));
		objSingleCollection.add(new Tag(0x0018,0x1210));
		objSingleCollection.add(new Tag(0x0018,0x9305));
		objSingleCollection.add(new Tag(0x0018,0x9306));
		objSingleCollection.add(new Tag(0x0018,0x9307));
		objSingleCollection.add(new Tag(0x0018,0x9309));
		objSingleCollection.add(new Tag(0x0018,0x9310));
		objSingleCollection.add(new Tag(0x0018,0x9311));
		objSingleCollection.add(new Tag(0x0020,0x0012));
		objSingleCollection.add(new Tag(0x0028,0x0002));
		objSingleCollection.add(new Tag(0x0028,0x0004));
		objSingleCollection.add(new Tag(0x0028,0x0100));
		objSingleCollection.add(new Tag(0x0028,0x0101));
		objSingleCollection.add(new Tag(0x0028,0x0102));
		objSingleCollection.add(new Tag(0x0028,0x1052));
		objSingleCollection.add(new Tag(0x0028,0x1053));
	}

	/*
	 * Added by PB on 6/8/07
	 */
	/**
	 * 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 true, if validate module
	 * 
	 * @throws InvalidModuleException - If validation of Module fails
	 */

	public  boolean validateModule() throws InvalidModuleException
	{

		try
		{			/*
		 * Validation Rules for Mandatory Elements
		 */
			//Check for the Type 1,2 Mandatory Attributes.
			if(!isPresent(0x0008,0x0008))
				throw new MandatoryMissingException("0008,0008");
			else if(!isPresent(0x0028,0x0002))
				throw new MandatoryMissingException("0028,0002");
			else if(!isPresent(0x0028,0x0004))
				throw new MandatoryMissingException("0028,0004");
			else if(!isPresent(0x0028,0x0100))
				throw new MandatoryMissingException("0028,0100");
			else if(!isPresent(0x0028,0x0101))
				throw new MandatoryMissingException("0028,0101");
			else if(!isPresent(0x0028,0x0102))
				throw new MandatoryMissingException("0028,0102");
			else if(!isPresent(0x0028,0x1052))
				throw new MandatoryMissingException("0028,1052");
			else if(!isPresent(0x0028,0x1053))
				throw new MandatoryMissingException("0028,1053");
			else if(!isPresent(0x0018,0x0060))
				throw new MandatoryMissingException("0028,0060");
			else if(!isPresent(0x0020,0x0012))
				throw new MandatoryMissingException("0028,0012");
			
			
			/*
			 * Validation Rules for Optional Elements
			 */
			else if(GeneralAnatomyOptionalMacro.isMacroPresent(objIDataSet) && !getGeneralAnatomyOptionalMacro().validate())
				throw new MandatoryMissingException("CT Image Module");
		}
		catch(MandatoryMissingException mme)
		{
			if(DicomConfig.createInstance().isLoggingOn())
				DicomLogger.getLogger().log(mme.getMessage());

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

		}
		catch(ValidationException ve)
		{
			if(DicomConfig.createInstance().isLoggingOn())
				DicomLogger.getLogger().log(ve.getMessage());

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

		}
		return true;
	}

	/**
	 * This method is used to set Image identification characteristics.
	 * 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
	 * Defined Terms for Value 3:
	 * AXIAL identifies a CT Axial Image
	 * LOCALIZER identifies a CT Localizer Image
	 * 
	 * @param arrStrImageType :Image identification characteristics.
	 */	
	public void setImageType(String[] arrStrImageType)
	{
		/*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(0x0008, 0x0008, DicomConstants.DCM_DT_CS, arrStrImageType);
	}

	/**
	 * Method is used to set Number of samples (planes) in this image
	 * 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 sSamplesPerPixel the s samples per pixel
	 */
	public void setSamplesPerPixel(short sSamplesPerPixel)
	{
		/*Accept Number of samples (planes) in this image in short 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 Hash Map
		 */
		addDataElement(0x0028, 0x0002, DicomConstants.DCM_DT_US, sSamplesPerPixel);
	}

	/**
	 * 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
	 * 
	 * @param strPhotometricInterpretation :String value Photometric Interpretation
	 */
	public void setPhotometricInterpretation(String strPhotometricInterpretation)
	{
		/*Accept Specifies the intended interpretation of the pixel data 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(0x0028, 0x0004, DicomConstants.DCM_DT_CS, strPhotometricInterpretation);
	}

	/**
	 * Method is used to set Number of bits allocated for each pixel sample
	 * 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 enumBitsAllocated the enum bits allocated
	 */
	public void setBitsAllocated(EnumBitsAllocated enumBitsAllocated)
	{
		/*Accept Number of bits allocated for each pixel sample in short 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 Hash Map
		 */
		addDataElement(0x0028, 0x0100, DicomConstants.DCM_DT_US, enumBitsAllocated.getValue());
	}

	/**
	 * Method is used to set Number of bits stored for each pixel sample
	 * 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 enumBitsStored the enum bits stored
	 */
	public void setBitsStored(EnumBitsStored enumBitsStored)
	{
		/*Accept Number of bits stored for each pixel sample in short 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 Hash Map
		 */
		addDataElement(0x0028, 0x0101, DicomConstants.DCM_DT_US, enumBitsStored.getValue());
	}

	/**
	 * Method is used to set Most significant bit for pixel sample 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
	 * 
	 * @param sHighBit : Most significant bit for pixel sample data
	 */
	public void setHighBit(short sHighBit)
	{
		/*Accept Most significant bit for pixel sample data in short 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 Hash Map
		 */
		addDataElement(0x0028, 0x0102, DicomConstants.DCM_DT_US, sHighBit);
	}

	/**
	 * The method is used to setThe value b in relationship between stored values (SV) and Hounsfield (HU).
	 * 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 strRescaleIntercept :String value of Rescale Intercept
	 */
	public void setRescaleIntercept(String strRescaleIntercept)
	{
		/*Accept The value b in relationship between stored values (SV) and Hounsfield (HU) 
		 * 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(0x0028, 0x1052, DicomConstants.DCM_DT_DS, strRescaleIntercept);
	}

	/**
	 * The method is used to set the equation specified in Rescale Intercept
	 * 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 strRescaleScope :String value of Rescale Scope
	 */
	public void setRescaleScope(String strRescaleScope)
	{
		/*Accept the equation specified in Rescale Intercept
		 * 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(0x0028, 0x1053, DicomConstants.DCM_DT_DS, strRescaleScope);
	}
	
	/**
	 * Sets Rescale Type.
	 * @param strRescaleType String value of Rescale Type.
	 */
	public void setRescaleType(String strRescaleType)
	{
		/* Accept the Rescale Type 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 Data Set
		 */
		addDataElement(0x0028, 0x1054, DicomConstants.DCM_DT_LO, strRescaleType);
	}

	/**
	 * Return user-defined label identifier for Rescale Type.
	 * @return String - value of Rescale Type.
	 */
	public String getRescaleType()
	{
		Object objValue = getValue(0x0028,0x1054);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	

	/**
	 * 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 method is used to set A number identifying the single
	 * continuous gathering of data over a period of time which resulted in this image
	 * 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 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
		 */
		addDataElement(0x0020, 0x0012, DicomConstants.DCM_DT_IS, strAcquisitionNumber);
	}

	/**
	 * This method is used to set Parameters of scanning sequence.
	 * 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 arrStrScanOptions :Parameters of scanning sequence.
	 */	
	public void setScanOptions(String[] arrStrScanOptions)
	{
		/*Accept Parameters of scanning sequence 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(0x0018, 0x0022, DicomConstants.DCM_DT_CS, arrStrScanOptions);
	}

	/**
	 * The method is used to set The diameter in mm of the region over which data were collected
	 * 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 strDataCollectionDiameter :String value of Data Collection Diameter
	 */
	public void setDataCollectionDiameter(String strDataCollectionDiameter)
	{
		/*Accept The diameter in mm of the region over which data were collected
		 * 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, 0x0090, DicomConstants.DCM_DT_DS, strDataCollectionDiameter);
	}
	
	/**
	 * Sets the Data Collection Center Patient
	 * @param dblArrDataCollectionCenterPatient Double value of Data Collection Center Patient
	 */
	public void setDataCollectionCenterPatient(double[] dblArrDataCollectionCenterPatient)
	{
		/*Accept the DataCollectionCenterPatient 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
		 */
		addDataElement(0x0018, 0x9313, DicomConstants.DCM_DT_FD, dblArrDataCollectionCenterPatient);
	}
	/**
	 * Retrieves the DataCollectionCenterPatient.
	 * @return double - double value of DataCollectionCenterPatient
	 */
	public double[] getDataCollectionCenterPatient()
	{
		Object objValue = getValue(0x0018,0x9313);
		if(objValue != null)
			return (double[])objValue;
		return null;
	}

	/**
	 * The method is used to set Diameter in mm of the region from within
	 * which data were used in creating the reconstruction of the image.
	 * 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 strReconstructionDiameter :String value of Data Reconstruction Diameter
	 */
	public void setReconstructionDiameter(String strReconstructionDiameter)
	{
		/*Accept Diameter in mm of the region from within which data were 
		 * used in creating the reconstruction of the image 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, 0x1100, DicomConstants.DCM_DT_DS, strReconstructionDiameter);
	}
	/**
	 * Sets the Reconstruction Target Center Patient
	 * @param dblArrReconstructionTargetCenterPatient Double value of Reconstruction Target Center Patient
	 */
	public void setReconstructionTargetCenterPatient(double[] dblArrReconstructionTargetCenterPatient)
	{
		/*Accept the ReconstructionTargetCenterPatient 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
		 */
		addDataElement(0x0018, 0x9318, DicomConstants.DCM_DT_FD, dblArrReconstructionTargetCenterPatient);
	}
	/**
	 * Retrieves the Reconstruction Target Center Patient.
	 * @return double - double value of ReconstructionTargetCenterPatient
	 */
	public double[] getReconstructionTargetCenterPatient()
	{
		Object objValue = getValue(0x0018,0x9318);
		if(objValue != null)
			return (double[])objValue;
		return null;
	}

	/**
	 * 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 Nominal angle of tilt in degrees of the scanning gantry
	 * 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 strGantryOrDetectorTilt :String value of Nominal angle of tilt
	 */
	public void setGantryOrDetectorTilt(String strGantryOrDetectorTilt)
	{
		/*Accept Nominal angle of tilt 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, 0x1120, DicomConstants.DCM_DT_DS, strGantryOrDetectorTilt);
	}

	/**
	 * The method is used to set The distance in mm of the top of the patient table
	 * 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 strTableHeight :String value of Table Height
	 */
	public void setTableHeight(String strTableHeight)
	{
		/*Accept The distance in mm of the top of the patient table 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, 0x1130, DicomConstants.DCM_DT_DS, strTableHeight);
	}

	/**
	 * The method is used to set The Direction of rotation of the source
	 * 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:
	 * CW = clockwise
	 * CC = counter clockwise
	 * 
	 * @param enumRotationDirection the enum rotation direction
	 */
	public void setRotationDirection(EnumRotationDirection enumRotationDirection)
	{
		/*Accept Direction of rotation of the source 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, 0x1140, DicomConstants.DCM_DT_CS, enumRotationDirection.getValue());
	}

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

	/**
	 * The method is used to set Label for the type of filter inserted into the x-ray beam.
	 * 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 strFilterType :String value of the type of filter
	 */
	public void setFilterType(String strFilterType)
	{
		/*Accept the type of filter in String format of type SH.
		 * 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, 0x1160, DicomConstants.DCM_DT_SH, strFilterType);
	}

	/**
	 * The method is used to set Power in kW to the x-ray generator.
	 * 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 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);
	}

	/**
	 * This method is used to set Size of the focal spot in mm.
	 * 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 arrStrFocalSpot :Image Focal  Spot
	 */	
	public void setFocalSpot(String[] arrStrFocalSpot)
	{
		/*Accept Size of the focal spot in mm 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, 0x1190, DicomConstants.DCM_DT_DS, arrStrFocalSpot);
	}

	/**
	 * This method is used to set the convolution kernel
	 * 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 arrStrConvolutionKernel :Image Convolution Kernel
	 * 
	 * 
	 */	
	public void setConvolutionKernel(String[] arrStrConvolutionKernel)
	{
		/*Accept the convolution kernel in String Array format of type SH.
		 * 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, 0x1210, DicomConstants.DCM_DT_SH, arrStrConvolutionKernel);

	}

	/**
	 * The method is used to set The time in seconds of a complete revolution of the source around the gantry orbit
	 * 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 dRevolutionTime :The time in seconds
	 * 
	 * 
	 */
	public void setRevolutionTime(double dRevolutionTime)
	{
		/*Accept The time in seconds of a complete revolution of the source around 
		 * the gantry orbit 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 Hash Map
		 */
		addDataElement(0x0018, 0x9305, DicomConstants.DCM_DT_FD, dRevolutionTime);
	}

	/**
	 * The method is used to set The width of a single row of acquired 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
	 * 
	 * @param dSingleCollimationWidth :The width of a single row of acquired data
	 * 
	 * 
	 */
	public void setSingleCollimationWidth(double dSingleCollimationWidth)
	{
		/*Accept The width of a single row of acquired data 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 Hash Map
		 */
		addDataElement(0x0018, 0x9306, DicomConstants.DCM_DT_FD, dSingleCollimationWidth);
	}

	/**
	 * The method is used to set The width of the total collimation
	 * 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 dTotalCollimationWidth :The width of the total collimation
	 * 
	 * 
	 */
	public void setTotalCollimationWidth(double dTotalCollimationWidth)
	{
		/*Accept The width of the total collimation 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 Hash Map
		 */
		addDataElement(0x0018, 0x9307, DicomConstants.DCM_DT_FD, dTotalCollimationWidth);
	}

	/**
	 * The method is used to set The distance in mm that the table moves
	 * 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 dTableSpeed the d table speed
	 * 
	 * 
	 */
	public void setTableSpeed(double dTableSpeed)
	{
		/*Accept The distance in mm that the table moves 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 Hash Map
		 */
		addDataElement(0x0018, 0x9309, DicomConstants.DCM_DT_FD, dTableSpeed);
	}

	/**
	 * The method is used to set Motion of the table (in mm) during a complete revolution
	 * 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 dTableFeedperRotation the d table feedper rotation
	 * 
	 * 
	 */
	public void setTableFeedperRotation(double dTableFeedperRotation)
	{
		/*Accept Motion of the table (in mm) during a complete revolution 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 Hash Map
		 */
		addDataElement(0x0018, 0x9310, DicomConstants.DCM_DT_FD, dTableFeedperRotation);
	}

	/**
	 * Sets the Spiral Pitch Factor.
	 * @param dblSpiralPitchFactor Double value of SpiralPitchFactor
	 */
	public void setSpiralPitchFactor(double dblSpiralPitchFactor)
	{
		/*Accept the Chemical Shifts Minimum Integration Limit in ppm 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
		 */

		addDataElement(0x0018, 0x9311, DicomConstants.DCM_DT_FD,dblSpiralPitchFactor);
	}
	/**
	 * Retrieves the Spiral Pitch Factor
	 * @return double - double value of SpiralPitchFactor
	 */
	public double getSpiralPitchFactor()
	{
		Object objValue = getValue(0x0018,0x9311);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Sets a label describing the type of exposure modulation used for the purpose of limiting the dose.
     *Defined Terms:
     *NONE
	 * @param enumExposureModulationType enum value of Exposure Modulation Type.
	 */
	public void setExposureModulationType(EnumExposureModulationType enumExposureModulationType)
	{
		/* Accept the Setup Device 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 Data Set
		 */

		addDataElement(0x0018, 0x9323, DicomConstants.DCM_DT_CS,enumExposureModulationType);
	}
	/**
	 * Returns Exposure Modulation Type
	 * @return String - value of Exposure Modulation Type.
	 */
	public String getExposureModulationType()
	{
		Object objValue = getValue(0x0018,0x9323);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	/**
	 * Sets Estimated Dose Saving.
	 * @param dblEstimatedDoseSaving Double value of EstimatedDoseSaving
	 */
	public void setEstimatedDoseSaving(double dblEstimatedDoseSaving)
	{
		/*Accept the EstimatedDoseSaving 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
		 */

		addDataElement(0x0018, 0x9324, DicomConstants.DCM_DT_FD,dblEstimatedDoseSaving);
	}
	/**
	 * Retrieves EstimatedDoseSaving
	 * @return double - double value of EstimatedDoseSaving
	 */
	public double getEstimatedDoseSaving()
	{
		Object objValue = getValue(0x0018,0x9324);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}	
	/**
	 * Sets CTDIvol.
	 * @param dblCTDIvol Double value of CTDIvol
	 */
	public void setCTDIvol(double dblCTDIvol)
	{
		/*Accept the CTDIvol 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
		 */

		addDataElement(0x0018, 0x9345, DicomConstants.DCM_DT_FD,dblCTDIvol);
	}
	/**
	 * Retrieves CTDIvol
	 * @return double - double value of CTDIvol
	 */
	public double getECTDIvol()
	{
		Object objValue = getValue(0x0018,0x9345);
		if(objValue != null)
			return Double.parseDouble(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}
		
	/**
	 * Retrieves pre-initialized object of CTDIPhantomTypeCodeSequence.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 CTDIPhantomTypeCodeSequence - instance of CTDI Phantom Type Code Sequence
	 */
	public CTDIPhantomTypeCodeSequence getCTDIPhantomTypeCodeSequence()
	{
		CTDIPhantomTypeCodeSequence objCTDIPhantomTypeCodeSequence = (CTDIPhantomTypeCodeSequence)getDicomValue(0x0018,0x9346);
		if(objCTDIPhantomTypeCodeSequence == null)
		{
			/*
			 * If the sequence object is not present in the DataSet, a new sequence object is created and
			 * the TransferSyntax and DictionaryReader is set into it as it is set in the Module. This ensures that 
			 * the DataElements getting added in the DataSet follow the same TransferSyntax and use the same
			 * DictionaryReader object as that of the module.
			 */
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			objCTDIPhantomTypeCodeSequence = (CTDIPhantomTypeCodeSequence)objDicomV3Factory.createSequence(0x0018,0x9346, objITransferSyntax, objIDictionaryReader);
			
			// This will add Data Element of SQ to the DataSet.
			addDataElement(0x0018,0x9346, DicomConstants.DCM_DT_SQ, objCTDIPhantomTypeCodeSequence.getValue());
		}
		return objCTDIPhantomTypeCodeSequence;
	}

	/**
	 * This method returns the General Anatomy Optional Macro.
	 * 
	 * @return General Anatomy Optional Macro - object representing General Anatomy Optional Macro
	 */
	public GeneralAnatomyOptionalMacro getGeneralAnatomyOptionalMacro()
	{
		if(objGeneralAnatomyOptionalMacro == null)
		{
			objGeneralAnatomyOptionalMacro = new GeneralAnatomyOptionalMacro(objIDataSet);
		}
		return objGeneralAnatomyOptionalMacro;
	}

	/**
	 * This method returns the Optional View and Slice Progression Direction Macro.
	 * 
	 * @return OptionalViewandSliceProgressionDirectionMacro - object representing Optional View and Slice Progression Direction Macro
	 */
	public OptionalViewandSliceProgressionDirectionMacro getOptionalViewandSliceProgressionDirectionMacro()
	{
		if(objOptionalViewandSliceProgressionDirectionMacro == null)
		{
			objOptionalViewandSliceProgressionDirectionMacro = new OptionalViewandSliceProgressionDirectionMacro(objIDataSet);
		}
		return objOptionalViewandSliceProgressionDirectionMacro;
	}
	
	/**
	 * Sets CalciumScoringMassFactorPatient
	 * @param fCalciumScoringMassFactorPatient Float value of the CalciumScoringMassFactorPatient
	 */
	public void setCalciumScoringMassFactorPatient( float fCalciumScoringMassFactorPatient)
	{
		/*
		 * Accept the CalciumScoringMassFactorPatient in String format of type FL.
		 * 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,0x9351, DicomConstants.DCM_DT_FL,fCalciumScoringMassFactorPatient);
	}
	/**
	 * Retrieves CalciumScoringMassFactorPatient
	 * @return float - Float value of the CalciumScoringMassFactorPatient
	 */
	public float getCalciumScoringMassFactorPatient()
	{
		Object objValue = getValue(0x0018,0x9351);
		if(objValue != null)
			return Float.parseFloat(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}
	
	/**
	 * Sets Calcium Scoring Mass FactorDevice
	 * @param arrFCalciumScoringMassFactorDevice pair of floating point numbers
	 */
	public void setCalciumScoringMassFactorDevice(float[] arrFCalciumScoringMassFactorDevice)
	{
		/* Accept the Calcium Scoring Mass Factor Device in short format of type FL.
		 * 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,0x9352, DicomConstants.DCM_DT_FL,arrFCalciumScoringMassFactorDevice);
	}

	/**
	 * Retrieves Calcium Scoring Mass FactorDevice
	 * @return float[] - Float array of Calcium Scoring Mass FactorDevice
	 */
	public float[] getCalciumScoringMassFactorDevice()
	{
		Object objValue = getValue(0x0018,0x9352);
		if(objValue != null)
			return (float[])objValue;
		return null;
	}

	/**
	 * Sets Energy Weighting Factor
	 * @param fEnergyWeightingFactor Float value of the Energy Weighting Factor
	 */
	public void setEnergyWeightingFactor( float fEnergyWeightingFactor)
	{
		/*
		 * Accept the Energy Weighting Factor in String format of type FL.
		 * 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,0x9353, DicomConstants.DCM_DT_FL,fEnergyWeightingFactor);
	}
	/**
	 * Retrieves Energy Weighting Factor
	 * @return float - Float value of the Energy Weighting Factor
	 */
	public float getEnergyWeightingFactor()
	{
		Object objValue = getValue(0x0018,0x9353);
		if(objValue != null)
			return Float.parseFloat(objValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}
		
	/**
	 * Retrieves pre-initialized object of CT Additional X-Ray SourceSequence.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 CTAdditionalXRaySourceSequence - instance of CT Additional X-Ray SourceSequence
	 */
	public CTAdditionalXRaySourceSequence getCTAdditionalXRaySourceSequence()
	{
		CTAdditionalXRaySourceSequence objCTAdditionalXRaySourceSequence = (CTAdditionalXRaySourceSequence)getDicomValue(0x0018,0x9346);
		if(objCTAdditionalXRaySourceSequence == null)
		{
			/*
			 * If the sequence object is not present in the DataSet, a new sequence object is created and
			 * the TransferSyntax and DictionaryReader is set into it as it is set in the Module. This ensures that 
			 * the DataElements getting added in the DataSet follow the same TransferSyntax and use the same
			 * DictionaryReader object as that of the module.
			 */
			DicomV3Factory objDicomV3Factory = DicomV3Factory.createInstance();
			objCTAdditionalXRaySourceSequence = (CTAdditionalXRaySourceSequence)objDicomV3Factory.createSequence(0x0018,0x9360, objITransferSyntax, objIDictionaryReader);
			
			// This will add Data Element of SQ to the DataSet.
			addDataElement(0x0018,0x9360, DicomConstants.DCM_DT_SQ, objCTAdditionalXRaySourceSequence.getValue());
		}
		return objCTAdditionalXRaySourceSequence;
	}
	
	/**
	 * Return the String values of the attribute Image Type.
	 * 
	 * @return String[] - returns the type of image
	 */
	public String[] getImageType()
	{
		Object objectValue = getValue(0x0008, 0x0008);
		if(objectValue!=null)
			return (String[])objectValue;
		return null;
	}

	/**
	 * Return the short value of the attribute Samples Per Pixel.
	 * 
	 * @return short - returns the Samples per pixel
	 */
	public short getSamplesPerPixel()
	{Object objectValue = getValue(0x0028, 0x0002);
		if(objectValue!=null)
			return Short.parseShort(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the String value of the attribute Photometric Interpretation.
	 * 
	 * @return String - returns the Photometric Interpretation
	 */
	public String getPhotometricInterpretation()
	{
		Object objectValue = getValue(0x0028, 0x0004);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the short value of the attribute Bits Allocated.
	 * 
	 * @return short - returns teh Bits Allocated
	 */
	public short getBitsAllocated()
	{Object objectValue = getValue(0x0028, 0x0100);
		if(objectValue!=null)
			return Short.parseShort(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the short value of the attribute Bits Stored.
	 * 
	 * @return short - returns the Number of Bits Stored
	 */
	public short getBitsStored()
	{Object objectValue = getValue(0x0028, 0x0101);
		if(objectValue!=null)
			return Short.parseShort(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the short value of the attribute High Bit.
	 * 
	 * @return short - returns High Bit
	 */
	public short getHighBit()
	{Object objectValue = getValue(0x0028, 0x0102);
		if(objectValue!=null)
			return Short.parseShort(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the String value of the attribute Rescale Intercept.
	 * 
	 * @return String - returns the Rescale Intercept
	 */
	public String getRescaleIntercept()
	{
		Object objectValue = getValue(0x0028, 0x1052);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Rescale Scope.
	 * 
	 * @return String - returns the Rescale Scope
	 */
	public String getRescaleScope()
	{
		Object objectValue = getValue(0x0028, 0x1053);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute KVP.
	 * 
	 * @return String - returns the KVP
	 */
	public String getKVP()
	{
		Object objectValue = getValue(0x0018, 0x0060);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

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

	/**
	 * Return the String values of the attribute Scan Options.
	 * 
	 * @return String[] - returns the Scan Options
	 */
	public String[] getScanOptions()
	{
		Object objectValue = getValue(0x0018, 0x0022);
		if(objectValue!=null)
			return (String[])objectValue;
		return null;
	}

	/**
	 * Return the String value of the attribute Data Collection Diameter.
	 * 
	 * @return String - returns the Data Collection Diameter
	 */
	public String getDataCollectionDiameter()
	{
		Object objectValue = getValue(0x0018, 0x0090);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Reconstruction Diameter.
	 * 
	 * @return String - returns the Reconstruction Diameter.
	 */
	public String getReconstructionDiameter()
	{
		Object objectValue = getValue(0x0018, 0x1100);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Distance Source To Detector.
	 * 
	 * @return String - returns the Distance Source to detector
	 */
	public String getDistanceSourceToDetector()
	{
		Object objectValue = getValue(0x0018, 0x1110);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Distance Source To Patient.
	 * 
	 * @return String - returns the Distance Source to patient
	 */
	public String getDistanceSourceToPatient()
	{
		Object objectValue = getValue(0x0018, 0x1111);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Gantry Or DetectorTilt.
	 * 
	 * @return String - returns the Gantry or Detector tilt
	 */
	public String getGantryOrDetectorTilt()
	{
		Object objectValue = getValue(0x0018, 0x1120);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Table Height.
	 * 
	 * @return String - returns the height of table
	 */
	public String getTableHeight()
	{
		Object objectValue = getValue(0x0018, 0x1130);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Rotation Direction.
	 * 
	 * @return String - returns the Direction of rotation
	 */
	public String getRotationDirection()
	{
		Object objectValue = getValue(0x0018, 0x1140);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Exposure Time.
	 * 
	 * @return String - return the Tiem of Exposure
	 */
	public String getExposureTime()
	{
		Object objectValue = getValue(0x0018, 0x1150);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute XrayTube Current.
	 * 
	 * @return String - returns the XRay Tube Current
	 */
	public String getXrayTubeCurrent()
	{
		Object objectValue = getValue(0x0018, 0x1151);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Exposure.
	 * 
	 * @return String - returns the Exposure
	 */
	public String getExposure()
	{
		Object objectValue = getValue(0x0018, 0x1152);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Exposure in MicroAs.
	 * 
	 * @return String - returns the Exposure in macro
	 */
	public String getExposureinMicroAs()
	{
		Object objectValue = getValue(0x0018, 0x1152);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Filter Type.
	 * 
	 * @return String - returns the Type of Filter
	 */
	public String getFilterType()
	{
		Object objectValue = getValue(0x0018, 0x1160);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String value of the attribute Generator Power.
	 * 
	 * @return String - returns the Power of Generator
	 */
	public String getGeneratorPower()
	{
		Object objectValue = getValue(0x0018, 0x1170);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return the String values of the attribute Focal Spot.
	 * 
	 * @return String[] - returns the Focal Spot
	 */
	public String[] getFocalSpot()
	{
		Object objectValue = getValue(0x0018, 0x1190);
		if(objectValue!=null)
			return (String[])objectValue;
		return null;
	}

	/**
	 * Return the String values of the attribute Convolution Kernel.
	 * 
	 * @return the convolution kernel
	 */
	public String[] getConvolutionKernel()
	{
		Object objectValue = getValue(0x0018, 0x1210);
		if(objectValue!=null)
			return (String[])objectValue;
		return null;
	}

	/**
	 * Return the double value of the attribute Revolution Time.
	 * 
	 * @return double - returns the Time of Revolution
	 */
	public double getRevolutionTime()
	{Object objectValue = getValue(0x0018, 0x9305);
		if(objectValue!=null)
			return Double.parseDouble(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the double value of the attribute Single Collimation Width.
	 * 
	 * @return double - returns the Single Collimation width
	 */
	public double getSingleCollimationWidth()
	{Object objectValue = getValue(0x0018, 0x9306);
		if(objectValue!=null)
			return Double.parseDouble(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the double value of the attribute Total Collimation Width.
	 * 
	 * @return double - returns the Total Collimation Width
	 */
	public double getTotalCollimationWidth()
	{Object objectValue = getValue(0x0018, 0x9307);
		if(objectValue!=null)
			return Double.parseDouble(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the double value of the attribute Table Speed.
	 * 
	 * @return double - returns the Table Speed
	 */
	public double getTableSpeed()
	{Object objectValue = getValue(0x0018, 0x9309);
		if(objectValue!=null)
			return Double.parseDouble(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Return the double value of the attribute Table Feedper Rotation.
	 * 
	 * @return double - retturns Table Feed per rotation
	 */
	public double getTableFeedperRotation()
	{Object objectValue = getValue(0x0018, 0x9310);
		if(objectValue!=null)
			return Double.parseDouble(objectValue.toString());
		return DicomConstants.DCM_NO_VALUE;
	}

	/**
	 * Sets Isocenter Position
	 * @param strIsocenterPositionString value of Isocenter Position.
	 */
	public void setIsocenterPosition(String[] strIsocenterPositionString)
	{
		/*Accept the IsocenterPosition 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(0x300A,0x012C, DicomConstants.DCM_DT_DS,strIsocenterPositionString);
	}
	/**
	 * Retrieves Isocenter Position.
	 * @return String - value of Isocenter Position.
	 */
	public String[] getIsocenterPosition()
	{
		Object objValue = getValue(0x300A,0x012C);
		if(objValue != null)
			return (String[])objValue;
		return null;
	}
	/**
	 * This method returns the RT Equipment Correlation Macro Attributes Description
	 * @return RTEquipmentCorrelationMacro - object representing RT Equipment Correlation Macro Attributes Description
	 */
	public RTEquipmentCorrelationMacro getRTEquipmentCorrelationMacro()
	{
		if(objRTEquipmentCorrelationMacro == null)
		{
			objRTEquipmentCorrelationMacro = new RTEquipmentCorrelationMacro(objIDataSet);
		}
		return objRTEquipmentCorrelationMacro;
	}

	/*
	 * Comment Added by PB on 8/8/07
	 */
	/**
	 * This method returns the custom collection containing the list of DataElements belonging to the CT
	 * Image Module specified by DICOM Standard.
	 * 
	 * @return collection - custom collection containing the list of DataElements belonging to the CT Image Module
	 */
	public ISingleCollection<ITag> getVectorOfKeys()
	{
		return objSingleCollection;
	}
}
