muhrec and kiptool under the hood - indico.psi.ch · • development in qt creator on all plaorms...

27
WIR SCHAFFEN WISSEN – HEUTE FÜR MORGEN MuhRec and KIPTool under the hood Anders Kaestner :: Paul Scherrer InsAtut SINE2020 WP10 1 st CoordinaAon meeAng, Villigen PSI, CH, April 2016

Upload: others

Post on 26-Sep-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

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

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

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

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

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

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

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

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

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

• 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

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

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

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

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

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

•  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

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

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

• 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

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

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

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

•  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

•  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

• 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

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

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

Page27

Wir schaffen Wissen – heute für morgen

WiththecurrenttoolswehaveaniniAalsuiteoftoolsforneutronimaging……Thedevelopmenttowardsmorecomplexexperimentcondi-ons.…Flexibilitytoaddnewfeatures.…Alreadyausercommunity.