-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Hierarchical approach to 3d registration
- Loading branch information
1 parent
1667e43
commit c4bbdf4
Showing
10 changed files
with
822 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#----------------------------------------------------------------------------- | ||
set(MODULE_NAME Tracking3D) | ||
|
||
#----------------------------------------------------------------------------- | ||
set(MODULE_PYTHON_SCRIPTS | ||
${MODULE_NAME}.py | ||
${MODULE_NAME}Lib/__init__.py | ||
${MODULE_NAME}Lib/TreeNode.py | ||
) | ||
|
||
set(MODULE_PYTHON_RESOURCES | ||
Resources/Icons/${MODULE_NAME}.png | ||
Resources/UI/${MODULE_NAME}.ui | ||
Resources/ParameterFiles/rigid.txt | ||
) | ||
|
||
#----------------------------------------------------------------------------- | ||
slicerMacroBuildScriptedModule( | ||
NAME ${MODULE_NAME} | ||
SCRIPTS ${MODULE_PYTHON_SCRIPTS} | ||
RESOURCES ${MODULE_PYTHON_RESOURCES} | ||
WITH_GENERIC_TESTS | ||
) | ||
|
||
#----------------------------------------------------------------------------- | ||
if(BUILD_TESTING) | ||
|
||
# Register the unittest subclass in the main script as a ctest. | ||
# Note that the test will also be available at runtime. | ||
slicer_add_python_unittest(SCRIPT ${MODULE_NAME}.py) | ||
|
||
# Additional build-time testing | ||
add_subdirectory(Testing) | ||
endif() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
(FixedInternalImagePixelType "float") | ||
(MovingInternalImagePixelType "float") | ||
|
||
// **************** Main Components ************************** | ||
|
||
(Registration "MultiResolutionRegistration") | ||
(Interpolator "BSplineInterpolator") | ||
(ResampleInterpolator "FinalBSplineInterpolator") | ||
(Resampler "DefaultResampler") | ||
(FixedImagePyramid "FixedSmoothingImagePyramid") | ||
(MovingImagePyramid "MovingSmoothingImagePyramid") | ||
|
||
(Optimizer "AdaptiveStochasticGradientDescent") | ||
(Transform "EulerTransform") | ||
(Metric "AdvancedMattesMutualInformation") | ||
|
||
// ***************** Transformation ************************** | ||
|
||
(AutomaticScalesEstimation "true") | ||
(AutomaticTransformInitialization "true") | ||
(HowToCombineTransforms "Compose") | ||
|
||
//Save composite ITK transform | ||
(ITKTransformOutputFileNameExtension "h5") | ||
(WriteITKCompositeTransform "true") | ||
|
||
// ******************* Similarity measure ********************* | ||
|
||
(NumberOfHistogramBins 64) | ||
(ErodeMask "false") | ||
|
||
// ******************** Multiresolution ********************** | ||
|
||
(NumberOfResolutions 3) | ||
(ImagePyramidSchedule 8 8 2 4 4 1 1 1 1 ) | ||
|
||
// ******************* Optimizer **************************** | ||
|
||
(MaximumNumberOfIterations 1000) | ||
(MaximumStepLength 6.0) | ||
(RequiredRatioOfValidSamples 0.01) | ||
|
||
// **************** Image sampling ********************** | ||
|
||
(NumberOfSpatialSamples 2000) | ||
(NewSamplesEveryIteration "true") | ||
(ImageSampler "Random") | ||
|
||
// ************* Interpolation and Resampling **************** | ||
|
||
(BSplineInterpolationOrder 1) | ||
(FinalBSplineInterpolationOrder 3) | ||
|
||
(DefaultPixelValue 0) | ||
(WriteResultImage "true") | ||
(ResultImagePixelType "short") | ||
(ResultImageFormat "mhd") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Tracking3D</class> | ||
<widget class="qMRMLWidget" name="Tracking3D"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>785</width> | ||
<height>561</height> | ||
</rect> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="ctkCollapsibleButton" name="inputsCollapsibleButton"> | ||
<property name="text"> | ||
<string>Registration</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>Hierarchy:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QLabel" name="label_6"> | ||
<property name="text"> | ||
<string>Input CT Sequence:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="3" column="0"> | ||
<widget class="QLabel" name="label_7"> | ||
<property name="text"> | ||
<string>Initial Guess (Transform):</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="2"> | ||
<widget class="qMRMLSubjectHierarchyComboBox" name="SubjectHierarchyComboBox"> | ||
<property name="includeItemAttributeNamesFilter"> | ||
<stringlist notr="true"/> | ||
</property> | ||
<property name="includeNodeAttributeNamesFilter"> | ||
<stringlist notr="true"/> | ||
</property> | ||
<property name="excludeItemAttributeNamesFilter"> | ||
<stringlist notr="true"/> | ||
</property> | ||
<property name="excludeNodeAttributeNamesFilter"> | ||
<stringlist notr="true"/> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="3" column="2"> | ||
<widget class="qMRMLNodeComboBox" name="inputSelectorInitGuessTFM"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="toolTip"> | ||
<string>Pick the input to the algorithm.</string> | ||
</property> | ||
<property name="nodeTypes"> | ||
<stringlist notr="true"> | ||
<string>vtkMRMLTransformNode</string> | ||
</stringlist> | ||
</property> | ||
<property name="showChildNodeTypes"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="addEnabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="removeEnabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="SlicerParameterName" stdset="0"> | ||
<string>initialGuessTFM</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="2"> | ||
<widget class="qMRMLNodeComboBox" name="inputSelectorCT"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="toolTip"> | ||
<string>Pick the input to the algorithm.</string> | ||
</property> | ||
<property name="nodeTypes"> | ||
<stringlist notr="true"> | ||
<string>vtkMRMLScalarVolumeNode</string> | ||
</stringlist> | ||
</property> | ||
<property name="showChildNodeTypes"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="addEnabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="removeEnabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="SlicerParameterName" stdset="0"> | ||
<string>inputVolumeSequence</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="4" column="2"> | ||
<widget class="QPushButton" name="applyButton"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="toolTip"> | ||
<string>Run the algorithm.</string> | ||
</property> | ||
<property name="text"> | ||
<string>Apply</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<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> | ||
<customwidgets> | ||
<customwidget> | ||
<class>qMRMLNodeComboBox</class> | ||
<extends>QWidget</extends> | ||
<header>qMRMLNodeComboBox.h</header> | ||
</customwidget> | ||
<customwidget> | ||
<class>qMRMLWidget</class> | ||
<extends>QWidget</extends> | ||
<header>qMRMLWidget.h</header> | ||
<container>1</container> | ||
</customwidget> | ||
<customwidget> | ||
<class>qMRMLSubjectHierarchyComboBox</class> | ||
<extends>ctkComboBox</extends> | ||
<header>qMRMLSubjectHierarchyComboBox.h</header> | ||
</customwidget> | ||
<customwidget> | ||
<class>ctkCollapsibleButton</class> | ||
<extends>QWidget</extends> | ||
<header>ctkCollapsibleButton.h</header> | ||
<container>1</container> | ||
</customwidget> | ||
<customwidget> | ||
<class>ctkComboBox</class> | ||
<extends>QComboBox</extends> | ||
<header>ctkComboBox.h</header> | ||
</customwidget> | ||
</customwidgets> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>Tracking3D</sender> | ||
<signal>mrmlSceneChanged(vtkMRMLScene*)</signal> | ||
<receiver>inputSelectorCT</receiver> | ||
<slot>setMRMLScene(vtkMRMLScene*)</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>392</x> | ||
<y>280</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>468</x> | ||
<y>89</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>Tracking3D</sender> | ||
<signal>mrmlSceneChanged(vtkMRMLScene*)</signal> | ||
<receiver>inputSelectorInitGuessTFM</receiver> | ||
<slot>setMRMLScene(vtkMRMLScene*)</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>392</x> | ||
<y>280</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>468</x> | ||
<y>118</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>Tracking3D</sender> | ||
<signal>mrmlSceneChanged(vtkMRMLScene*)</signal> | ||
<receiver>SubjectHierarchyComboBox</receiver> | ||
<slot>setMRMLScene(vtkMRMLScene*)</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>392</x> | ||
<y>280</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>392</x> | ||
<y>412</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(Python) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
#slicer_add_python_unittest(SCRIPT ${MODULE_NAME}ModuleTest.py) |
Oops, something went wrong.