/*******************************************************************************
 *  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.DicomV3Factory;
import cdac.medinfo.sdk.dcm30_04.baselibs.PatientGantryRelationshipCodeSequence;
import cdac.medinfo.sdk.dcm30_04.baselibs.PatientOrientationCodeSequence;
import cdac.medinfo.sdk.dcm30_04.baselibs.ProjectionEponymousNameCodeSequence;
import cdac.medinfo.sdk.dcm30_04.baselibs.Tag;
import cdac.medinfo.sdk.dcm30_04.baselibs.ViewCodeSequence;
import cdac.medinfo.sdk.dcm30_04.baselibs.ViewCodeSequenceItem;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IDataSet;
import cdac.medinfo.sdk.dcm30_04.commoninterface.IItem;
import cdac.medinfo.sdk.dcm30_04.commoninterface.ITag;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPatientPosition;
import cdac.medinfo.sdk.dcm30_04.enums.EnumPositionerType;
import cdac.medinfo.sdk.dcm30_04.enums.EnumTableType;

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

// TODO: Auto-generated Javadoc
/**
 \* This module contains IOD Attributes that describe the positioning used in acquiring Digital X-Ray
 * Images.
 * 
 * 
 */
public class DXPositioningModule extends Module  
{


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


	/**
	 * Instantiates a new dX positioning module.
	 * 
	 * @param objIDataSet the obj i data set
	 */
	public DXPositioningModule(IDataSet objIDataSet)
	{
		super(objIDataSet);
	}
	static
	{
		objSingleCollection = new SingleCollection<ITag>();
		objSingleCollection.add(new Tag(0x0018,0x1110));
		objSingleCollection.add(new Tag(0x0018,0x1111));
		objSingleCollection.add(new Tag(0x0018,0x11A0));
		objSingleCollection.add(new Tag(0x0018,0x11A2));
		objSingleCollection.add(new Tag(0x0018,0x1138));
		objSingleCollection.add(new Tag(0x0018,0x113A));
		objSingleCollection.add(new Tag(0x0018,0x1114));
		objSingleCollection.add(new Tag(0x0018,0x1450));
		objSingleCollection.add(new Tag(0x0018,0x1508));
		objSingleCollection.add(new Tag(0x0018,0x1510));
		objSingleCollection.add(new Tag(0x0018,0x1511));
		objSingleCollection.add(new Tag(0x0018,0x1530));
		objSingleCollection.add(new Tag(0x0018,0x1531));
		objSingleCollection.add(new Tag(0x0018,0x5100));
		objSingleCollection.add(new Tag(0x0018,0x5101));
		objSingleCollection.add(new Tag(0x0018,0x5104));
		objSingleCollection.add(new Tag(0x0054,0x0220));
		objSingleCollection.add(new Tag(0x0054,0x0410));
		objSingleCollection.add(new Tag(0x0054,0x0414));
	}

	/**
	 * 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
		 */
			if(!isPresent(0x0018,0x1508))
				throw new MandatoryMissingException("0018,1508");
			if(isPresent(0x0018,0x5104))
				getProjectionEponymousNameCodeSequence().validateForModule();
			if(isPresent(0x0054,0x0220))
			{
				getViewCodeSequence().validateForModule();
				ICollectionIterator<IItem> objViewCodeSequenceIterator = getViewCodeSequence().iterator();
				ViewCodeSequenceItem objViewCodeSequenceItem = null;
				while(objViewCodeSequenceIterator.hasNext())
				{
					objViewCodeSequenceItem = (ViewCodeSequenceItem)objViewCodeSequenceIterator.next();
					if(objViewCodeSequenceItem.contains(0x0054,0x0222))
						objViewCodeSequenceItem.getViewModifierCodeSequence().validateForModule();
				}
			}
			if(isPresent(0x0054,0x0410))
			{
				int iNoOfItems = getPatientOrientationCodeSequence().noOfItems();
				if(iNoOfItems > 1)
					throw new ItemLimitException("0054,0410 shall contain single item");
				getPatientOrientationCodeSequence().validateForModule();
			}
			if(isPresent(0x0054,0x0414))
				getPatientGantryRelationshipCodeSequence().validateForModule();

		}
		catch(MandatoryMissingException mme)
		{
			if(DicomConfig.createInstance().isLoggingOn())
				DicomLogger.getLogger().log(mme.getMessage());

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

		}
		catch(InvalidItemException iie)
		{
			if(DicomConfig.createInstance().isLoggingOn())
				DicomLogger.getLogger().log(iie.getMessage());

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

		}
		catch(ItemLimitException ile)
		{
			if(DicomConfig.createInstance().isLoggingOn())
				DicomLogger.getLogger().log(ile.getMessage());

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

		}
		return true;
	}

	/**
	 * Return a Sequence that describes the radiographic method of patient, tube and
	 * detector positioning to achieve a well described projection or view.
	 * 
	 * @return - instance of ProjectionEponymousNameCodeSequence
	 */
	public ProjectionEponymousNameCodeSequence getProjectionEponymousNameCodeSequence()
	{
		ProjectionEponymousNameCodeSequence objProjectionEponymousNameCodeSequence = (ProjectionEponymousNameCodeSequence)getDicomValue(0x0018, 0x5104);
		if(objProjectionEponymousNameCodeSequence == 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();
			objProjectionEponymousNameCodeSequence = (ProjectionEponymousNameCodeSequence)objDicomV3Factory.createSequence(0x0018, 0x5104, objITransferSyntax, objIDictionaryReader);

			// This will add Data Element of SQ to the DataSet.
			addDataElement(0x0018, 0x5104, DicomConstants.DCM_DT_SQ, objProjectionEponymousNameCodeSequence.getValue());
		}
		return objProjectionEponymousNameCodeSequence;
	}

	/**
	 * Sets description of imaging subjects position relative to the equipment.
	 * 
	 * @param enumPatientPosition the enum patient position
	 */
	public void setPatientPosition(EnumPatientPosition enumPatientPosition)
	{
		/* Accept Patient Position 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, 0x5100, DicomConstants.DCM_DT_CS, enumPatientPosition.getValue());
	}

	/**
	 * Retrieves description of imaging subjects position relative to the equipment.
	 * 
	 * @return the patient position
	 */
	public String getPatientPosition()
	{
		Object objectValue = getValue(0x0018, 0x5100);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Sets radiographic view of the image relative to the imaging subjects orientation.
	 * 
	 * @param enumViewPosition the enum view position
	 */
	public void setViewPosition(EnumViewPosition enumViewPosition)
	{
		/* Accept View Position 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, 0x5101, DicomConstants.DCM_DT_CS, enumViewPosition.getValue());
	}

	/**
	 * Retrieves radiographic view of the image relative to the imaging subjects orientation.
	 * 
	 * @return the view position
	 */
	public String getViewPosition()
	{
		Object objectValue = getValue(0x0018, 0x5101);
		if(objectValue!=null)
			return objectValue.toString();
		return null;
	}

	/**
	 * Return Sequence that describes the projection of the anatomic region of interest on the
	 * image receptor.
	 * 
	 * @return - instance of ViewCodeSequence
	 */
	public ViewCodeSequence getViewCodeSequence()
	{
		ViewCodeSequence objViewCodeSequence = (ViewCodeSequence)getDicomValue(0x0054,0x0220);
		if(objViewCodeSequence == 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();
			objViewCodeSequence = (ViewCodeSequence)objDicomV3Factory.createSequence(0x0054,0x0220, objITransferSyntax, objIDictionaryReader);

			// This will add Data Element of SQ to the DataSet.
			addDataElement(0x0054,0x0220, DicomConstants.DCM_DT_SQ, objViewCodeSequence.getValue());
		}
		return objViewCodeSequence;
	}

	/**
	 * Return Sequence that describes the orientation of the patient with respect to gravity.
	 * 
	 * @return - instance of PatientOrientationCodeSequence
	 */
	public PatientOrientationCodeSequence getPatientOrientationCodeSequence()
	{
		PatientOrientationCodeSequence objPatientOrientationCodeSequence = (PatientOrientationCodeSequence)getDicomValue(0x0054, 0x0410);
		if(objPatientOrientationCodeSequence == 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();
			objPatientOrientationCodeSequence = (PatientOrientationCodeSequence)objDicomV3Factory.createSequence(0x0054, 0x0410, objITransferSyntax, objIDictionaryReader);

			// This will add Data Element of SQ to the DataSet.
			addDataElement(0x0054, 0x0410, DicomConstants.DCM_DT_SQ, objPatientOrientationCodeSequence.getValue());
		}
		return objPatientOrientationCodeSequence;
	}

	/**
	 * Return Sequence which describes the orientation of the patient with respect to the gantry.
	 * 
	 * @return - instance of PatientGantryRelationshipCodeSequence
	 */
	public PatientGantryRelationshipCodeSequence getPatientGantryRelationshipCodeSequence()
	{
		PatientGantryRelationshipCodeSequence objPatientGantryRelationshipCodeSequence = (PatientGantryRelationshipCodeSequence)getDicomValue(0x0054, 0x0414);
		if(objPatientGantryRelationshipCodeSequence == 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();
			objPatientGantryRelationshipCodeSequence = (PatientGantryRelationshipCodeSequence)objDicomV3Factory.createSequence(0x0054, 0x0414, objITransferSyntax, objIDictionaryReader);

			// This will add Data Element of SQ to the DataSet.
			addDataElement(0x0054, 0x0414, DicomConstants.DCM_DT_SQ, objPatientGantryRelationshipCodeSequence.getValue());
		}
		return objPatientGantryRelationshipCodeSequence;
	}

	/**
	 * 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 value of Distance of Source To Patient
	 */
	public String getDistanceSourceToPatient()
	{
		Object objectValue = getValue(0x0018, 0x1111);
		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 - String value of 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 Ratio of Source Image Receptor Distance (SID) over Source Object Distance (SOD).
	 * 
	 * @param strEstimatedRadiographicMagnificationFactor the str estimated radiographic magnification factor
	 */
	public void setEstimatedRadiographicMagnificationFactor(String strEstimatedRadiographicMagnificationFactor)
	{
		/* Accept Estimated Radiographic Magnification Factor 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, 0x1114, DicomConstants.DCM_DT_DS, strEstimatedRadiographicMagnificationFactor);
	}

	/**
	 * Return Ratio of Source Image Receptor Distance (SID) over Source Object Distance (SOD).
	 * 
	 * @return String - String value of Estimated Radiographic Magnification Factor
	 */
	public String getEstimatedRadiographicMagnificationFactor()
	{Object objectValue = getValue(0x0018,0x1114);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets Positioner Type.
	 * Defined Terms:
	 * CARM
	 * COLUMN
	 * MAMMOGRAPHIC
	 * PANORAMIC
	 * CEPHALOSTAT
	 * RIGID
	 * NONE
	 * 
	 * @param enumPositionerType the enum positioner type
	 */
	public void setPositionerType(EnumPositionerType enumPositionerType)
	{
		/* Accept Positioner 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, 0x1508, DicomConstants.DCM_DT_CS, enumPositionerType.getValue());
	}

	/**
	 * Sets Positioner Type.
	 * 
	 * @return String - String value of Positioner Type
	 */
	public String getPositionerType()
	{Object objectValue = getValue(0x0018,0x1508);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets position of the X-Ray beam about the patient from the RAO to LAO direction
	 * where movement from RAO to vertical is positive, if Positioner Type (0018,1508) is
	 * CARM.
	 * 
	 * @param strPositionerPrimaryAngle - String value of Positioner Primary Angle
	 */
	public void setPositionerPrimaryAngle(String strPositionerPrimaryAngle)
	{
		/* Accept Positioner Primary Angle 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, 0x1510, DicomConstants.DCM_DT_DS, strPositionerPrimaryAngle);
	}

	/**
	 * Sets position of the X-Ray beam about the patient from the RAO to LAO direction
	 * where movement from RAO to vertical is positive, if Positioner Type (0018,1508) is
	 * CARM.
	 * 
	 * @return String - String value of Positioner Primary Angle
	 */
	public String getPositionerPrimaryAngle()
	{Object objectValue = getValue(0x0018,0x1510);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets Position of the X-Ray beam about the patient from the CAU to CRA direction
	 * where movement from CAU to vertical is positive, if Positioner Type (0018,1508) is
	 * CARM.
	 * 
	 * @param strPositionerSecondaryAngle - String value of Positioner Secondary Angle
	 */
	public void setPositionerSecondaryAngle(String strPositionerSecondaryAngle)
	{
		/* Accept Positioner Secondary Angle 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, 0x1511, DicomConstants.DCM_DT_DS, strPositionerSecondaryAngle);
	}

	/**
	 * Retrievs position of the X-Ray beam about the patient from the CAU to CRA direction
	 * where movement from RAO to vertical is positive, if Positioner Type (0018,1508) is
	 * CARM.
	 * 
	 * @return String - String value of Positioner Secondary Angle
	 */
	public String getPositionerSecondaryAngle()
	{Object objectValue = getValue(0x0018,0x1511);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets angle of the X-Ray beam in the row direction in degrees relative to the normal
	 * to the detector plane. Positive values indicate that the X-Ray beam is tilted
	 * toward higher numbered columns. Negative values indicate that the X-Ray
	 * beam is tilted toward lower numbered columns.
	 * 
	 * @param strDetectorPrimaryAngle - String value of Detector Primary Angle
	 */
	public void setDetectorPrimaryAngle(String strDetectorPrimaryAngle)
	{
		/* Accept Detector Primary Angle 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, 0x1530, DicomConstants.DCM_DT_DS, strDetectorPrimaryAngle);
	}

	/**
	 * Retrievs angle of the X-Ray beam in the row direction in degrees relative to the normal
	 * to the detector plane.
	 * 
	 * @return String - String value of Detector Primary Angle
	 */
	public String getDetectorPrimaryAngle()
	{Object objectValue = getValue(0x0018,0x1530);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets angle of the X-Ray beam in the column direction in degrees relative to the normal
	 * to the detector plane. Positive values indicate that the X-Ray beam is tilted
	 * toward lower numbered rows. Negative values indicate that the X-Ray beam is
	 * tilted toward higher numbered rows.
	 * 
	 * @param strDetectorSecondaryAngle - String value of Detector Secondary Angle
	 */
	public void setDetectorSecondaryAngle(String strDetectorSecondaryAngle)
	{
		/* Accept Detector Secondary Angle 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, 0x1531, DicomConstants.DCM_DT_DS, strDetectorSecondaryAngle);
	}

	/**
	 * Retrievs angle of the X-Ray beam in the column direction in degrees relative to the normal
	 * to the detector plane.
	 * 
	 * @return String - String value of Detector Secondary Angle
	 */
	public String getDetectorSecondaryAngle()
	{Object objectValue = getValue(0x0018,0x1531);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets angle of the X-Ray beam in degree relative to an orthogonal axis to the detector plane.
	 * Positive values indicate that the tilt is toward the head of the table.
	 * 
	 * @param strColumnAngulation - String value of Column Angulation
	 */
	public void setColumnAngulation(String strColumnAngulation)
	{
		/* Accept Column Angulation 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, 0x1450, DicomConstants.DCM_DT_DS, strColumnAngulation);
	}

	/**
	 * Retrievs angle of the X-Ray beam in degree relative to an orthogonal axis to the detector plane.
	 * Positive values indicate that the tilt is toward the head of the table.
	 * 
	 * @return String - String value of Column Angulation
	 */
	public String getColumnAngulation()
	{Object objectValue = getValue(0x0018,0x1450);
	if(objectValue!=null)
		return objectValue.toString();
	return null;
	}

	/**
	 * Sets Table Type.
	 * Defined Terms:
	 * FIXED
	 * TILTING
	 * NONE
	 * 
	 * @param enumTableType the enum table type
	 */
	public void setTableType(EnumTableType enumTableType)
	{
		/* Accept Table 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, 0x113A, DicomConstants.DCM_DT_CS, enumTableType.getValue());
	}

	/**
	 * Retrievs Table Type.
	 * 
	 * @return String - String value of Table Type.
	 */
	public String getTableType()
	{
		Object objValue = getValue(0x0018,0x113A);
		if(objValue!=null)
			return objValue.toString();
		return null;

	}

	/**
	 * Sets angle of table plane in degrees relative to horizontal plane [Gravity plane]. Positive
	 * values indicate that the head of the table is upward.
	 * 
	 * @param strTableAngle - String value of Table Angle.
	 */
	public void setTableAngle(String strTableAngle)
	{
		/* Accept Table Angle 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, 0x1138, DicomConstants.DCM_DT_DS, strTableAngle);
	}

	/**
	 * Retrievs angle of table plane in degrees relative to horizontal plane [Gravity plane]. Positive
	 * values indicate that the head of the table is upward.
	 * 
	 * @return String - String value of Table Angle.
	 */
	public String getTableAngle()
	{
		Object objectValue = getValue(0x0018,0x1138);
		if(objectValue!=null)
			return objectValue.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 compression force applied to the body part during exposure, measured in Newtons.
	 * 
	 * @param strCompressionForce - String value of Compression Force
	 */
	public void setCompressionForce(String strCompressionForce)
	{
		/* Accept Compression Force 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, 0x11A2, DicomConstants.DCM_DT_DS, strCompressionForce);                
	}

	/**
	 * Retrievs the compression force applied to the body part during exposure, measured in Newtons.
	 * 
	 * @return String - String value of Compression Force
	 */
	public String getCompressionForce()
	{
		Object objValue = getValue(0x0018,0x11A2);
		if(objValue!=null)
			return objValue.toString();
		return null;

	}

	/**
	 * Sets Paddle Description
	 * @param strPaddleDescription String value of Plate ID.
	 */
	public void setPaddleDescription(String strPaddleDescription)
	{
		/* Accept the PaddleDescription 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(0x0018,0x11A4,DicomConstants.DCM_DT_LO, strPaddleDescription);
	}

	/**
	 * Return user-defined label identifier for Paddle Description.
	 * @return String - value of Paddle Description.
	 */
	public String getPaddleDescription()
	{
		Object objValue = getValue(0x0018,0x11A4);
		if(objValue != null)
			return objValue.toString();
		return null;
	}
	
	
	/*	 
	 * This method is used by the Module Iterator to iterate through the DataSet and return only
	 * those elements that belong to the respective Module class whose getVectorOfKeys is called.
	 */
	/**
	 * This method returns the vector of keys representing the DataElements
	 * that belong to this module.
	 * 
	 * @return - the customized collection containing the dataelement tags
	 * that beling to this module
	 */
	public ISingleCollection<ITag> getVectorOfKeys()
	{
		return objSingleCollection;
	}
}
