typedef typename OutputImageType::PixelType DisplacementType;
DisplacementType displacement;
inputIt.GoToBegin();
-
+
typename OutputImageType::SizeType size = outputPtr->GetLargestPossibleRegion().GetSize();
//define some temp variables
overlap *= 1.0 - distance[dim];
}
upper >>= 1;
-
+
if (neighIndex[dim] >= size[dim])
neighIndex[dim] = size[dim] - 1;
}
//Empty constructor
template<class InputImageType, class OutputImageType > HelperClass2<InputImageType, OutputImageType>::HelperClass2()
{
- m_EdgePaddingValue=itk::NumericTraits<PixelType>::Zero;
+ PixelType zero;
+ for(unsigned int i=0;i <PixelType::Dimension; i++) zero[i] = 0.0;
+ m_EdgePaddingValue=zero;
+ //m_EdgePaddingValue=itk::NumericTraits<PixelType>::Zero;
}
#endif
{
// std::cout << "HelperClass2::ThreadedGenerateData - IN " << threadId << std::endl;
-
+
//Get pointer to the input
typename InputImageType::ConstPointer inputPtr = this->GetInput();
++inputIt;
}//end while
-
+
// std::cout << "HelperClass2::ThreadedGenerateData - OUT " << threadId << std::endl;
-
+
}//end member
template <class InputImageType, class OutputImageType>
InvertVFFilter<InputImageType, OutputImageType>::InvertVFFilter()
{
- m_EdgePaddingValue=itk::NumericTraits<PixelType>::Zero; //no other reasonable value?
+
+ //m_EdgePaddingValue=itk::NumericTraits<PixelType>::Zero; //no other reasonable value?
+ PixelType zero;
+ for(unsigned int i=0;i <PixelType::Dimension; i++) zero[i] = 0.0;
+ m_EdgePaddingValue=zero; //no other reasonable value?
+
m_ThreadSafe=false;
m_Verbose=false;
}
//Set the output
this->SetNthOutput(0, helper2->GetOutput());
-
+
//std::cout << "InvertVFFilter::GenerateData - OUT" << std::endl;
}
// Average
VFPixelType vector;
- VFPixelType zeroVector=itk::NumericTraits<VFPixelType>::Zero;
+ VFPixelType zeroVector;//=itk::NumericTraits<VFPixelType>::Zero;
+ for(unsigned int i=0;i <VFPixelType::Dimension; i++) zeroVector[i] = 0.0;
while (!(iterators[0]).IsAtEnd()) {
vector=zeroVector;
p_bar.setValue(progress);
p_bar.show();
}
-