From 6cd0b2ff25e138a42e50c58d8e713f6b4ce174d2 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Tue, 21 Oct 2014 07:46:21 +0200 Subject: [PATCH] Added direction to --like option --- tools/clitkAffineTransform.ggo | 42 ++++++++++----------- tools/clitkAffineTransformGenericFilter.txx | 1 + 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/tools/clitkAffineTransform.ggo b/tools/clitkAffineTransform.ggo index ead649f..bb74448 100644 --- a/tools/clitkAffineTransform.ggo +++ b/tools/clitkAffineTransform.ggo @@ -3,33 +3,33 @@ package "clitkAffineTransform" version "1.0" purpose "Resample with or without affine transform of 2D, 3D, 4D images or vector fields" -option "config" - "Config file" string no -option "verbose" v "Verbose" flag off +option "config" - "Config file" string no +option "verbose" v "Verbose" flag off section "I/O" -option "input" i "Input image filename" string yes -option "output" o "Output image filename" string yes -option "like" l "Resample output this image (size, spacing,origin)" string no -option "transform_grid" - "Apply affine transform to input grid for output's" flag off +option "input" i "Input image filename" string yes +option "output" o "Output image filename" string yes +option "like" l "Resample output this image (size, spacing, origin, direction)" string no +option "transform_grid" - "Apply affine transform to input grid for output's" flag off 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 (combine if multiple)" string no -option "rotate" r "Rotation to apply (radians)" double no multiple -option "translate" t "Translation to apply (mm)" double no multiple -option "pad" - "Edge padding value" double no default="0.0" +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 (combine if multiple)" string no +option "rotate" r "Rotation to apply (radians)" double no multiple +option "translate" t "Translation to apply (mm)" double no multiple +option "pad" - "Edge padding value" double no default="0.0" section "Interpolation" -option "interp" - "Interpolation: 0=NN, 1=Linear, 2=BSpline, 3=BLUT" int no default="1" -option "interpOrder" - "Order if BLUT or BSpline (0-5)" int no default="3" -option "interpSF" - "Sampling factor if BLUT" int no default="20" -option "interpVF" - "Interpolation: 0=NN, 1=Linear, 2=BSpline, 3=BLUT" int no default="1" -option "interpVFOrder" - "Order if BLUT or BSpline (0-5)" int no default="3" -option "interpVFSF" - "Sampling factor if BLUT" int no default="20" +option "interp" - "Interpolation: 0=NN, 1=Linear, 2=BSpline, 3=BLUT" int no default="1" +option "interpOrder" - "Order if BLUT or BSpline (0-5)" int no default="3" +option "interpSF" - "Sampling factor if BLUT" int no default="20" +option "interpVF" - "Interpolation: 0=NN, 1=Linear, 2=BSpline, 3=BLUT" int no default="1" +option "interpVFOrder" - "Order if BLUT or BSpline (0-5)" int no default="3" +option "interpVFSF" - "Sampling factor if BLUT" int no default="20" diff --git a/tools/clitkAffineTransformGenericFilter.txx b/tools/clitkAffineTransformGenericFilter.txx index 1fa58b5..65d66dc 100644 --- a/tools/clitkAffineTransformGenericFilter.txx +++ b/tools/clitkAffineTransformGenericFilter.txx @@ -212,6 +212,7 @@ namespace clitk likeReader->SetFileName(m_ArgsInfo.like_arg); likeReader->Update(); resampler->SetOutputParametersFromImage(likeReader->GetOutput()); + resampler->SetOutputDirection(likeReader->GetOutput()->GetDirection()); } else if(m_ArgsInfo.transform_grid_flag) { typename itk::Matrix invMatrix( matrix.GetInverse() ); typename itk::Matrix invRotMatrix( clitk::GetRotationalPartMatrix(invMatrix) ); -- 2.47.1