Commit 342ef2b7 authored by Rashad Kanavath's avatar Rashad Kanavath

BUG: use long int array instead of itk::IndexType

parent b6cd81ae
......@@ -410,28 +410,44 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::GenerateInput
typename T3DImage::RegionType mapRegion = imgPtr->GetLargestPossibleRegion();
itk::ContinuousIndex<double, 2> mapContiIndex;
IndexType maxMapIndex;
IndexType minMapIndex;
long int maxMapIndex[2];
long int minMapIndex[2];
maxMapIndex[0] = static_cast<long int> (mapRegion.GetIndex(0) + mapRegion.GetSize(0));
maxMapIndex[1] = static_cast<long int> (mapRegion.GetIndex(1) + mapRegion.GetSize(1));
minMapIndex[0] = static_cast<long int> (mapRegion.GetIndex(0));
minMapIndex[1] = static_cast<long int> (mapRegion.GetIndex(1));
IndexType minMapRequestedIndex;
long int minMapRequestedIndex[2];
minMapRequestedIndex[0]= maxMapIndex[0]+1;
minMapRequestedIndex[1]= maxMapIndex[1]+1;
IndexType maxMapRequestedIndex;
long int maxMapRequestedIndex[2];
maxMapRequestedIndex[0]= 0;
maxMapRequestedIndex[1]= 0;
for (unsigned int i = 0; i < 8; i++)
{
TDPointType tmpSensor = groundToSensorTransform->TransformPoint(corners[i]);
minMapRequestedIndex[0] = std::min(minMapRequestedIndex[0], static_cast<long int> (tmpSensor[0] - m_Margin[0]));
minMapRequestedIndex[1] = std::min(minMapRequestedIndex[1], static_cast<long int> (tmpSensor[1] - m_Margin[1]));
maxMapRequestedIndex[0] = std::max(maxMapRequestedIndex[0], static_cast<long int> (tmpSensor[0] + m_Margin[0]));
maxMapRequestedIndex[1] = std::max(maxMapRequestedIndex[1], static_cast<long int> (tmpSensor[1] + m_Margin[1]));
TDPointType tmpSensor = groundToSensorTransform->TransformPoint( corners[i] );
minMapRequestedIndex[0] = std::min(
minMapRequestedIndex[0],
static_cast<long int> ( tmpSensor[0] - m_Margin[0] )
);
minMapRequestedIndex[1] = std::min(
minMapRequestedIndex[1],
static_cast<long int> ( tmpSensor[1] - m_Margin[1] )
);
maxMapRequestedIndex[0] = std::max(
maxMapRequestedIndex[0],
static_cast<long int> ( tmpSensor[0] + m_Margin[0] )
);
maxMapRequestedIndex[1] = std::max(
maxMapRequestedIndex[1],
static_cast<long int> ( tmpSensor[1] + m_Margin[1] )
);
minMapRequestedIndex[0] = std::max(minMapRequestedIndex[0], minMapIndex[0]);
minMapRequestedIndex[1] = std::max(minMapRequestedIndex[1], minMapIndex[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment