section "Options"
option "size" - "New output size if different from input" int no multiple
option "spacing" - "New output spacing if different from input" double no multiple
+option "spacinglike" - "New output spacing like this image" string no
option "origin" - "New output origin if different from input" double no multiple
option "matrix" m "Affine matrix (homogene) filename" string no
option "elastix" e "Read EulerTransform from elastix output file" string no
typename itk::Matrix<double, Dimension+1, Dimension+1> invMatrix( matrix.GetInverse() );
typename itk::Matrix<double, Dimension, Dimension> invRotMatrix( clitk::GetRotationalPartMatrix(invMatrix) );
typename itk::Vector<double,Dimension> invTrans = clitk::GetTranslationPartMatrix(invMatrix);
-
+
// Display warning
if (m_ArgsInfo.spacing_given)
std::cout << "Warning --spacing ignored (because --transform_grid_flag)" << std::endl;
}
+ if (m_ArgsInfo.spacinglike_given) {
+ typename InputReaderType::Pointer likeReader=InputReaderType::New();
+ likeReader->SetFileName(m_ArgsInfo.spacinglike_arg);
+ likeReader->Update();
+ resampler->SetOutputSpacing( likeReader->GetOutput()->GetSpacing() );
+ }
+
if (m_ArgsInfo.verbose_flag) {
std::cout << "Setting the output size to " << resampler->GetSize() << "..." << std::endl;
std::cout << "Setting the output spacing to " << resampler->GetOutputSpacing() << "..." << std::endl;