![Page 1: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/1.jpg)
WIRSCHAFFENWISSEN–HEUTEFÜRMORGEN
MuhRec and KIPTool under the hood
AndersKaestner::PaulScherrerInsAtut
SINE2020WP101stCoordinaAonmeeAng,VilligenPSI,CH,April2016
![Page 2: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/2.jpg)
Neutron imaging
Page2
Additional modes: - Real-time imaging
- Stroboscopic imaging
- Tomography
- Energy selective imaging
- Grating interferometry
Basic Principle: - Spatial domain acquisition of transmitted neutrons à Images
- The universal attenuation law applies
![Page 3: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/3.jpg)
Neutron imaging
Page3
Neutron imaging experiments
Data
• Pre-processing
• Noise suppression (first level)
• Artifact reduction
• Scattering correction
• Experiment related processing
• Interpretation/estimation
• Tomographic reconstruction
• Image processing
• Noise suppression (second level)
• Segmentation
Visualization Modeling
![Page 4: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/4.jpg)
Data processing tasks for imaging
Page4
Imageprepara-on Imageanalysis
Referencing
Enhancement
TransformsAcquisi-onàObserva-on
DenoisingAr-factremoval
Registra-onPhysicalcorrec-ons
Segmenta-on
Classifica-onFeaturecharacteriza-on
Materialcharacteriza-on
Displacementquan-fica-on
Timelapseanalysis
Massquan-fica-on
Etc.
Instrumentdependent Applica-ondependent
Fusion
![Page 5: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/5.jpg)
Which tools are used today?
Page5
CT reconstruction • Octopus
• GridRec (+IDL GUI )
• MuhRec
• Astra, TomoPy, TomoJ etc
3D processing, analysis, and visualization • VG Studio, Aviso
• ParaView, Drishti, MeVisLab, KNIME, VisTrails
• KipTool (image processing for special applications)
• Matlab
Projection processing • ImageJ/FIJI
• QNI scattering correction (Hassanein, 2006)
• nGI Tool
• Matlab, IDL
• Python
Most
user
s So
me us
ers
Few
user
s
![Page 6: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/6.jpg)
MuhRec and KIPTool
Page6
MuhRec:CTreconstructor
KIPTool:Generaltoolfor3Dprocessing
![Page 7: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/7.jpg)
ImagingTool: A collection of small tools
Page7
TomoMerge Datarenamer
GenericconversionVolumeSlicer
![Page 8: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/8.jpg)
nGI Tool
Page8
Efficientprocessingofphasesteppingimagesfromagra-nginterferometerWillonlybeaddedtothesuiteoncethealgorithmsarepublished
![Page 9: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/9.jpg)
• Allapplica-onsareavailablefor- Windows(64bit),Ubuntu14.04,MacOS
• GUIisimplementedusingQt5.x• Implementa-onlanguageC++(startedusingC++11)• Mul--threading- MainlysolvedusingOpenMP(notwithClangonMac)- FirsttestsusingC++11threads
• DevelopmentinQtCreatoronallpla^orms(usingQMake)• Nocommerciallibrariesareused• Un-lnowonlyfewunittestsimplemented…• Limiteddocumenta-on
General implementation information
Page9
![Page 10: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/10.jpg)
Configura-on
Page10
The module system
FactoryProcessingchain
Module A
Module B
Module C
Module DLib 1Module AModule D
Lib 2Module B
Lib 3Module C
Data
Result
Configuration script
GUI Configuration
• Dynamicloadrequestedmodules• Parameterizemodules
Configura-onstructsarefilledusing• GUIwidgets• XML-scripts
Processingengine
• Loaddata• Executechain• Storeresult
![Page 11: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/11.jpg)
Coremodulesystem- Moduledescrip-on(xml)
- Dynamicloadingofmodules- OSspecificdetailssupported
- Abstractinterface
- Supports- Singlemoduleloading- Chainloadingusingfactory
Page11
The module system classes (non-GUI)
ConfigBaseList:ModuleConfig
ModuleConfig
LibnameModulenameModuleparameters
Configura-on(General)
FactoryEngineBuildsList:ModuleItem
Feeds
Processing environment (Application specific)
ModuleItemRef:ProcessModuleBase ProcessModuleBase
KiplModuleItem ReconModuleItem
KiplProcessModule
ReconProcessModule
A B C D
A B C D
Modules(General)
Modules(Applica-onspecific)Processingalgorithms
Theseaddnewprocessingandanalysisfunc8onality
![Page 12: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/12.jpg)
Page12
Module configurator widget
Modulelist Parameterlist
Featuresmodulelist• Add/deletemodules• Enable/disablemodules• Rearrangeorder• Suppor-ngconfigura-ondialogs
Featuresparameterlist• Parametersappearfortheselectedmodule• Add/deleteparameters• Editparametername• Editvalues(currentlyonlyasstrings)
Configura-ondialogexamples
BasedonQWidget
![Page 13: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/13.jpg)
Page13
Flow chart Module dialogs
Selectmoduleinconfigwidget
CheckifGUIlibisavailable
Throwexcep-on
TrytogetModuleDialogfromlib
Throwexcep-on
ModulesareinlibModules.xyzDialogsinlibModulesGUI.xyz
Opendialogwithcurrentparameters
• ModuledialogsarebasedonQDialog• Dialogscanoperate
• Withoutimages,fasteropening• Withimages,thepreviousstepsintheprocessingchainwillbeexecuted
![Page 14: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/14.jpg)
MuhRec
Page14
![Page 15: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/15.jpg)
• GUIbasedCTreconstruc-ontool• Basedonfilteredbackprojec-onwithparallelbeamgeometry• Freelyconfigurablepreprocessingchain- Normaliza-on- Ar-factreduc-on(SpotsandRings)- Datacorrec-on- Projec-onfilter- Inspectors
• Newfunc-onalitycaneasilybeaddedasmodulesforpre-procandrecon• Supportedfileformats:fitsand-ff• Mul-OSsupport(Windows,Linux,MacOS)• CanberunusingscriptsorCLI
MuhRec Specifics
Page15
![Page 16: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/16.jpg)
Some common preprocessing modules
Page16
• Normaliza-on
• Spotcleaning
• Ringcleaning
• Reconstruc-onfilter-Ramp+apodiza-onfilters
Raw
Raw Cleaned
Cleaned Difference
![Page 17: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/17.jpg)
Today:• Thebackprojectorismul-threaded• Most-meisspentonar-factremoval- Thereisroomforimprovement
Muhrec: Some word about performance
Page17
Execu-on-meonasinglethread(2011)
![Page 18: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/18.jpg)
• Addconebeamgeometry• Improvepreprocessing-me- ar-factreduc-onis-meconsuming
• Additera-vereconstruc-onmethods- PredefinedSIRT,DART,SARTforsingledat- Addsupportforaprioriinforma-on
• Addsupportfor4DCT(dataflow+regulariza-on)• ImproveGUIstability(inkl.improveuserfriendliness)• Improveuserdocumenta-on• AddHDFsupport(e.g.NeXus,Matlab,others?)• Supportfor6Ddata?• Porttoclusterbasedrecon• Pythonscrip-ng(forrapidprototypingmodules)
MuhRec next steps
Page18
![Page 19: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/19.jpg)
KIPToolwasdevelopedtoprovideauserinterfacetoimageprocessingalgorithms• Worksmainlywith3Ddata• Loadastackofimages• 2Dsliceinspec-on• Basedonachainprocessor• Resultscanbecomparedwithoriginal- Histogram- Profiles- Difference
• Severalmodulelibraries
KIPTool specifics
Page19
Base• Scaledata• Dataclamping• Dosecorrec-on• Volumeprojec-on
Classifica-on• Doublethreshold• FuzzyC-Means• Removebackground
Advancedfilters• ROFfilter(ISS)• Non-lineardiffusion• Non-localmeans
PCA• PCAfilter(experimental)
Porespace• Poresizedistribu-on(experimental)
![Page 20: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/20.jpg)
TheROFfiltermodelisanedgepreservingdenoisingfilter
KIPTool using ROF (ISS filter)
Page20
Plots and information
![Page 21: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/21.jpg)
Demonstration ROF filter
Page21
10 iterations 50 iterations 500 iterations
![Page 22: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/22.jpg)
• Addmoremodules- Instrumentrelatedprocessing- Registra-on- Segmenta-on- Analysis- Quan-fica-on
• Changeprocessingchaintonetwork- Nodeeditor- Mul-pleimagesupport
• 2Dand4Dsupport• Scrip-nginPython- Usingmodules- Callinglibraryfunc-ons
KIPTool next steps
Page22
![Page 23: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/23.jpg)
• Displayoffloa-ngpointdata• HandlesrectangularROIs• IntensitymeasurementsinROI• Semngdisplayedintensityintervalusingdialogorrightmouse• Showsintensityandmouseposi-onastool-p• Canlinksemngswithotherimageviewers• Supportsplotsandmarkers• BasedonQwidget• CanbeusedinPDFreports
Image viewer widget
Page23
![Page 24: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/24.jpg)
• Abasicplomngwidget• Mul-pleplotsandcolors• Horizontalandver-calmarkerslines• Zoomfunc-on• Glyphsondatapoints• BasedonQwidget• CanbeusedinPDFreports
Plot widget
Page24
![Page 25: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/25.jpg)
Current libraries – an overview
Page25
![Page 26: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/26.jpg)
Visualiza-oniss-llanopenques-onCurrentlycommercial(veryexpensive)fullfeaturedtoolsareused• VGStudio• Aviso
Theysolvemanytasksbutfailwithmorespecifictasks- 4Ddata(-meseriesofvolumes)- 6D(vectorsin3D)- Mul-variatevisualiza-on
ThesetopicswillbetargetedduringaplannedworkshoporganizedwithCOSTac-onMP1207:VisualanalysisofdynamicprocessesPlace:RigiKulm,CH,January2017
3D and 4D Visualization
Page26
![Page 27: MuhRec and KIPTool under the hood - indico.psi.ch · • Development in Qt Creator on all plaorms (using QMake) • No commercial libraries are used • Un-l now only few unit tests](https://reader034.vdocuments.us/reader034/viewer/2022051605/600f387834ca117dde1fc517/html5/thumbnails/27.jpg)
Page27
Wir schaffen Wissen – heute für morgen
WiththecurrenttoolswehaveaniniAalsuiteoftoolsforneutronimaging……Thedevelopmenttowardsmorecomplexexperimentcondi-ons.…Flexibilitytoaddnewfeatures.…Alreadyausercommunity.