Skip to content

Commit

Permalink
ENH: Added an option to specify the similarity metric radius uniquely…
Browse files Browse the repository at this point in the history
… in each direction, e.g. -m PR[fixed.nii.gz, moving.nii.gz, 1, 4x3x2]
  • Loading branch information
ntustison committed Oct 22, 2010
1 parent 32fb0ab commit 554587d
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions ImageRegistration/itkPICSLAdvancedNormalizationToolKit.txx
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,26 @@ PICSLAdvancedNormalizationToolKit<TDimension, TReal>
radius.Fill( 0 );
if( option->GetNumberOfParameters( i ) > parameterCount )
{
radius.Fill( this->m_Parser->template
Convert<unsigned int>( option->GetParameter( i, parameterCount ) ) );
std::vector<unsigned int> rad = this->m_Parser->template
ConvertVector<unsigned int>( option->GetParameter( i,
parameterCount ) );

if( rad.size() == 1 )
{
radius.Fill( rad[0] );
}
else if( rad.size() == TDimension )
{
for( unsigned int n = 0; n < TDimension; n++ )
{
radius[n] = rad[n];
}
}
else
{
std::cerr << "Badly formed radius specification" << std::endl;
exit( 0 );
}
parameterCount++;
}
std::cout << " Radius: " << radius << std::endl;
Expand Down

0 comments on commit 554587d

Please sign in to comment.