X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolResample.cxx;h=03ed9cb32f5a8da11483442a441b7e425302c88d;hb=9a9ae52b68d1cc0fea67acb45702d092446b423e;hp=f9b7a4a25d61fbbda6261140e3d1a14ead4bb98b;hpb=1e034c70105f0926939acaaa27ddb46e904ae8bf;p=clitk.git diff --git a/vv/vvToolResample.cxx b/vv/vvToolResample.cxx index f9b7a4a..03ed9cb 100644 --- a/vv/vvToolResample.cxx +++ b/vv/vvToolResample.cxx @@ -16,10 +16,12 @@ - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html ======================================================================-====*/ +// vv #include "vvToolResample.h" #include "vvSlicer.h" #include "vvToolCreator.h" +// qt #include #include @@ -35,6 +37,7 @@ vvToolResample::vvToolResample(vvMainWindowBase * parent, Qt::WindowFlags f): { Ui_vvToolResample::setupUi(mToolWidget); + // mFilter = clitk::ResampleImageGenericFilter::New(); mFilter = clitk::ImageResampleGenericFilter::New(); mLastError =""; @@ -136,7 +139,7 @@ void vvToolResample::InputIsSelected(vvSlicerManager* m) mInputFileName = mCurrentSlicerManager->GetFileName().c_str(); // Set current information - mPixelType = mCurrentImage->GetScalarTypeAsString().c_str(); + mPixelType = mCurrentImage->GetScalarTypeAsITKString().c_str(); //ds ComponentType = mCurrentImageGetNumberOfScalarComponents(); mDimension = mCurrentImage->GetNumberOfDimensions(); @@ -413,7 +416,7 @@ void vvToolResample::UpdateInterpolation() bSplineOrderSpinBox->show(); bLUTFactorLabel->hide(); bLUTSpinBox->hide(); - } else if (interpolationComboBox->currentText() == "B-LUT (faster BSpline)") { + } else if (interpolationComboBox->currentText() == "Blut (faster BSpline)") { bSplineLabel->show(); bSplineOrderSpinBox->show(); bLUTFactorLabel->show(); @@ -458,13 +461,22 @@ void vvToolResample::apply() if (mDimension > 2) sigma.push_back(zGaussianLineEdit->text().toDouble()); if (mDimension == 4) sigma.push_back(0.01); //FIXME Don't filter along the temporal direction + /* + // Build ArgsInfo + typename clitk::ResampleImageGenericFilter::ArgsInfoType mArgsInfo; + mArgsInfo.size_given = mDimension; + mArgsInfo.size_arg = mDimension; + for(int i=0; iSetOutputSize(mOutputSize); mFilter->SetOutputSpacing(mOutputSpacing); mFilter->SetInterpolationName(interpolationComboBox->currentText().toLower().toStdString()); if (interpolationComboBox->currentText() == "BSpline") mFilter->SetBSplineOrder(bSplineOrderSpinBox->value()); - else if (interpolationComboBox->currentText() == "B-LUT (faster BSpline)") { + else if (interpolationComboBox->currentText() == "Blut (faster BSpline)") { mFilter->SetInterpolationName("blut"); mFilter->SetBSplineOrder(bSplineOrderSpinBox->value()); mFilter->SetBLUTSampling(bLUTSpinBox->value());