X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolResample.h;h=ec56fda68cfbd40d410ae0b2f1b78c0e76c7a35f;hb=76f43aa4f38939f58b05de5c49399b8ce19076cc;hp=56801be43d74767b51f67ab4fc9f96c5c00baf8e;hpb=f481db4544cda2ff745407bda3eb1d7b45bbe016;p=clitk.git diff --git a/vv/vvToolResample.h b/vv/vvToolResample.h index 56801be..ec56fda 100644 --- a/vv/vvToolResample.h +++ b/vv/vvToolResample.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,93 +14,99 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ -#ifndef _vvToolResample_h -#define _vvToolResample_h + ===========================================================================**/ + +#ifndef _VVTOOLRESAMPLE_H +#define _VVTOOLRESAMPLE_H + +// clitk +//#include "clitkImageResampleGenericFilter.h" +#include "clitkResampleImageGenericFilter.h" + +// vv #include "ui_vvToolResample.h" -#include "clitkCommon.h" #include "vvImage.h" #include "vvSlicerManager.h" #include "vvToolWidgetBase.h" #include "vvToolBase.h" -#include "clitkImageResampleGenericFilter.h" +// qt #include #include -//==================================================================== +//------------------------------------------------------------------------------ class vvToolResample : - public vvToolWidgetBase, - public vvToolBase, - private Ui::vvToolResample -{ - - Q_OBJECT - -public: - // constructor - destructor - vvToolResample(vvMainWindowBase * parent=0, Qt::WindowFlags f=0); - - // Get output result - vvImage::Pointer GetOutput() { - return mOutput; - } - std::string GetOutputFileName(); - static void Initialize(); - void apply(); + public vvToolWidgetBase, + public vvToolBase, + private Ui::vvToolResample { + + Q_OBJECT + + public: + // constructor - destructor + vvToolResample(vvMainWindowBase * parent=0, Qt::WindowFlags f=0); + + // Get output result + vvImage::Pointer GetOutput() { + return mOutput; + } + std::string GetOutputFileName(); + static void Initialize(); + void apply(); public slots: -// void SetImagesList(QTreeWidget * tree); - void UpdateControlSizeAndSpacing(); - void ComputeNewSizeFromSpacing(); - void ComputeNewSizeFromScale(); - void ComputeNewSizeFromIso(); - void ComputeNewSpacingFromSize(); - void ComputeNewSpacingFromScale(); - void ComputeNewSpacingFromIso(); - void UpdateInterpolation(); - void UpdateGaussianFilter(); - void InputIsSelected(vvSlicerManager* m); + // void SetImagesList(QTreeWidget * tree); + void UpdateControlSizeAndSpacing(); + void ComputeNewSizeFromSpacing(); + void ComputeNewSizeFromScale(); + void ComputeNewSizeFromIso(); + void ComputeNewSpacingFromSize(); + void ComputeNewSpacingFromScale(); + void ComputeNewSpacingFromIso(); + void UpdateInterpolation(); + void UpdateGaussianFilter(); + void InputIsSelected(vvSlicerManager* m); protected: - Ui::vvToolResample ui; - vvImage::Pointer mOutput; - clitk::ImageResampleGenericFilter::Pointer mFilter; + Ui::vvToolResample ui; + vvImage::Pointer mOutput; + clitk::ResampleImageGenericFilter::Pointer mFilter; - vvSlicerManager* mCurrentSlicerManager; - vvImage::Pointer mCurrentImage; - int mCurrentIndex; + // vvSlicerManager* mCurrentSlicerManager; + vvImage::Pointer mCurrentImage; + int mCurrentIndex; - std::vector mInputOrigin; - std::vector mInputSize; - std::vector mInputSpacing; - std::vector mOutputSize; - std::vector mOutputSpacing; - int mDimension; + std::vector mInputOrigin; + std::vector mInputSize; + std::vector mInputSpacing; + std::vector mOutputSize; + std::vector mOutputSpacing; + int mDimension; - QString mLastError; + QString mLastError; - QString mInputFileName; + QString mInputFileName; - QString mInputFileFormat; - QString mPixelType; - QString ComponentType; + QString mInputFileFormat; + QString mPixelType; + QString ComponentType; - QStringList OutputListFormat; + QStringList OutputListFormat; - void UpdateInputInfo(); - void UpdateOutputInfo(); - void UpdateOutputFormat(); - void FillSizeEdit(std::vector size); - void FillSpacingEdit(std::vector spacing); - void UpdateOutputSizeAndSpacing(); + void UpdateInputInfo(); + void UpdateOutputInfo(); + void UpdateOutputFormat(); + void FillSizeEdit(std::vector size); + void FillSpacingEdit(std::vector spacing); + void UpdateOutputSizeAndSpacing(); - QString GetSizeInBytes(std::vector & size); - QString GetVectorDoubleAsString(std::vector vectorDouble); - QString GetVectorIntAsString(std::vector vectorInt); + QString GetSizeInBytes(std::vector & size); + QString GetVectorDoubleAsString(std::vector vectorDouble); + QString GetVectorIntAsString(std::vector vectorInt); }; // end class vvToolResample -//==================================================================== +//------------------------------------------------------------------------------ + #endif