--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>vvToolResample</class>
+ <widget class="QWidget" name="vvToolResample">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>566</width>
+ <height>477</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="_14">
+ <item>
+ <widget class="QFrame" name="frame">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QVBoxLayout" name="_15">
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="_17">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>File format</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mInputFormatLabel">
+ <property name="text">
+ <string>.mhd</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_18">
+ <item>
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Dimension</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mInputDimLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_19">
+ <item>
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Pixel Type</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mInputPixelTypeLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_20">
+ <item>
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Size</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mInputSizeLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_21">
+ <item>
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Spacing</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mInputSpacingLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_22">
+ <item>
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>Memory size</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mInputMemoryLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_23">
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Display result?</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="display_result">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="autoExclusive">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="optionFrame">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="_24">
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="sizeRadioButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Size :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="3">
+ <widget class="QFrame" name="frame_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="_25">
+ <property name="horizontalSpacing">
+ <number>5</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>2</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="xSizeLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>x :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="xSizeLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="ySizeLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>y :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLineEdit" name="ySizeLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="zSizelabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>z :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QLineEdit" name="zSizeLineEdit">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QRadioButton" name="scaleSizeRadioButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Scale size :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QFrame" name="frame_6">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="_26">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLineEdit" name="scaleSizeLineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="purcentLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>%</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>50</width>
+ <height>41</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0">
+ <widget class="QRadioButton" name="isoSizeRadioButton">
+ <property name="text">
+ <string>Iso-size :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="isoSizeLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>50</width>
+ <height>23</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0" colspan="3">
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QRadioButton" name="spacingRadioButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Spacing :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" colspan="3">
+ <widget class="QFrame" name="frame_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="_27">
+ <property name="horizontalSpacing">
+ <number>5</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>2</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="xSpacingLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>x :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="xSpacingLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="ySpacingLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>y :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLineEdit" name="ySpacingLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="zSpacingLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>z :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QLineEdit" name="zSpacingLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QRadioButton" name="scaleSpacingRadioButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Scale spacing :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1">
+ <widget class="QFrame" name="frame_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="_28">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLineEdit" name="scaleSpacingLineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="purcentLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>%</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="7" column="2">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>50</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="8" column="0">
+ <widget class="QRadioButton" name="isoSpacingRadioButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Iso-spacing :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QLineEdit" name="isoSpacingLineEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>50</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QFrame" name="frame_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QVBoxLayout" name="_2">
+ <item>
+ <layout class="QVBoxLayout" name="_3">
+ <item>
+ <widget class="QCheckBox" name="gaussianFilterCheckBox">
+ <property name="text">
+ <string>Apply Gaussian Filter</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame_7">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="_4">
+ <item>
+ <widget class="QLabel" name="gaussianFilterLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Gaussian width :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="xGaussianLineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>40</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="yGaussianLineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>40</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="readOnly">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="zGaussianLineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>40</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="Line" name="line_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_5">
+ <item>
+ <widget class="QLabel" name="defaultPixelValueLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Default pixel value :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="defaultPixelValueLineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>0.0</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>121</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="Line" name="line_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_6">
+ <item>
+ <widget class="QLabel" name="InterpolationLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Interpolation :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="interpolationComboBox">
+ <item>
+ <property name="text">
+ <string>NN</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Linear</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>BSpline</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Blut (faster BSpline)</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="Line" name="line_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_7">
+ <item>
+ <widget class="QLabel" name="bSplineLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>BSpline order :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="bSplineOrderSpinBox">
+ <property name="maximum">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>3</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_8">
+ <item>
+ <widget class="QLabel" name="bLUTFactorLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>16</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>BLUT sampling factor :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="bLUTSpinBox">
+ <property name="value">
+ <number>30</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame_8">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QVBoxLayout" name="_9">
+ <item>
+ <widget class="QLabel" name="outputLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Output :</span></p></body></html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_10">
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>Size</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mOutputSizeLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_11">
+ <item>
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Spacing</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mOutputSpacingLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="_12">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Memory size</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mOutputMemoryLabel">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
======================================================================-====*/
-#ifndef _VVRESAMPLERDIALOG_CXX
-#define _VVRESAMPLERDIALOG_CXX
-
-#include "vvResamplerDialog.h"
-#include "clitkImageResampleGenericFilter.h"
+#include "vvToolResample.h"
#include "vvSlicer.h"
+#include "vvToolCreator.h"
#include <QFileInfo>
#include <QMessageBox>
#define COLUMN_IMAGE_NAME 7
-//====================================================================
-vvResamplerDialog::vvResamplerDialog(QWidget * parent, Qt::WindowFlags f)
- :QDialog(parent,f), Ui::vvResamplerDialog() {
-
- // initialization
- setupUi(this);
- Init();
-
- // Connect signals & slots
- connect(this, SIGNAL(accepted()), this, SLOT(Resample()));
- connect(mImagesComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(UpdateCurrentInputImage()));
-
- connect(sizeRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
- connect(scaleSizeRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
- connect(isoSizeRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
- connect(spacingRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
- connect(scaleSpacingRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
- connect(isoSpacingRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
-
- connect(xSizeLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromSize()));
- connect(ySizeLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromSize()));
- connect(zSizeLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromSize()));
- connect(xSpacingLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromSpacing()));
- connect(ySpacingLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromSpacing()));
- connect(zSpacingLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromSpacing()));
- connect(scaleSizeLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromScale()));
- connect(scaleSpacingLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromScale()));
- connect(isoSizeLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromIso()));
- connect(isoSpacingLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromIso()));
+ADD_TOOL(vvToolResample);
- connect(gaussianFilterCheckBox,SIGNAL(stateChanged(int)),this,SLOT(UpdateGaussianFilter()));
- connect(interpolationComboBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(UpdateInterpolation()));
-}
//====================================================================
+vvToolResample::vvToolResample(vvMainWindowBase * parent, Qt::WindowFlags f):
+ vvToolWidgetBase(parent,f),
+ vvToolBase<vvToolResample>(parent),
+ Ui::vvToolResample()
+{
+ Ui_vvToolResample::setupUi(mToolWidget);
-//====================================================================
-void vvResamplerDialog::Init() {
+ mFilter = clitk::ImageResampleGenericFilter::New();
mLastError ="";
mInputFileFormat = "";
ComponentType = "";
mPixelType = "";
+ mCurrentSlicerManager=NULL;
mInputSize.resize(0);
mInputSpacing.resize(0);
mInputSizeLabel->setPalette(qPalette);
mInputSpacingLabel->setPalette(qPalette);
- UpdateCurrentInputImage();
+ // Set how many inputs are needed for this tool
+ AddInputSelector("Select an image to resample", mFilter);
+
+ // Connect signals & slots
+
+ connect(sizeRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
+ connect(scaleSizeRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
+ connect(isoSizeRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
+ connect(spacingRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
+ connect(scaleSpacingRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
+ connect(isoSpacingRadioButton, SIGNAL(clicked()), this, SLOT(UpdateControlSizeAndSpacing()));
+
+ connect(xSizeLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromSize()));
+ connect(ySizeLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromSize()));
+ connect(zSizeLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromSize()));
+ connect(xSpacingLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromSpacing()));
+ connect(ySpacingLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromSpacing()));
+ connect(zSpacingLineEdit, SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromSpacing()));
+ connect(scaleSizeLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromScale()));
+ connect(scaleSpacingLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromScale()));
+ connect(isoSizeLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSizeFromIso()));
+ connect(isoSpacingLineEdit,SIGNAL(textEdited(QString)),this,SLOT(ComputeNewSpacingFromIso()));
+
+ connect(gaussianFilterCheckBox,SIGNAL(stateChanged(int)),this,SLOT(UpdateGaussianFilter()));
+ connect(interpolationComboBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(UpdateInterpolation()));
}
//====================================================================
//====================================================================
-void vvResamplerDialog::UpdateCurrentInputImage() {
- // Set current image & index
- mCurrentIndex = mImagesComboBox->currentIndex();
- if (mCurrentIndex == -1) {
- mCurrentImage = NULL;
- return ;
- }
- mCurrentImage = mSlicerManagers[mCurrentIndex]->GetSlicer(0)->GetImage();
+void vvToolResample::Initialize() {
+ SetToolName("Resample Image");
+ SetToolMenuName("Resample");
+ SetToolIconFilename(":/common/icons/resample.png");
+ SetToolTip("Resample image with various interpolation methods.");
+}
+//====================================================================
+
+//====================================================================
+void vvToolResample::InputIsSelected(vvSlicerManager* m) {
+
+ mCurrentSlicerManager = m;
+ mCurrentImage = mCurrentSlicerManager->GetSlicer(0)->GetImage();
if (mCurrentImage.IsNull()) return;
- mInputFileName = mSlicerManagers[mCurrentIndex]->GetFileName().c_str();
+ mInputFileName = mCurrentSlicerManager->GetFileName().c_str();
// Set current information
mPixelType = mCurrentImage->GetScalarTypeAsString().c_str();
//====================================================================
//====================================================================
-void vvResamplerDialog::UpdateOutputInfo() {
+void vvToolResample::UpdateOutputInfo() {
mOutputSizeLabel->setText(GetVectorIntAsString(mOutputSize));
mOutputSpacingLabel->setText(GetVectorDoubleAsString(mOutputSpacing));
mOutputMemoryLabel->setText(GetSizeInBytes(mOutputSize));
//====================================================================
//====================================================================
-QString vvResamplerDialog::GetSizeInBytes(std::vector<int> & size) {
+QString vvToolResample::GetSizeInBytes(std::vector<int> & size) {
int t = 1;
for (unsigned int i=0; i<size.size(); i++) t *= size[i];
t *= mCurrentImage->GetScalarSize()*mCurrentImage->GetNumberOfScalarComponents();
//====================================================================
//====================================================================
-QString vvResamplerDialog::GetVectorDoubleAsString(std::vector<double> vectorDouble) {
+QString vvToolResample::GetVectorDoubleAsString(std::vector<double> vectorDouble) {
QString result;
for (unsigned int i= 0; i<vectorDouble.size(); i++) {
if (i != 0)
//====================================================================
//====================================================================
-QString vvResamplerDialog::GetVectorIntAsString(std::vector<int> vectorInt) {
+QString vvToolResample::GetVectorIntAsString(std::vector<int> vectorInt) {
QString result;
for (unsigned int i= 0; i<vectorInt.size(); i++) {
if (i != 0)
//====================================================================
//====================================================================
-void vvResamplerDialog::FillSizeEdit(std::vector<int> size) {
+void vvToolResample::FillSizeEdit(std::vector<int> size) {
xSizeLineEdit->setText(QString::number(size[0]));
ySizeLineEdit->setText(QString::number(size[1]));
if (size.size() > 2)
//====================================================================
//====================================================================
-void vvResamplerDialog::FillSpacingEdit(std::vector<double> spacing) {
+void vvToolResample::FillSpacingEdit(std::vector<double> spacing) {
xSpacingLineEdit->setText(QString::number(spacing[0]));
ySpacingLineEdit->setText(QString::number(spacing[1]));
if (spacing.size() > 2)
//====================================================================
//====================================================================
-void vvResamplerDialog::UpdateOutputSizeAndSpacing() {
+void vvToolResample::UpdateOutputSizeAndSpacing() {
mOutputSize.resize(mDimension);
mOutputSize = mInputSize;
mOutputSpacing.resize(mDimension);
//====================================================================
//====================================================================
-void vvResamplerDialog::UpdateControlSizeAndSpacing() {
+void vvToolResample::UpdateControlSizeAndSpacing() {
scaleSizeLineEdit->setText("");
scaleSpacingLineEdit->setText("");
isoSizeLineEdit->setText("");
//====================================================================
//====================================================================
-void vvResamplerDialog::ComputeNewSpacingFromSize() {
+void vvToolResample::ComputeNewSpacingFromSize() {
double newSpacing = mInputSpacing[0]*mInputSize[0];
xSpacingLineEdit->setText(QString::number(newSpacing/xSizeLineEdit->text().toDouble()));
newSpacing = mInputSpacing[1]*mInputSize[1];
//====================================================================
//====================================================================
-void vvResamplerDialog::ComputeNewSizeFromSpacing() {
+void vvToolResample::ComputeNewSizeFromSpacing() {
double newSize = mInputSpacing[0]*mInputSize[0];
xSizeLineEdit->setText(QString::number(newSize/xSpacingLineEdit->text().toDouble()));
newSize = mInputSpacing[1]*mInputSize[1];
//====================================================================
//====================================================================
-void vvResamplerDialog::ComputeNewSpacingFromScale() {
+void vvToolResample::ComputeNewSpacingFromScale() {
xSpacingLineEdit->setText(QString::number(mInputSpacing[0]*scaleSpacingLineEdit->text().toDouble()/100));
ySpacingLineEdit->setText(QString::number(mInputSpacing[1]*scaleSpacingLineEdit->text().toDouble()/100));
if (mDimension > 2)
//====================================================================
//====================================================================
-void vvResamplerDialog::ComputeNewSizeFromScale() {
+void vvToolResample::ComputeNewSizeFromScale() {
xSizeLineEdit->setText(QString::number(mInputSize[0]*scaleSizeLineEdit->text().toDouble()/100));
ySizeLineEdit->setText(QString::number(mInputSize[1]*scaleSizeLineEdit->text().toDouble()/100));
if (mDimension > 2)
//====================================================================
//====================================================================
-void vvResamplerDialog::ComputeNewSpacingFromIso() {
+void vvToolResample::ComputeNewSpacingFromIso() {
xSpacingLineEdit->setText(QString::number(isoSpacingLineEdit->text().toDouble()));
ySpacingLineEdit->setText(QString::number(isoSpacingLineEdit->text().toDouble()));
if (mDimension > 2)
//====================================================================
//====================================================================
-void vvResamplerDialog::ComputeNewSizeFromIso() {
+void vvToolResample::ComputeNewSizeFromIso() {
xSizeLineEdit->setText(QString::number(isoSizeLineEdit->text().toDouble()));
ySizeLineEdit->setText(QString::number(isoSizeLineEdit->text().toDouble()));
if (mDimension > 2)
//====================================================================
//====================================================================
-void vvResamplerDialog::UpdateInterpolation() {
+void vvToolResample::UpdateInterpolation() {
if (interpolationComboBox->currentText() == "BSpline") {
bSplineLabel->show();
bSplineOrderSpinBox->show();
//====================================================================
//====================================================================
-void vvResamplerDialog::UpdateGaussianFilter() {
+void vvToolResample::UpdateGaussianFilter() {
if (gaussianFilterCheckBox->isChecked()) {
gaussianFilterLabel->show();
xGaussianLineEdit->show();
}
//====================================================================
-//====================================================================
-void vvResamplerDialog::SetSlicerManagers(std::vector<vvSlicerManager*> & m,int current_image_index) {
- mSlicerManagers = m;
- for (unsigned int i = 0; i < mSlicerManagers.size(); i++) {
- mImagesComboBox->addItem(mSlicerManagers[i]->GetFileName().c_str());
- }
- mImagesComboBox->setCurrentIndex(current_image_index);
-}
-//====================================================================
//====================================================================
-void vvResamplerDialog::Resample() {
+void vvToolResample::apply() {
// Get resampler options
std::vector<double> sigma;
sigma.push_back(yGaussianLineEdit->text().toDouble());
if (mDimension > 2) sigma.push_back(zGaussianLineEdit->text().toDouble());
-
- // Create resampler filter
- clitk::ImageResampleGenericFilter::Pointer filter = clitk::ImageResampleGenericFilter::New();
- filter->SetOutputSize(mOutputSize);
- filter->SetOutputSpacing(mOutputSpacing);
- filter->SetInterpolationName(interpolationComboBox->currentText().toLower().toStdString());
+ mFilter->SetOutputSize(mOutputSize);
+ mFilter->SetOutputSpacing(mOutputSpacing);
+ mFilter->SetInterpolationName(interpolationComboBox->currentText().toLower().toStdString());
if (interpolationComboBox->currentText() == "BSpline")
- filter->SetBSplineOrder(bSplineOrderSpinBox->value());
+ mFilter->SetBSplineOrder(bSplineOrderSpinBox->value());
else if (interpolationComboBox->currentText() == "Blut (faster BSpline)") {
- filter->SetInterpolationName("blut");
- filter->SetBSplineOrder(bSplineOrderSpinBox->value());
- filter->SetBLUTSampling(bLUTSpinBox->value());
+ mFilter->SetInterpolationName("blut");
+ mFilter->SetBSplineOrder(bSplineOrderSpinBox->value());
+ mFilter->SetBLUTSampling(bLUTSpinBox->value());
}
if (gaussianFilterCheckBox->isChecked())
- filter->SetGaussianSigma(sigma);
- // filter->SetOutputFileName(OutputFileName.toStdString());
- filter->SetDefaultPixelValue(defaultPixelValueLineEdit->text().toDouble());
- filter->SetInputVVImage(mCurrentImage);
+ mFilter->SetGaussianSigma(sigma);
+ // mFilter->SetOutputFileName(OutputFileName.toStdString());
+ mFilter->SetDefaultPixelValue(defaultPixelValueLineEdit->text().toDouble());
+ mFilter->SetInputVVImage(mCurrentImage);
// Go !
- filter->Update();
- mOutput = filter->GetOutputVVImage();
+ mFilter->Update();
+ mOutput = mFilter->GetOutputVVImage();
+ AddImage(mOutput,GetOutputFileName());
+ close();
}
//====================================================================
-std::string vvResamplerDialog::GetOutputFileName()
+std::string vvToolResample::GetOutputFileName()
{
- QFileInfo info(mImagesComboBox->currentText());
+ QFileInfo info(QString(mCurrentSlicerManager->GetFileName().c_str()));
return (info.path().toStdString() + "/resampled_" + info.fileName().toStdString());
}
-#endif /* end #define _vvResamplerDialog_CXX */
-