#ifndef _VVRESAMPLERDIALOG_H #define _VVRESAMPLERDIALOG_H /*========================================================================= Program: vv Language: C++ Author : David Sarrut (david.sarrut@gmail.com) Copyright (C) 2008 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr CREATIS-LRMN http://www.creatis.insa-lyon.fr This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . =========================================================================*/ #include "ui_vvResamplerDialog.h" #include "clitkCommon.h" #include "vvImage.h" #include "vvSlicerManager.h" #include #include //==================================================================== class QDESIGNER_WIDGET_EXPORT vvResamplerDialog : public QDialog, private Ui::vvResamplerDialog { Q_OBJECT public: // constructor - destructor vvResamplerDialog(QWidget * parent=0, Qt::WindowFlags f=0); void SetSlicerManagers(std::vector & m,int current_image_index); // Get output result vvImage::Pointer GetOutput() { return mOutput; } bool GetDisplayResult() { return display_result->checkState() > 0; } std::string GetOutputFileName(); public slots: // void SetImagesList(QTreeWidget * tree); void Resample(); void UpdateControlSizeAndSpacing(); void ComputeNewSizeFromSpacing(); void ComputeNewSizeFromScale(); void ComputeNewSizeFromIso(); void ComputeNewSpacingFromSize(); void ComputeNewSpacingFromScale(); void ComputeNewSpacingFromIso(); void UpdateInterpolation(); void UpdateGaussianFilter(); void UpdateCurrentInputImage(); protected: Ui::vvResamplerDialog ui; std::vector mSlicerManagers; vvImage::Pointer mOutput; vvImage::Pointer mCurrentImage; int mCurrentIndex; std::vector mInputOrigin; std::vector mInputSize; std::vector mInputSpacing; std::vector mOutputSize; std::vector mOutputSpacing; int mDimension; QString mLastError; QString mInputFileName; QString mInputFileFormat; QString mPixelType; QString ComponentType; QStringList OutputListFormat; void Init(); 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); }; // end class vvResamplerDialog //==================================================================== #endif /* end #define _VVRESAMPLERDIALOG_H */