typename MovingImageType::IndexType mappedIndex;
for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) {
- mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempIndex[j] ) );
+ mappedIndex[j] = static_cast<long>( std::round( tempIndex[j] ) );
}
const GradientPixelType gradient =
typename MovingImageType::IndexType mappedIndex;
for( unsigned int j = 0; j < MovingImageType::ImageDimension; j++ ) {
- mappedIndex[j] = static_cast<long>( vnl_math_rnd( tempIndex[j] ) );
+ mappedIndex[j] = static_cast<long>( std::round( tempIndex[j] ) );
}
const GradientPixelType gradient =
#include "itkRecursiveMultiResolutionPyramidImageFilter.h"
#include "itkImageRegionIterator.h"
-#include "vnl/vnl_math.h"
namespace clitk {
m_CurrentLevel = 0;
m_StopRegistrationFlag = false;
- unsigned int movingLevel = vnl_math_min( (int) m_CurrentLevel,
+ unsigned int movingLevel = std::min( (int) m_CurrentLevel,
(int) m_MovingImagePyramid->GetNumberOfLevels() );
- unsigned int fixedLevel = vnl_math_min( (int) m_CurrentLevel,
+ unsigned int fixedLevel = std::min( (int) m_CurrentLevel,
(int) m_FixedImagePyramid->GetNumberOfLevels() );
DeformationFieldPointer tempField = ITK_NULLPTR;
// Increment level counter.
m_CurrentLevel++;
- movingLevel = vnl_math_min( (int) m_CurrentLevel,
+ movingLevel = std::min( (int) m_CurrentLevel,
(int) m_MovingImagePyramid->GetNumberOfLevels() );
- fixedLevel = vnl_math_min( (int) m_CurrentLevel,
+ fixedLevel = std::min( (int) m_CurrentLevel,
(int) m_FixedImagePyramid->GetNumberOfLevels() );
// We can release data from pyramid which are no longer required.
#include "itkShrinkImageFilter.h"
#include "itkIdentityTransform.h"
-#include "vnl/vnl_math.h"
-
namespace clitk
{
factors[idim] = this->GetSchedule()[ilevel][idim] /
this->GetSchedule()[ilevel+1][idim];
}
- variance[idim] = vnl_math_sqr( 0.5 *
+ variance[idim] = std::sqr( 0.5 *
static_cast<float>( factors[idim] ) );
if( factors[idim] != 1 )
{
if( factors[idim] > 1 )
{
oper->SetDirection( idim );
- oper->SetVariance( vnl_math_sqr( 0.5 *
+ oper->SetVariance( std::sqr( 0.5 *
static_cast<float>( factors[idim] ) ) );
oper->CreateDirectional();
radius[idim] = oper->GetRadius()[idim];
if( factors[idim] > 1 )
{
oper->SetDirection( idim );
- oper->SetVariance( vnl_math_sqr( 0.5 *
+ oper->SetVariance( std::sqr( 0.5 *
static_cast<float>( factors[idim] ) ) );
oper->CreateDirectional();
radius[idim] = oper->GetRadius()[idim];
for( idim = 0; idim < TInputImage::ImageDimension; idim++ )
{
oper->SetDirection(idim);
- oper->SetVariance( vnl_math_sqr( 0.5 * static_cast<float>(
+ oper->SetVariance( std::sqr( 0.5 * static_cast<float>(
this->GetSchedule()[refLevel][idim] ) ) );
oper->SetMaximumError( this->GetMaximumError() );
oper->CreateDirectional();
#include "itkShrinkImageFilter.h"
#include "itkIdentityTransform.h"
-#include "vnl/vnl_math.h"
-
namespace clitk
{
// schedule[level-1] );
if( level > 0 )
{
- m_Schedule[level][dim] = vnl_math_min( m_Schedule[level][dim], m_Schedule[level-1][dim] );
+ m_Schedule[level][dim] = std::min( m_Schedule[level][dim], m_Schedule[level-1][dim] );
}
if( m_Schedule[level][dim] < 1 )
for( idim = 0; idim < ImageDimension; idim++ )
{
factors[idim] = m_Schedule[ilevel][idim];
- variance[idim] = vnl_math_sqr( 0.5 *
+ variance[idim] = std::sqr( 0.5 *
static_cast<float>( factors[idim] ) );
}
for( idim = 0; idim < TInputImage::ImageDimension; idim++ )
{
oper->SetDirection(idim);
- oper->SetVariance( vnl_math_sqr( 0.5 * static_cast<float>(
+ oper->SetVariance( std::sqr( 0.5 * static_cast<float>(
m_Schedule[refLevel][idim] ) ) );
oper->SetMaximumError( m_MaximumError );
oper->CreateDirectional();