void sections::getTarget(accumTarget& inTarget,const int& inID,const units& inUnits,const frame& inFrame)
{
	inTarget.size++;

	ID=inID;
	for(int i=0;i<=8;i++)
	{
		if(surroundingSections[i]!=0 && i!=4)
		{
			if(surroundingSections[i]->getID()!=inID)
			{
				surroundingSections[i]->getTarget(inTarget,inID,inUnits,inFrame);
			}
		}
	}
	inTarget.locX+=locationX;
	inTarget.locY+=locationY;

	const unsigned char* newData=inFrame.getData();
	unsigned long pixCounter=0,i=0,j=0,y=0,x=0;
	int intUnitSize=inUnits.getUnitSize();
	double unitHeight=inUnits.getUnitHeight();
	double unitWidth=inUnits.getUnitWidth();
	double unitSize=inUnits.getUnitSize();
	i=locationY;
	j=locationX;
	y=0;
	while(y<unitHeight-1)
	{
		x=0;
		while(x<unitWidth)
		{
			unsigned long temp=i*unitSize*unitHeight*unitWidth*3+j*unitWidth*3+y*unitSize*unitWidth*3+x*3;
			for(unsigned long location=temp;location<=temp+2;location++)
			{
				switch(location%3)
				{
				case 0:
					inTarget.blue+=newData[location];
					break;
				case 1:
					inTarget.green+=newData[location];
					break;
				case 2:
					inTarget.red+=newData[location];
					break;
				default:
					break;
				}

			}
			inTarget.totalPixilCount++;

			x++;

		}
		y++;
	}
}