python-microscopy 25.6.5__cp39-cp39-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PYME/Acquire/ActionManager.py +450 -0
- PYME/Acquire/ExecTools.py +235 -0
- PYME/Acquire/Hardware/AAOptoelectronics/MDS.py +175 -0
- PYME/Acquire/Hardware/AAOptoelectronics/__init__.py +0 -0
- PYME/Acquire/Hardware/ARCoptix/__init__.py +0 -0
- PYME/Acquire/Hardware/ARCoptix/lcdriver.py +149 -0
- PYME/Acquire/Hardware/ARCoptix/lcserver32.py +123 -0
- PYME/Acquire/Hardware/AndorIXon/AndorCam.py +1095 -0
- PYME/Acquire/Hardware/AndorIXon/AndorControlFrame.py +312 -0
- PYME/Acquire/Hardware/AndorIXon/AndorIXon.py +737 -0
- PYME/Acquire/Hardware/AndorIXon/__init__.py +27 -0
- PYME/Acquire/Hardware/AndorNeo/AndorNeo.py +644 -0
- PYME/Acquire/Hardware/AndorNeo/AndorNeoControlFrame.py +161 -0
- PYME/Acquire/Hardware/AndorNeo/AndorZyla.py +761 -0
- PYME/Acquire/Hardware/AndorNeo/SDK3.py +307 -0
- PYME/Acquire/Hardware/AndorNeo/SDK3Cam.py +171 -0
- PYME/Acquire/Hardware/AndorNeo/ZylaControlPanel.py +105 -0
- PYME/Acquire/Hardware/AndorNeo/__init__.py +22 -0
- PYME/Acquire/Hardware/AndorNeo/parseAtdebug.py +46 -0
- PYME/Acquire/Hardware/AndorNeo/plotTimings.py +73 -0
- PYME/Acquire/Hardware/AndorNeo/testNeo.py +62 -0
- PYME/Acquire/Hardware/Camera.py +1199 -0
- PYME/Acquire/Hardware/CameraSkeleton.py +642 -0
- PYME/Acquire/Hardware/Coherent/OBIS.py +147 -0
- PYME/Acquire/Hardware/Coherent/Sapphire.py +162 -0
- PYME/Acquire/Hardware/Coherent/__init__.py +0 -0
- PYME/Acquire/Hardware/DMDGui.py +198 -0
- PYME/Acquire/Hardware/DigiData/DigiData.py +95 -0
- PYME/Acquire/Hardware/DigiData/DigiDataClient.py +30 -0
- PYME/Acquire/Hardware/DigiData/RemoteDigiData.py +51 -0
- PYME/Acquire/Hardware/DigiData/__init__.py +24 -0
- PYME/Acquire/Hardware/DigiData/axDD132x.py +348 -0
- PYME/Acquire/Hardware/EMCCDTheory.py +41 -0
- PYME/Acquire/Hardware/ExciterWheel.py +167 -0
- PYME/Acquire/Hardware/FilterWheel.py +184 -0
- PYME/Acquire/Hardware/FocCorr.py +106 -0
- PYME/Acquire/Hardware/FocCorrR.py +196 -0
- PYME/Acquire/Hardware/FrFilter.py +51 -0
- PYME/Acquire/Hardware/GCS/GCS_DLL.py +370 -0
- PYME/Acquire/Hardware/GCS/__init__.py +0 -0
- PYME/Acquire/Hardware/GCS/gcs.py +210 -0
- PYME/Acquire/Hardware/HamamatsuDCAM/HamamatsuDCAM.py +662 -0
- PYME/Acquire/Hardware/HamamatsuDCAM/HamamatsuORCA.py +602 -0
- PYME/Acquire/Hardware/HamamatsuDCAM/Hamamatsu_control_panel.py +54 -0
- PYME/Acquire/Hardware/HamamatsuDCAM/__init__.py +23 -0
- PYME/Acquire/Hardware/LaserControlFrame.py +160 -0
- PYME/Acquire/Hardware/MPBCommunications/MPBCW.py +132 -0
- PYME/Acquire/Hardware/MPBCommunications/__init__.py +0 -0
- PYME/Acquire/Hardware/Mercury/Mercury.py +269 -0
- PYME/Acquire/Hardware/Mercury/PI_Mercury_GCS_DLL.py +857 -0
- PYME/Acquire/Hardware/Mercury/__init__.py +22 -0
- PYME/Acquire/Hardware/Mercury/mercuryStepper.py +203 -0
- PYME/Acquire/Hardware/Mercury/mercuryStepperGCS.py +281 -0
- PYME/Acquire/Hardware/NikonTE2000.py +68 -0
- PYME/Acquire/Hardware/NikonTi.py +214 -0
- PYME/Acquire/Hardware/NikonTiGUI.py +81 -0
- PYME/Acquire/Hardware/OrielCornerstone.py +125 -0
- PYME/Acquire/Hardware/PM100USB.py +51 -0
- PYME/Acquire/Hardware/Piezos/__init__.py +22 -0
- PYME/Acquire/Hardware/Piezos/base_piezo.py +108 -0
- PYME/Acquire/Hardware/Piezos/offsetPiezo.py +162 -0
- PYME/Acquire/Hardware/Piezos/offsetPiezoREST.py +308 -0
- PYME/Acquire/Hardware/Piezos/piezo_c867.py +486 -0
- PYME/Acquire/Hardware/Piezos/piezo_e255.py +68 -0
- PYME/Acquire/Hardware/Piezos/piezo_e662.py +61 -0
- PYME/Acquire/Hardware/Piezos/piezo_e709.py +434 -0
- PYME/Acquire/Hardware/Piezos/piezo_e816.py +452 -0
- PYME/Acquire/Hardware/Piezos/piezo_e816_corr.py +70 -0
- PYME/Acquire/Hardware/Piezos/piezo_e816_dll.py +518 -0
- PYME/Acquire/Hardware/Piezos/piezo_e816b.py +70 -0
- PYME/Acquire/Hardware/Piezos/piezo_pipython_gcs.py +560 -0
- PYME/Acquire/Hardware/Piezos/piezo_test.py +55 -0
- PYME/Acquire/Hardware/Simulator/EmpiricalHist.py +273 -0
- PYME/Acquire/Hardware/Simulator/__init__.py +22 -0
- PYME/Acquire/Hardware/Simulator/dSimControl.py +961 -0
- PYME/Acquire/Hardware/Simulator/fakeCam.py +651 -0
- PYME/Acquire/Hardware/Simulator/fakePiezo.py +95 -0
- PYME/Acquire/Hardware/Simulator/fluor.py +336 -0
- PYME/Acquire/Hardware/Simulator/illuminate.cp39-win_amd64.dll.a +0 -0
- PYME/Acquire/Hardware/Simulator/illuminate.cp39-win_amd64.pyd +0 -0
- PYME/Acquire/Hardware/Simulator/illuminate.pyx +93 -0
- PYME/Acquire/Hardware/Simulator/lasersliders.py +90 -0
- PYME/Acquire/Hardware/Simulator/rend_im.py +446 -0
- PYME/Acquire/Hardware/Simulator/setup.py +69 -0
- PYME/Acquire/Hardware/Simulator/simcontrol.py +348 -0
- PYME/Acquire/Hardware/Simulator/simui_wx.py +794 -0
- PYME/Acquire/Hardware/Tango/__init__.py +0 -0
- PYME/Acquire/Hardware/Tango/marzhauser_tango.py +583 -0
- PYME/Acquire/Hardware/TiLightCrafter.py +388 -0
- PYME/Acquire/Hardware/__init__.py +22 -0
- PYME/Acquire/Hardware/aotf.py +271 -0
- PYME/Acquire/Hardware/arclampshutterpanel.py +71 -0
- PYME/Acquire/Hardware/cameraSoftwareBuffer.py +215 -0
- PYME/Acquire/Hardware/camera_noise.py +270 -0
- PYME/Acquire/Hardware/ccdAdjPanel.py +188 -0
- PYME/Acquire/Hardware/ccdCalibrator.py +161 -0
- PYME/Acquire/Hardware/cobaltLaser.py +108 -0
- PYME/Acquire/Hardware/cobaltLaser561.py +94 -0
- PYME/Acquire/Hardware/comports.py +26 -0
- PYME/Acquire/Hardware/driftTrackGUI.py +488 -0
- PYME/Acquire/Hardware/driftTracking.py +595 -0
- PYME/Acquire/Hardware/fakeShutters.py +52 -0
- PYME/Acquire/Hardware/focusKeys.py +204 -0
- PYME/Acquire/Hardware/focus_locks/__init__.py +0 -0
- PYME/Acquire/Hardware/focus_locks/reflection_focus_lock.py +684 -0
- PYME/Acquire/Hardware/frZStage.py +117 -0
- PYME/Acquire/Hardware/fw102.py +38 -0
- PYME/Acquire/Hardware/ids_peak_cam.py +561 -0
- PYME/Acquire/Hardware/ioslave.py +305 -0
- PYME/Acquire/Hardware/lasers.py +292 -0
- PYME/Acquire/Hardware/matchboxLaser.py +58 -0
- PYME/Acquire/Hardware/microscope_adapter.py +104 -0
- PYME/Acquire/Hardware/mpd_picosecond_delayer.py +395 -0
- PYME/Acquire/Hardware/multiview.py +287 -0
- PYME/Acquire/Hardware/olympusix81.py +59 -0
- PYME/Acquire/Hardware/pco/__init__.py +0 -0
- PYME/Acquire/Hardware/pco/pco_cam.py +348 -0
- PYME/Acquire/Hardware/pco/pco_edge_42_lt.py +34 -0
- PYME/Acquire/Hardware/pco/pco_sdk.py +1645 -0
- PYME/Acquire/Hardware/pco/pco_sdk_cam.py +518 -0
- PYME/Acquire/Hardware/pco/pco_sdk_cam_control_panel.py +54 -0
- PYME/Acquire/Hardware/phoxxLaser.py +199 -0
- PYME/Acquire/Hardware/phoxxLaserOLD.py +242 -0
- PYME/Acquire/Hardware/priorLumen.py +102 -0
- PYME/Acquire/Hardware/priorarclampshutter.py +52 -0
- PYME/Acquire/Hardware/setup.py +50 -0
- PYME/Acquire/Hardware/spacenav.py +148 -0
- PYME/Acquire/Hardware/splitter.py +394 -0
- PYME/Acquire/Hardware/thorlabsPiezo.py +98 -0
- PYME/Acquire/Hardware/thorlabs_cam.py +136 -0
- PYME/Acquire/Hardware/thorlabs_mff_flipper.py +400 -0
- PYME/Acquire/Hardware/toptica_ibeam.py +51 -0
- PYME/Acquire/Hardware/uc480/AndorControlFrame.py +308 -0
- PYME/Acquire/Hardware/uc480/__init__.py +27 -0
- PYME/Acquire/Hardware/uc480/uCam480.py +695 -0
- PYME/Acquire/Hardware/uc480/uc480.py +189 -0
- PYME/Acquire/Hardware/uc480/uc480Deprecated.py +87 -0
- PYME/Acquire/Hardware/uc480/uc480_h.py +767 -0
- PYME/Acquire/Hardware/uc480/uc480_h_gen.py +62 -0
- PYME/Acquire/Hardware/uc480/ucCamControlFrame.py +83 -0
- PYME/Acquire/Hardware/ueye.py +702 -0
- PYME/Acquire/PYMEAcquire.py +186 -0
- PYME/Acquire/Protocols/DMDMFM.py +74 -0
- PYME/Acquire/Protocols/__init__.py +22 -0
- PYME/Acquire/Protocols/darkCalibrate.py +56 -0
- PYME/Acquire/Protocols/dual671_470.py +45 -0
- PYME/Acquire/Protocols/dual671_488.py +46 -0
- PYME/Acquire/Protocols/gainCal.py +53 -0
- PYME/Acquire/Protocols/htsms-cal-psf.py +32 -0
- PYME/Acquire/Protocols/htsms-cal-registration.py +52 -0
- PYME/Acquire/Protocols/htsms-flow.py +29 -0
- PYME/Acquire/Protocols/htsms-staggered.py +31 -0
- PYME/Acquire/Protocols/htsms-tile.py +68 -0
- PYME/Acquire/Protocols/htsms-two-color.py +29 -0
- PYME/Acquire/Protocols/htsms-widefield.py +32 -0
- PYME/Acquire/Protocols/paint671.py +61 -0
- PYME/Acquire/Protocols/photoconversion.py +52 -0
- PYME/Acquire/Protocols/photoconversion2.py +55 -0
- PYME/Acquire/Protocols/prebleach488.py +70 -0
- PYME/Acquire/Protocols/prebleach490.py +69 -0
- PYME/Acquire/Protocols/prebleach561.py +72 -0
- PYME/Acquire/Protocols/prebleach561NeomEos2.py +70 -0
- PYME/Acquire/Protocols/prebleach561NeomEos2ND1.py +70 -0
- PYME/Acquire/Protocols/prebleach642.py +70 -0
- PYME/Acquire/Protocols/prebleach671.py +69 -0
- PYME/Acquire/Protocols/prebleach671ND1.py +58 -0
- PYME/Acquire/Protocols/prebleach671ND2.py +57 -0
- PYME/Acquire/Protocols/prebleach671Neo.py +69 -0
- PYME/Acquire/Protocols/recover671.py +62 -0
- PYME/Acquire/Protocols/sequence642_488.py +85 -0
- PYME/Acquire/Protocols/sequence642_561.py +87 -0
- PYME/Acquire/Protocols/shiftfield.py +198 -0
- PYME/Acquire/Protocols/simul488.py +59 -0
- PYME/Acquire/Protocols/simul642.py +63 -0
- PYME/Acquire/Protocols/simul642HTSMS.py +63 -0
- PYME/Acquire/Protocols/simulPA.py +37 -0
- PYME/Acquire/Protocols/simulSIM.py +76 -0
- PYME/Acquire/Protocols/simulStep.py +62 -0
- PYME/Acquire/Protocols/spdscan.py +178 -0
- PYME/Acquire/Protocols/standard470.py +45 -0
- PYME/Acquire/Protocols/standard488.py +47 -0
- PYME/Acquire/Protocols/standard671.py +48 -0
- PYME/Acquire/Protocols/standard671_no532.py +47 -0
- PYME/Acquire/Protocols/standardArclamp.py +46 -0
- PYME/Acquire/Protocols/strip_tile.py +204 -0
- PYME/Acquire/Protocols/tile.py +204 -0
- PYME/Acquire/Protocols/tile3D.py +192 -0
- PYME/Acquire/Protocols/tile671.py +190 -0
- PYME/Acquire/Protocols/tile_triggered.py +189 -0
- PYME/Acquire/Scripts/init.py +232 -0
- PYME/Acquire/Scripts/init_N1_Ti_Exeter_ZIx.py +374 -0
- PYME/Acquire/Scripts/init_N2_Ti_Zyla_lasers.py +290 -0
- PYME/Acquire/Scripts/init_Neo.py +266 -0
- PYME/Acquire/Scripts/init_NeoSim.py +159 -0
- PYME/Acquire/Scripts/init_TIRF.py +232 -0
- PYME/Acquire/Scripts/init_TIRF_Neo.py +242 -0
- PYME/Acquire/Scripts/init_TIRF_NeoO.py +241 -0
- PYME/Acquire/Scripts/init_TIRF_onecam.py +233 -0
- PYME/Acquire/Scripts/init_Ti.py +257 -0
- PYME/Acquire/Scripts/init_UOA_n.py +256 -0
- PYME/Acquire/Scripts/init_UOA_n2.py +246 -0
- PYME/Acquire/Scripts/init_Y1.py +249 -0
- PYME/Acquire/Scripts/init_Zyla.py +260 -0
- PYME/Acquire/Scripts/init_drift_tracking.py +80 -0
- PYME/Acquire/Scripts/init_emccd_basic.py +277 -0
- PYME/Acquire/Scripts/init_htsms.py +277 -0
- PYME/Acquire/Scripts/init_htsms_focus_lock.py +132 -0
- PYME/Acquire/Scripts/init_micrpi.py +45 -0
- PYME/Acquire/Scripts/init_orca.py +70 -0
- PYME/Acquire/Scripts/init_pco.py +49 -0
- PYME/Acquire/Scripts/init_rev.py +74 -0
- PYME/Acquire/Scripts/init_sim100.py +169 -0
- PYME/Acquire/Scripts/init_sim103.py +169 -0
- PYME/Acquire/Scripts/init_sim2.py +211 -0
- PYME/Acquire/Scripts/init_sim50.py +169 -0
- PYME/Acquire/Scripts/init_sim75.py +169 -0
- PYME/Acquire/Scripts/init_sim_drift_tracking.py +166 -0
- PYME/Acquire/Scripts/init_sim_htsms.py +224 -0
- PYME/Acquire/Scripts/init_sim_htsms_n.py +233 -0
- PYME/Acquire/Scripts/init_sim_main.py +229 -0
- PYME/Acquire/Scripts/init_sim_min.py +197 -0
- PYME/Acquire/Scripts/init_sim_rem.py +176 -0
- PYME/Acquire/Scripts/init_smi1.py +110 -0
- PYME/Acquire/Scripts/init_spectro.py +78 -0
- PYME/Acquire/Scripts/init_spim.py +116 -0
- PYME/Acquire/Scripts/init_thorcam.py +62 -0
- PYME/Acquire/Scripts/init_twophoton.py +112 -0
- PYME/Acquire/Scripts/init_uc480.py +262 -0
- PYME/Acquire/Scripts/init_ueye.py +261 -0
- PYME/Acquire/SpoolController.py +958 -0
- PYME/Acquire/Utils/MultiPointScanner.py +80 -0
- PYME/Acquire/Utils/__init__.py +13 -0
- PYME/Acquire/Utils/failsafe.py +157 -0
- PYME/Acquire/Utils/fastTiler.py +153 -0
- PYME/Acquire/Utils/pointScanner.py +496 -0
- PYME/Acquire/Utils/sarcSpacing.py +86 -0
- PYME/Acquire/Utils/strip_tiler.py +93 -0
- PYME/Acquire/Utils/tiler.py +464 -0
- PYME/Acquire/Utils/vibrationAnalysis.py +65 -0
- PYME/Acquire/__init__.py +44 -0
- PYME/Acquire/acquire_client.py +90 -0
- PYME/Acquire/acquire_server.py +316 -0
- PYME/Acquire/acquirebase.py +139 -0
- PYME/Acquire/acquiremainframe.py +716 -0
- PYME/Acquire/acquirewx.py +61 -0
- PYME/Acquire/acquisition_base.py +148 -0
- PYME/Acquire/actions.py +209 -0
- PYME/Acquire/autofocus.py +54 -0
- PYME/Acquire/eventLog.py +95 -0
- PYME/Acquire/event_loop.py +119 -0
- PYME/Acquire/frameWrangler.py +530 -0
- PYME/Acquire/htsms/__init__.py +8 -0
- PYME/Acquire/htsms/rule_ui.py +970 -0
- PYME/Acquire/htsms/rule_ui_v2.py +573 -0
- PYME/Acquire/htsms/tweeter.py +222 -0
- PYME/Acquire/microscope.py +1050 -0
- PYME/Acquire/positionTracker.py +181 -0
- PYME/Acquire/protocol.py +299 -0
- PYME/Acquire/protocol_acquisition.py +404 -0
- PYME/Acquire/sampleInformation.py +591 -0
- PYME/Acquire/sampleInformationDjangoDirect.py +446 -0
- PYME/Acquire/setup.py +52 -0
- PYME/Acquire/stackSettings.py +295 -0
- PYME/Acquire/stage_leveling.py +285 -0
- PYME/Acquire/ui/AnalysisSettingsUI.py +184 -0
- PYME/Acquire/ui/HDFSpoolFrame.py +584 -0
- PYME/Acquire/ui/__init__.py +0 -0
- PYME/Acquire/ui/actionUI.py +892 -0
- PYME/Acquire/ui/focus_lock_gui.py +149 -0
- PYME/Acquire/ui/intensity_trace.py +143 -0
- PYME/Acquire/ui/intsliders.py +222 -0
- PYME/Acquire/ui/lasersliders.py +329 -0
- PYME/Acquire/ui/mpd_picosecond_delay_panel.py +69 -0
- PYME/Acquire/ui/multiview_select.py +77 -0
- PYME/Acquire/ui/positionUI.py +519 -0
- PYME/Acquire/ui/preflight.py +58 -0
- PYME/Acquire/ui/scanner_panel.py +41 -0
- PYME/Acquire/ui/selectCameraPanel.py +46 -0
- PYME/Acquire/ui/seqdialog.py +501 -0
- PYME/Acquire/ui/splashScreen.py +175 -0
- PYME/Acquire/ui/spool_panel.py +830 -0
- PYME/Acquire/ui/tile_panel.py +556 -0
- PYME/Acquire/ui/tilesettingsui.py +91 -0
- PYME/Acquire/ui/voxelSizeDialog.py +149 -0
- PYME/Acquire/webui/__init__.py +36 -0
- PYME/Acquire/webui/ipy.py +361 -0
- PYME/Acquire/webui/static/css/pyme-bootstrap.css +9908 -0
- PYME/Acquire/webui/static/css/pymeacquire.css +85 -0
- PYME/Acquire/webui/static/js/pymeacquire.js +375 -0
- PYME/Acquire/webui/static/js/pzf.js +95 -0
- PYME/Acquire/webui/templates/PYMEAcquire.html +232 -0
- PYME/Acquire/webui/templates/login.html +84 -0
- PYME/Acquire/webui/templates/xtermpage.html +106 -0
- PYME/Acquire/xyztc.py +418 -0
- PYME/Acquire/zScanner.py +287 -0
- PYME/Analysis/BleachProfile/__init__.py +26 -0
- PYME/Analysis/BleachProfile/deMod.py +91 -0
- PYME/Analysis/BleachProfile/fitRecover.py +90 -0
- PYME/Analysis/BleachProfile/intensProf.py +519 -0
- PYME/Analysis/BleachProfile/kinModels.py +507 -0
- PYME/Analysis/BleachProfile/rawIntensity.py +227 -0
- PYME/Analysis/BleachProfile/rollins.py +555 -0
- PYME/Analysis/Colocalisation/__init__.py +27 -0
- PYME/Analysis/Colocalisation/colocScaleDep.py +126 -0
- PYME/Analysis/Colocalisation/correlationCoeffs.py +198 -0
- PYME/Analysis/Colocalisation/distColoc.py +110 -0
- PYME/Analysis/Colocalisation/edtColoc.py +191 -0
- PYME/Analysis/MetaData.py +278 -0
- PYME/Analysis/PSFEst/__init__.py +27 -0
- PYME/Analysis/PSFEst/dec.py +283 -0
- PYME/Analysis/PSFEst/extractImages.py +316 -0
- PYME/Analysis/PSFEst/fit_psf_zernikes.py +194 -0
- PYME/Analysis/PSFEst/psfQuality.py +225 -0
- PYME/Analysis/PSFGen/__init__.py +40 -0
- PYME/Analysis/PSFGen/fourier.py +138 -0
- PYME/Analysis/PSFGen/fourierHNA.py +1108 -0
- PYME/Analysis/PSFGen/fourierHNA2.py +979 -0
- PYME/Analysis/PSFGen/genCRBcurves.py +185 -0
- PYME/Analysis/PSFGen/nijboer_zernike.py +79 -0
- PYME/Analysis/PSFGen/ps_app.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/PSFGen/ps_app.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/PSFGen/test_ps_app.py +24 -0
- PYME/Analysis/Tracking/__init__.py +3 -0
- PYME/Analysis/Tracking/msd.py +57 -0
- PYME/Analysis/Tracking/trackUtils.py +528 -0
- PYME/Analysis/Tracking/tracking.py +152 -0
- PYME/Analysis/__init__.py +30 -0
- PYME/Analysis/_fithelpers.py +161 -0
- PYME/Analysis/angleFilter.py +287 -0
- PYME/Analysis/annealThresh.py +157 -0
- PYME/Analysis/autoencoder_classifier.py +45 -0
- PYME/Analysis/binAvg.py +144 -0
- PYME/Analysis/composite.py +183 -0
- PYME/Analysis/cramerRao.py +259 -0
- PYME/Analysis/deTile.py +441 -0
- PYME/Analysis/density_filter.py +45 -0
- PYME/Analysis/distributed_pyramid.py +426 -0
- PYME/Analysis/fiducial_matching.py +220 -0
- PYME/Analysis/gen_sCMOS_maps.py +355 -0
- PYME/Analysis/graphing_filters.py +311 -0
- PYME/Analysis/implicitFilter.py +359 -0
- PYME/Analysis/keep_pairs.py +69 -0
- PYME/Analysis/optic_flow.py +108 -0
- PYME/Analysis/piecewise.py +36 -0
- PYME/Analysis/piecewiseMapping.py +304 -0
- PYME/Analysis/piezo_movement_correction.py +153 -0
- PYME/Analysis/points/DeClump/__init__.py +78 -0
- PYME/Analysis/points/DeClump/deClump.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/DeClump/deClump.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/DeClump/deClumpGUI.py +87 -0
- PYME/Analysis/points/DeClump/pyDeClump.py +284 -0
- PYME/Analysis/points/DeClump/testClump.py +40 -0
- PYME/Analysis/points/DistHist/__init__.py +25 -0
- PYME/Analysis/points/DistHist/distHist.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/DistHist/distHist.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/DistHist/distHistThreaded.py +71 -0
- PYME/Analysis/points/DistHist/setup.py +54 -0
- PYME/Analysis/points/EdgeDB/__init__.py +24 -0
- PYME/Analysis/points/EdgeDB/edgeDB.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/EdgeDB/edgeDB.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/EdgeDB/edgeTest.py +66 -0
- PYME/Analysis/points/EdgeDB/edges.py +102 -0
- PYME/Analysis/points/EdgeDB/segment.py +75 -0
- PYME/Analysis/points/EdgeDB/setup.py +54 -0
- PYME/Analysis/points/QuadTree/QTrend.py +232 -0
- PYME/Analysis/points/QuadTree/__init__.py +25 -0
- PYME/Analysis/points/QuadTree/pointQT.py +227 -0
- PYME/Analysis/points/QuadTree/pointQTF.py +254 -0
- PYME/Analysis/points/QuadTree/qtUtils.py +36 -0
- PYME/Analysis/points/QuadTree/rendQT.py +118 -0
- PYME/Analysis/points/SoftRend/__init__.py +24 -0
- PYME/Analysis/points/SoftRend/setup.py +61 -0
- PYME/Analysis/points/SoftRend/testTetrahedra.py +41 -0
- PYME/Analysis/points/SoftRend/triRend.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/SoftRend/triRend.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/__init__.py +3 -0
- PYME/Analysis/points/arcfit/__init__.py +1 -0
- PYME/Analysis/points/arcfit/arcmf.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/arcfit/arcmf.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/arcfit/setup.py +51 -0
- PYME/Analysis/points/astigmatism/__init__.py +0 -0
- PYME/Analysis/points/astigmatism/astigTools.py +338 -0
- PYME/Analysis/points/astigmatism/astiglookup.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/astigmatism/astiglookup.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/astigmatism/setup.py +54 -0
- PYME/Analysis/points/cluster_morphology.py +199 -0
- PYME/Analysis/points/coordinate_tools.py +278 -0
- PYME/Analysis/points/features/__init__.py +0 -0
- PYME/Analysis/points/features/metal.py +46 -0
- PYME/Analysis/points/features/shaders/vect_feat_3d.metal +49 -0
- PYME/Analysis/points/fiducials.py +142 -0
- PYME/Analysis/points/gen3DTriangs.py +796 -0
- PYME/Analysis/points/moments.py +143 -0
- PYME/Analysis/points/multiview.py +458 -0
- PYME/Analysis/points/objectMeasure.py +206 -0
- PYME/Analysis/points/qpaint.py +97 -0
- PYME/Analysis/points/rings.py +372 -0
- PYME/Analysis/points/ripleys.py +427 -0
- PYME/Analysis/points/segmentLL.py +134 -0
- PYME/Analysis/points/setup.py +56 -0
- PYME/Analysis/points/spherical_harmonics.py +909 -0
- PYME/Analysis/points/surfit.py +829 -0
- PYME/Analysis/points/tCluster.py +75 -0
- PYME/Analysis/points/traveling_salesperson/__init__.py +0 -0
- PYME/Analysis/points/traveling_salesperson/queue_opt.py +117 -0
- PYME/Analysis/points/traveling_salesperson/sectioned_two_opt.py +327 -0
- PYME/Analysis/points/traveling_salesperson/setup.py +40 -0
- PYME/Analysis/points/traveling_salesperson/sort.py +78 -0
- PYME/Analysis/points/traveling_salesperson/two_opt.py +189 -0
- PYME/Analysis/points/traveling_salesperson/two_opt_utils.cp39-win_amd64.dll.a +0 -0
- PYME/Analysis/points/traveling_salesperson/two_opt_utils.cp39-win_amd64.pyd +0 -0
- PYME/Analysis/points/traveling_salesperson/two_opt_utils.pyx +41 -0
- PYME/Analysis/points/twoColour.py +572 -0
- PYME/Analysis/points/twoColourPlot.py +107 -0
- PYME/Analysis/processLogger.py +129 -0
- PYME/Analysis/profile_extraction.py +72 -0
- PYME/Analysis/setup.py +60 -0
- PYME/Analysis/splitting.py +372 -0
- PYME/Analysis/svmSegment.py +214 -0
- PYME/Analysis/thresholding.py +192 -0
- PYME/Analysis/tile_pyramid.py +938 -0
- PYME/Analysis/widefieldify.py +54 -0
- PYME/DSView/DisplayOptionsPanel.py +503 -0
- PYME/DSView/LUT/__init__.py +33 -0
- PYME/DSView/LUT/lut.cp39-win_amd64.dll.a +0 -0
- PYME/DSView/LUT/lut.cp39-win_amd64.pyd +0 -0
- PYME/DSView/LUT/setup.py +54 -0
- PYME/DSView/OpenSequenceDialog.py +83 -0
- PYME/DSView/OverlaysPanel.py +111 -0
- PYME/DSView/__init__.py +32 -0
- PYME/DSView/arrayViewPanel.py +1035 -0
- PYME/DSView/displayOptions.py +453 -0
- PYME/DSView/displaySettingsPanel.py +271 -0
- PYME/DSView/dsviewer.py +542 -0
- PYME/DSView/eventLogViewer.py +805 -0
- PYME/DSView/fitInfo.py +486 -0
- PYME/DSView/htmlServe.py +72 -0
- PYME/DSView/logparser.py +100 -0
- PYME/DSView/modules/LMAnalysis.py +1053 -0
- PYME/DSView/modules/LMDisplay.py +194 -0
- PYME/DSView/modules/__init__.py +162 -0
- PYME/DSView/modules/_base.py +39 -0
- PYME/DSView/modules/annotation.py +725 -0
- PYME/DSView/modules/arrayView.py +71 -0
- PYME/DSView/modules/blobFinding.py +455 -0
- PYME/DSView/modules/blobMeasure.py +1093 -0
- PYME/DSView/modules/camera_maps.py +38 -0
- PYME/DSView/modules/coloc.py +414 -0
- PYME/DSView/modules/composite.py +715 -0
- PYME/DSView/modules/convnet.py +24 -0
- PYME/DSView/modules/cropping.py +133 -0
- PYME/DSView/modules/dark_and_flatfield.py +31 -0
- PYME/DSView/modules/deconvolution.py +499 -0
- PYME/DSView/modules/eventView.py +80 -0
- PYME/DSView/modules/extractBlobs.py +46 -0
- PYME/DSView/modules/fastGraphPanel.py +85 -0
- PYME/DSView/modules/filtering.py +335 -0
- PYME/DSView/modules/flowView.py +268 -0
- PYME/DSView/modules/fourierRingCorrelation.py +172 -0
- PYME/DSView/modules/gl_image_view.py +12 -0
- PYME/DSView/modules/graphViewPanel.py +272 -0
- PYME/DSView/modules/measure/__init__.py +1 -0
- PYME/DSView/modules/measure/filterPan.py +239 -0
- PYME/DSView/modules/metadataView.py +28 -0
- PYME/DSView/modules/multithreshold.py +98 -0
- PYME/DSView/modules/neuroglancer.py +129 -0
- PYME/DSView/modules/object_tagging.py +157 -0
- PYME/DSView/modules/particleTracking.py +463 -0
- PYME/DSView/modules/playback.py +256 -0
- PYME/DSView/modules/prebleachExtraction.py +75 -0
- PYME/DSView/modules/profileFitting.py +137 -0
- PYME/DSView/modules/profilePlotting.py +408 -0
- PYME/DSView/modules/projections.py +48 -0
- PYME/DSView/modules/psfExtraction.py +570 -0
- PYME/DSView/modules/psfGeneration.py +138 -0
- PYME/DSView/modules/psfTools.py +661 -0
- PYME/DSView/modules/pupilTools.py +204 -0
- PYME/DSView/modules/pupilView.py +139 -0
- PYME/DSView/modules/recipes.py +266 -0
- PYME/DSView/modules/redimension.py +75 -0
- PYME/DSView/modules/segmentation.py +192 -0
- PYME/DSView/modules/sheetView.py +24 -0
- PYME/DSView/modules/shell.py +39 -0
- PYME/DSView/modules/shiftfield_estimation.py +433 -0
- PYME/DSView/modules/sparkprepare.py +94 -0
- PYME/DSView/modules/splitter.py +148 -0
- PYME/DSView/modules/synchronise.py +64 -0
- PYME/DSView/modules/templates/astigCal.html +42 -0
- PYME/DSView/modules/templates/measureView.html +69 -0
- PYME/DSView/modules/templates/measureView2.html +48 -0
- PYME/DSView/modules/templates/measureView3.html +98 -0
- PYME/DSView/modules/templates/trackView.html +139 -0
- PYME/DSView/modules/templates/tracksOverview.html +21 -0
- PYME/DSView/modules/tiling.py +147 -0
- PYME/DSView/modules/unmixing.py +148 -0
- PYME/DSView/modules/vis3D.py +320 -0
- PYME/DSView/modules/visgui.py +163 -0
- PYME/DSView/modules/webview.py +14 -0
- PYME/DSView/overlays.py +295 -0
- PYME/DSView/scrolledImagePanel.py +188 -0
- PYME/DSView/setup.py +53 -0
- PYME/DSView/splashScreen.py +158 -0
- PYME/DSView/voxSizeDialog.py +84 -0
- PYME/Deconv/__init__.py +35 -0
- PYME/Deconv/beadGen.py +55 -0
- PYME/Deconv/dec.py +659 -0
- PYME/Deconv/decTask.py +65 -0
- PYME/Deconv/decThread.py +113 -0
- PYME/Deconv/dec_test.py +47 -0
- PYME/Deconv/deconvDialogs.py +417 -0
- PYME/Deconv/fftwWisdom.py +62 -0
- PYME/Deconv/richardsonLucy.py +141 -0
- PYME/Deconv/richardsonLucyMV.py +151 -0
- PYME/Deconv/richardsonLucyMVM.py +218 -0
- PYME/Deconv/test_block_dec.py +46 -0
- PYME/Deconv/tq_block_dec.py +331 -0
- PYME/Deconv/wiener.py +163 -0
- PYME/IO/DataSources/AlignDataSource.py +91 -0
- PYME/IO/DataSources/ArrayDataSource.py +260 -0
- PYME/IO/DataSources/BGSDataSource.py +353 -0
- PYME/IO/DataSources/BaseDataSource.py +457 -0
- PYME/IO/DataSources/BioformatsDataSource.py +178 -0
- PYME/IO/DataSources/BufferedDataSource.py +99 -0
- PYME/IO/DataSources/ClusterPZFDataSource.py +124 -0
- PYME/IO/DataSources/ConcatenatedDataSource.py +56 -0
- PYME/IO/DataSources/CropDataSource.py +243 -0
- PYME/IO/DataSources/DcimgDataSource.py +54 -0
- PYME/IO/DataSources/ElectronsPerSecondDataSource.py +61 -0
- PYME/IO/DataSources/FlatFieldDataSource.py +77 -0
- PYME/IO/DataSources/HDFDataSource.py +160 -0
- PYME/IO/DataSources/HTTPDataSource.py +80 -0
- PYME/IO/DataSources/ImageSeriesDataSource.py +123 -0
- PYME/IO/DataSources/MultiviewDataSource.py +99 -0
- PYME/IO/DataSources/OBFDataSource.py +67 -0
- PYME/IO/DataSources/RandomDataSource.py +23 -0
- PYME/IO/DataSources/SupertileDatasource.py +148 -0
- PYME/IO/DataSources/TQDataSource.py +41 -0
- PYME/IO/DataSources/TiffDataSource.py +193 -0
- PYME/IO/DataSources/TileDataSource.py +91 -0
- PYME/IO/DataSources/UnsplitDataSource.py +92 -0
- PYME/IO/DataSources/__init__.py +59 -0
- PYME/IO/FileUtils/IJLut.py +43 -0
- PYME/IO/FileUtils/RawToHdf5.py +105 -0
- PYME/IO/FileUtils/SPAD.py +54 -0
- PYME/IO/FileUtils/TiffSeqToHdf5.py +87 -0
- PYME/IO/FileUtils/__init__.py +24 -0
- PYME/IO/FileUtils/compHdf.py +39 -0
- PYME/IO/FileUtils/fileID.py +246 -0
- PYME/IO/FileUtils/fnlGen.py +40 -0
- PYME/IO/FileUtils/freeSpace.py +59 -0
- PYME/IO/FileUtils/h5-thumbnailer.py +85 -0
- PYME/IO/FileUtils/h5ExFrames.py +98 -0
- PYME/IO/FileUtils/h5ToTiffSeries.py +50 -0
- PYME/IO/FileUtils/h5r-thumbnailer.py +118 -0
- PYME/IO/FileUtils/h5rFormatDef.py +99 -0
- PYME/IO/FileUtils/h5rToTxt.py +77 -0
- PYME/IO/FileUtils/nameUtils.py +300 -0
- PYME/IO/FileUtils/obf_support.py +538 -0
- PYME/IO/FileUtils/ply.py +147 -0
- PYME/IO/FileUtils/readSpeckle.py +78 -0
- PYME/IO/FileUtils/readTiff.py +64 -0
- PYME/IO/FileUtils/saveTiffStack.py +137 -0
- PYME/IO/FileUtils/setup.py +36 -0
- PYME/IO/FileUtils/sf-thumbnailer.py +76 -0
- PYME/IO/FileUtils/stl.py +44 -0
- PYME/IO/FileUtils/thumbnailDatabase.py +104 -0
- PYME/IO/HTTPSpooler_v2.py +141 -0
- PYME/IO/MetaDataHandler.py +1072 -0
- PYME/IO/PZFFormat.py +375 -0
- PYME/IO/Spooler.py +279 -0
- PYME/IO/__init__.py +12 -0
- PYME/IO/acquisition_backends.py +353 -0
- PYME/IO/buffer_helpers.cp39-win_amd64.dll.a +0 -0
- PYME/IO/buffer_helpers.cp39-win_amd64.pyd +0 -0
- PYME/IO/buffer_helpers.pyx +190 -0
- PYME/IO/buffers.py +291 -0
- PYME/IO/clusterDuplication.py +204 -0
- PYME/IO/clusterExport.py +152 -0
- PYME/IO/clusterGlob.py +108 -0
- PYME/IO/clusterIO.py +1076 -0
- PYME/IO/clusterListing.py +232 -0
- PYME/IO/clusterResults.py +206 -0
- PYME/IO/clusterUpload.py +49 -0
- PYME/IO/cluster_directory.py +419 -0
- PYME/IO/cluster_streaming.py +216 -0
- PYME/IO/compatibility.py +12 -0
- PYME/IO/countdir/__init__.py +5 -0
- PYME/IO/countdir/setup.py +58 -0
- PYME/IO/csv_flavours.py +251 -0
- PYME/IO/dataExporter.py +470 -0
- PYME/IO/dataWrap.py +108 -0
- PYME/IO/dcimg.py +167 -0
- PYME/IO/events.py +161 -0
- PYME/IO/h5File.py +148 -0
- PYME/IO/h5rFile.py +323 -0
- PYME/IO/image.py +1447 -0
- PYME/IO/load_psf.py +26 -0
- PYME/IO/pyme_h5ls.py +58 -0
- PYME/IO/ragged.py +138 -0
- PYME/IO/rgb_image.py +94 -0
- PYME/IO/tabular.py +1338 -0
- PYME/IO/testClusterSpooling.py +199 -0
- PYME/IO/unifiedIO.py +301 -0
- PYME/LMVis/Extras/QPobjectSegment.py +220 -0
- PYME/LMVis/Extras/__init__.py +55 -0
- PYME/LMVis/Extras/animation.py +359 -0
- PYME/LMVis/Extras/annotation.py +78 -0
- PYME/LMVis/Extras/clusterAnalysis.py +460 -0
- PYME/LMVis/Extras/dockedPanel.py +69 -0
- PYME/LMVis/Extras/extra_layers.py +373 -0
- PYME/LMVis/Extras/fiducial.py +230 -0
- PYME/LMVis/Extras/flagZMotionArtifacts.py +60 -0
- PYME/LMVis/Extras/fusionUtils.py +9 -0
- PYME/LMVis/Extras/multiColourAnalysis.py +103 -0
- PYME/LMVis/Extras/multiviewMapping.py +489 -0
- PYME/LMVis/Extras/objectMeasurements.py +246 -0
- PYME/LMVis/Extras/particleTracking.py +272 -0
- PYME/LMVis/Extras/perFrameVariable.py +77 -0
- PYME/LMVis/Extras/photophysics.py +72 -0
- PYME/LMVis/Extras/pointSetGeneration.py +232 -0
- PYME/LMVis/Extras/pointwiseColoc.py +54 -0
- PYME/LMVis/Extras/saved_views.py +125 -0
- PYME/LMVis/Extras/scaleBox.py +115 -0
- PYME/LMVis/Extras/sequentialSpecies.py +125 -0
- PYME/LMVis/Extras/setBGImage.py +74 -0
- PYME/LMVis/Extras/shiftmapGenerator.py +138 -0
- PYME/LMVis/Extras/showShortcuts.py +69 -0
- PYME/LMVis/Extras/snapshot.py +135 -0
- PYME/LMVis/Extras/spherical_harmonics.py +98 -0
- PYME/LMVis/Extras/subsets.py +15 -0
- PYME/LMVis/Extras/surface_fitting.py +52 -0
- PYME/LMVis/Extras/temperaturePlot.py +53 -0
- PYME/LMVis/Extras/vibration.py +112 -0
- PYME/LMVis/VisGUI.py +506 -0
- PYME/LMVis/__init__.py +39 -0
- PYME/LMVis/colourFilterGUI.py +77 -0
- PYME/LMVis/colourPanel.py +491 -0
- PYME/LMVis/displayPane.py +462 -0
- PYME/LMVis/dyeRatios.py +116 -0
- PYME/LMVis/genImageDialog.py +298 -0
- PYME/LMVis/gl_offScreenHandler.py +134 -0
- PYME/LMVis/gl_render.py +1302 -0
- PYME/LMVis/gl_render3D.py +1453 -0
- PYME/LMVis/gl_render3D_shaders.py +1213 -0
- PYME/LMVis/glcanvas_core.py +1157 -0
- PYME/LMVis/imageView.py +752 -0
- PYME/LMVis/imageView2.py +372 -0
- PYME/LMVis/importTextDialog.py +342 -0
- PYME/LMVis/layer_panel.py +231 -0
- PYME/LMVis/layers/AxesOverlayLayer.py +126 -0
- PYME/LMVis/layers/LUTOverlayLayer.py +346 -0
- PYME/LMVis/layers/OverlayLayer.py +46 -0
- PYME/LMVis/layers/ScaleBarOverlayLayer.py +97 -0
- PYME/LMVis/layers/ScaleBoxOverlayLayer.py +181 -0
- PYME/LMVis/layers/SelectionOverlayLayer.py +124 -0
- PYME/LMVis/layers/__init__.py +53 -0
- PYME/LMVis/layers/base.py +319 -0
- PYME/LMVis/layers/image_layer.py +363 -0
- PYME/LMVis/layers/labels.py +186 -0
- PYME/LMVis/layers/layer_defaults.py +97 -0
- PYME/LMVis/layers/mesh.py +378 -0
- PYME/LMVis/layers/octree.py +194 -0
- PYME/LMVis/layers/pointcloud.py +372 -0
- PYME/LMVis/layers/quiver.py +271 -0
- PYME/LMVis/layers/text.py +250 -0
- PYME/LMVis/layers/tracks.py +309 -0
- PYME/LMVis/mv_math.py +78 -0
- PYME/LMVis/objectDarkMeasure.py +120 -0
- PYME/LMVis/pipeline.py +1227 -0
- PYME/LMVis/pipelineView.py +115 -0
- PYME/LMVis/pointSettingsPanel.py +135 -0
- PYME/LMVis/progGraph.py +59 -0
- PYME/LMVis/quadTreeSettings.py +90 -0
- PYME/LMVis/rendGauss.py +158 -0
- PYME/LMVis/renderers.py +576 -0
- PYME/LMVis/sessionpaths.py +136 -0
- PYME/LMVis/setup.py +39 -0
- PYME/LMVis/setup_exe.py +71 -0
- PYME/LMVis/shader_programs/DefaultShaderProgram.py +149 -0
- PYME/LMVis/shader_programs/GLProgram.py +119 -0
- PYME/LMVis/shader_programs/GouraudShaderProgram.py +157 -0
- PYME/LMVis/shader_programs/PointSpriteShaderProgram.py +163 -0
- PYME/LMVis/shader_programs/ShaderProgramFactory.py +54 -0
- PYME/LMVis/shader_programs/TesselShaderProgram.py +47 -0
- PYME/LMVis/shader_programs/WireFrameShaderProgram.py +50 -0
- PYME/LMVis/shader_programs/__init__.py +20 -0
- PYME/LMVis/shader_programs/oit_compositor.py +23 -0
- PYME/LMVis/shader_programs/shader_loader.py +84 -0
- PYME/LMVis/shader_programs/shader_program.py +168 -0
- PYME/LMVis/shader_programs/shaders/bigflatpoints_fs.glsl +16 -0
- PYME/LMVis/shader_programs/shaders/bigpoints_gs.glsl +40 -0
- PYME/LMVis/shader_programs/shaders/bigpointsprites_fs.glsl +20 -0
- PYME/LMVis/shader_programs/shaders/bigspheres_fs.glsl +53 -0
- PYME/LMVis/shader_programs/shaders/compose_fs.glsl +41 -0
- PYME/LMVis/shader_programs/shaders/compose_vs.glsl +25 -0
- PYME/LMVis/shader_programs/shaders/default_fs.glsl +27 -0
- PYME/LMVis/shader_programs/shaders/default_vs.glsl +88 -0
- PYME/LMVis/shader_programs/shaders/flatpoints_fs.glsl +27 -0
- PYME/LMVis/shader_programs/shaders/gouraud_flatpoints_fs.glsl +30 -0
- PYME/LMVis/shader_programs/shaders/gouraud_fs.glsl +26 -0
- PYME/LMVis/shader_programs/shaders/gouraud_oit_fs.glsl +68 -0
- PYME/LMVis/shader_programs/shaders/gouraud_vs.glsl +135 -0
- PYME/LMVis/shader_programs/shaders/image_fs.glsl +60 -0
- PYME/LMVis/shader_programs/shaders/image_vs.glsl +79 -0
- PYME/LMVis/shader_programs/shaders/phong_fs.glsl +43 -0
- PYME/LMVis/shader_programs/shaders/phong_vs.glsl +45 -0
- PYME/LMVis/shader_programs/shaders/pointsprites_fs.glsl +33 -0
- PYME/LMVis/shader_programs/shaders/pointsprites_vs.glsl +77 -0
- PYME/LMVis/shader_programs/shaders/spheres_fs.glsl +102 -0
- PYME/LMVis/shader_programs/shaders/tessel_fs.glsl +23 -0
- PYME/LMVis/shader_programs/shaders/tessel_vs.glsl +37 -0
- PYME/LMVis/shader_programs/shaders/text_fs.glsl +42 -0
- PYME/LMVis/shader_programs/shaders/text_vs.glsl +84 -0
- PYME/LMVis/shader_programs/shaders/widelines_fs.glsl +19 -0
- PYME/LMVis/shader_programs/shaders/widelines_gs.glsl +56 -0
- PYME/LMVis/shader_programs/shaders/widelines_vs.glsl +51 -0
- PYME/LMVis/statusLog.py +57 -0
- PYME/LMVis/triBlobs.py +142 -0
- PYME/LMVis/view_clipping_pane.py +429 -0
- PYME/LMVis/views.py +275 -0
- PYME/LMVis/visCore.py +1005 -0
- PYME/LMVis/visHelpers.py +880 -0
- PYME/LMVis/visHelpersMin.py +230 -0
- PYME/LMVis/workspaceTree.py +238 -0
- PYME/__init__.py +22 -0
- PYME/cluster/HTTPDataServer.py +1063 -0
- PYME/cluster/HTTPRulePusher.py +382 -0
- PYME/cluster/HTTPTaskPusher.py +377 -0
- PYME/cluster/PYMERuleNodeServer.py +192 -0
- PYME/cluster/PYMERuleServer.py +109 -0
- PYME/cluster/__init__.py +0 -0
- PYME/cluster/clusterUI/accounts/__init__.py +0 -0
- PYME/cluster/clusterUI/accounts/admin.py +85 -0
- PYME/cluster/clusterUI/accounts/forms.py +8 -0
- PYME/cluster/clusterUI/accounts/migrations/0001_initial.py +31 -0
- PYME/cluster/clusterUI/accounts/migrations/__init__.py +0 -0
- PYME/cluster/clusterUI/accounts/models.py +44 -0
- PYME/cluster/clusterUI/accounts/templates/accounts/user_form.html +13 -0
- PYME/cluster/clusterUI/accounts/templates/registration/initial_complete.html +6 -0
- PYME/cluster/clusterUI/accounts/templates/registration/initial_confirm.html +13 -0
- PYME/cluster/clusterUI/accounts/templates/registration/initial_done.html +7 -0
- PYME/cluster/clusterUI/accounts/templates/registration/verification.html +2 -0
- PYME/cluster/clusterUI/accounts/templates/registration/verification_subject.txt +1 -0
- PYME/cluster/clusterUI/accounts/urls.py +19 -0
- PYME/cluster/clusterUI/accounts/views.py +36 -0
- PYME/cluster/clusterUI/clusterUI/__init__.py +0 -0
- PYME/cluster/clusterUI/clusterUI/settings.py +147 -0
- PYME/cluster/clusterUI/clusterUI/urls.py +31 -0
- PYME/cluster/clusterUI/clusterUI/wsgi.py +16 -0
- PYME/cluster/clusterUI/clusterbrowser/__init__.py +0 -0
- PYME/cluster/clusterUI/clusterbrowser/admin.py +3 -0
- PYME/cluster/clusterUI/clusterbrowser/apps.py +7 -0
- PYME/cluster/clusterUI/clusterbrowser/migrations/__init__.py +0 -0
- PYME/cluster/clusterUI/clusterbrowser/models.py +5 -0
- PYME/cluster/clusterUI/clusterbrowser/templates/base.html +129 -0
- PYME/cluster/clusterUI/clusterbrowser/templates/clusterbrowser/dirlisting.html +231 -0
- PYME/cluster/clusterUI/clusterbrowser/templates/clusterbrowser/form_new_folder.html +18 -0
- PYME/cluster/clusterUI/clusterbrowser/templates/clusterbrowser/form_upload_file.html +17 -0
- PYME/cluster/clusterUI/clusterbrowser/templates/clusterbrowser/lightlisting.html +25 -0
- PYME/cluster/clusterUI/clusterbrowser/templates/registration/login.html +38 -0
- PYME/cluster/clusterUI/clusterbrowser/urls.py +10 -0
- PYME/cluster/clusterUI/clusterbrowser/views.py +148 -0
- PYME/cluster/clusterUI/clusterstatus/__init__.py +0 -0
- PYME/cluster/clusterUI/clusterstatus/admin.py +3 -0
- PYME/cluster/clusterUI/clusterstatus/apps.py +7 -0
- PYME/cluster/clusterUI/clusterstatus/migrations/__init__.py +0 -0
- PYME/cluster/clusterUI/clusterstatus/models.py +5 -0
- PYME/cluster/clusterUI/clusterstatus/templates/clusterstatus/load_content.html +29 -0
- PYME/cluster/clusterUI/clusterstatus/templates/clusterstatus/queue_info.html +28 -0
- PYME/cluster/clusterUI/clusterstatus/templates/clusterstatus/queue_info_content.html +50 -0
- PYME/cluster/clusterUI/clusterstatus/templates/clusterstatus/status_dash.html +29 -0
- PYME/cluster/clusterUI/clusterstatus/templates/clusterstatus/status_dash_content.html +90 -0
- PYME/cluster/clusterUI/clusterstatus/urls.py +9 -0
- PYME/cluster/clusterUI/clusterstatus/views.py +69 -0
- PYME/cluster/clusterUI/clusterui_tornado.py +117 -0
- PYME/cluster/clusterUI/deploy.py +62 -0
- PYME/cluster/clusterUI/localization/__init__.py +0 -0
- PYME/cluster/clusterUI/localization/admin.py +3 -0
- PYME/cluster/clusterUI/localization/apps.py +7 -0
- PYME/cluster/clusterUI/localization/migrations/__init__.py +0 -0
- PYME/cluster/clusterUI/localization/models.py +5 -0
- PYME/cluster/clusterUI/localization/templates/localization/settings_form.html +67 -0
- PYME/cluster/clusterUI/localization/urls.py +10 -0
- PYME/cluster/clusterUI/localization/views.py +170 -0
- PYME/cluster/clusterUI/manage.py +17 -0
- PYME/cluster/clusterUI/recipes/__init__.py +0 -0
- PYME/cluster/clusterUI/recipes/admin.py +3 -0
- PYME/cluster/clusterUI/recipes/migrations/__init__.py +0 -0
- PYME/cluster/clusterUI/recipes/models.py +3 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/extra_inputs.html +35 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/form_recipe.html +82 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/input_list.html +7 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/recipe_editor.html +28 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/recipe_editor_common.html +46 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/recipe_editrun.html +93 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/recipe_standalone.html +100 -0
- PYME/cluster/clusterUI/recipes/templates/recipes/recipe_template.html +109 -0
- PYME/cluster/clusterUI/recipes/urls.py +17 -0
- PYME/cluster/clusterUI/recipes/views.py +109 -0
- PYME/cluster/cluster_of_one.py +200 -0
- PYME/cluster/dataserver_wsgi.py +615 -0
- PYME/cluster/distribution.py +71 -0
- PYME/cluster/rulenodeserver.py +487 -0
- PYME/cluster/rules.py +979 -0
- PYME/cluster/ruleserver.py +1106 -0
- PYME/cluster/status.py +101 -0
- PYME/cluster/taskWorkerHTTP.py +522 -0
- PYME/cluster/webdav.py +1102 -0
- PYME/config.py +659 -0
- PYME/contrib/TextCtrlAutoComplete.py +582 -0
- PYME/contrib/__init__.py +7 -0
- PYME/contrib/aniso/__init__.py +2 -0
- PYME/contrib/aniso/aniso.py +268 -0
- PYME/contrib/auiFloatBook.py +94 -0
- PYME/contrib/congrid.py +127 -0
- PYME/contrib/dispatch/__init__.py +19 -0
- PYME/contrib/dispatch/dispatcher.py +289 -0
- PYME/contrib/gohlke/__init__.py +1 -0
- PYME/contrib/gohlke/_tifffile.cp39-win_amd64.dll.a +0 -0
- PYME/contrib/gohlke/_tifffile.cp39-win_amd64.pyd +0 -0
- PYME/contrib/gohlke/czifile.py +1289 -0
- PYME/contrib/gohlke/fcsfiles.py +514 -0
- PYME/contrib/gohlke/setup.py +54 -0
- PYME/contrib/gohlke/tifffile.py +3095 -0
- PYME/contrib/listctrlMixins.py +896 -0
- PYME/contrib/lzw.py +838 -0
- PYME/contrib/pad/__init__.py +13 -0
- PYME/contrib/pad/info_pad.py +18 -0
- PYME/contrib/pad/pad.py +670 -0
- PYME/contrib/setup.py +38 -0
- PYME/contrib/wxPlotPanel.py +137 -0
- PYME/experimental/SimReconstruction.py +49 -0
- PYME/experimental/__init__.pxd +0 -0
- PYME/experimental/__init__.py +4 -0
- PYME/experimental/_octree.cp39-win_amd64.dll.a +0 -0
- PYME/experimental/_octree.cp39-win_amd64.pyd +0 -0
- PYME/experimental/_octree.pyx +477 -0
- PYME/experimental/_treap.cp39-win_amd64.dll.a +0 -0
- PYME/experimental/_treap.cp39-win_amd64.pyd +0 -0
- PYME/experimental/_treap.pyx +267 -0
- PYME/experimental/_triangle_mesh.cp39-win_amd64.dll.a +0 -0
- PYME/experimental/_triangle_mesh.cp39-win_amd64.pyd +0 -0
- PYME/experimental/_triangle_mesh.pxd +149 -0
- PYME/experimental/_triangle_mesh.pyx +2787 -0
- PYME/experimental/aqavg.py +40 -0
- PYME/experimental/dcimgFileChucker.py +375 -0
- PYME/experimental/dcimgSpoolShim.py +174 -0
- PYME/experimental/dcimg_chuck_test.py +78 -0
- PYME/experimental/dual_marching_cubes.py +801 -0
- PYME/experimental/dual_marching_cubes_v2.py +645 -0
- PYME/experimental/expectationMaximisation.py +298 -0
- PYME/experimental/func_octree.cp39-win_amd64.dll.a +0 -0
- PYME/experimental/func_octree.cp39-win_amd64.pyd +0 -0
- PYME/experimental/func_octree.pyx +381 -0
- PYME/experimental/fusionRadial.py +520 -0
- PYME/experimental/fusionUtils.py +522 -0
- PYME/experimental/isosurface.py +147 -0
- PYME/experimental/labview_spooling_hacks.py +48 -0
- PYME/experimental/marching_cubes.py +811 -0
- PYME/experimental/marching_tetrahedra.py +343 -0
- PYME/experimental/modified_marching_cubes.py +1245 -0
- PYME/experimental/music.py +25 -0
- PYME/experimental/octree.py +188 -0
- PYME/experimental/pSpaceMap.py +34 -0
- PYME/experimental/pointFitConfoc.py +112 -0
- PYME/experimental/scanner_control.py +107 -0
- PYME/experimental/setup.py +109 -0
- PYME/experimental/spark.py +31 -0
- PYME/experimental/tcHist.py +71 -0
- PYME/experimental/treap.py +262 -0
- PYME/experimental/triangle_mesh.py +2287 -0
- PYME/experimental/triangle_mesh_utils.cp39-win_amd64.dll.a +0 -0
- PYME/experimental/triangle_mesh_utils.cp39-win_amd64.pyd +0 -0
- PYME/experimental/triangle_utils.py +87 -0
- PYME/experimental/triangular_mesh.py +2255 -0
- PYME/experimental/zMotionArtifactUtils.py +55 -0
- PYME/localization/FitFactories/AstigGaussFitFR.py +175 -0
- PYME/localization/FitFactories/AstigGaussGPUFitFR.py +326 -0
- PYME/localization/FitFactories/BeadConvolvedAstigGaussFit.py +206 -0
- PYME/localization/FitFactories/ChecksumFR.py +82 -0
- PYME/localization/FitFactories/ChecksumGPUFR.py +213 -0
- PYME/localization/FitFactories/ChecksumMultifitSR.py +86 -0
- PYME/localization/FitFactories/ConfocCOIR.py +93 -0
- PYME/localization/FitFactories/Dumbell3DFitR.py +193 -0
- PYME/localization/FitFactories/DumbellFitR.py +163 -0
- PYME/localization/FitFactories/FFBase.py +403 -0
- PYME/localization/FitFactories/Gauss3DFitR.py +213 -0
- PYME/localization/FitFactories/GaussFitConstrR.py +177 -0
- PYME/localization/FitFactories/GaussMultifitLinesR.py +351 -0
- PYME/localization/FitFactories/GaussMultifitR.py +326 -0
- PYME/localization/FitFactories/GaussMultifitSR.py +373 -0
- PYME/localization/FitFactories/InterpFitR.py +236 -0
- PYME/localization/FitFactories/InterpFitWFR.py +111 -0
- PYME/localization/FitFactories/Interpolators/CSInterpolator.py +148 -0
- PYME/localization/FitFactories/Interpolators/CubeSInterpolatorP.py +121 -0
- PYME/localization/FitFactories/Interpolators/CubicSplineInterpolator.py +69 -0
- PYME/localization/FitFactories/Interpolators/LinearInterpolator.py +135 -0
- PYME/localization/FitFactories/Interpolators/LinearPInterpolatorP.py +95 -0
- PYME/localization/FitFactories/Interpolators/__init__.py +33 -0
- PYME/localization/FitFactories/Interpolators/baseInterpolator.py +202 -0
- PYME/localization/FitFactories/LatFitCOIR.py +82 -0
- PYME/localization/FitFactories/LatGaussFitFR.py +220 -0
- PYME/localization/FitFactories/LatObjFindFR.py +85 -0
- PYME/localization/FitFactories/LatPSFFitR.py +142 -0
- PYME/localization/FitFactories/MultiviewFitInterpNR.py +400 -0
- PYME/localization/FitFactories/PRInterpFitQR.py +192 -0
- PYME/localization/FitFactories/PRInterpFitR.py +223 -0
- PYME/localization/FitFactories/ROIExtractNR.py +93 -0
- PYME/localization/FitFactories/SpecGaussFitFR.py +174 -0
- PYME/localization/FitFactories/SplitterFitCOIR.py +142 -0
- PYME/localization/FitFactories/SplitterFitFNR.py +312 -0
- PYME/localization/FitFactories/SplitterFitFusionR.py +318 -0
- PYME/localization/FitFactories/SplitterFitInterpBNR.py +357 -0
- PYME/localization/FitFactories/SplitterFitInterpNR.py +343 -0
- PYME/localization/FitFactories/SplitterFitScavNR.py +352 -0
- PYME/localization/FitFactories/SplitterMultifitSR.py +410 -0
- PYME/localization/FitFactories/SplitterObjFindR.py +194 -0
- PYME/localization/FitFactories/SplitterROIExtractNR.py +91 -0
- PYME/localization/FitFactories/SplitterShiftEstFR.py +230 -0
- PYME/localization/FitFactories/__init__.py +103 -0
- PYME/localization/FitFactories/fitCommon.py +195 -0
- PYME/localization/FitFactories/zEstimators/__init__.py +29 -0
- PYME/localization/FitFactories/zEstimators/astigEstimator.py +173 -0
- PYME/localization/FitFactories/zEstimators/biplaneEstimator.py +209 -0
- PYME/localization/FitFactories/zEstimators/genericDualEstimator.py +232 -0
- PYME/localization/FitFactories/zEstimators/genericEstimator.py +224 -0
- PYME/localization/FitFactories/zEstimators/priEstimator.py +255 -0
- PYME/localization/MetaDataEdit.py +543 -0
- PYME/localization/Test/30_9_series_A_1.sf +0 -0
- PYME/localization/Test/PRI.md +45 -0
- PYME/localization/Test/PRI_qr.md +52 -0
- PYME/localization/Test/PRI_r.md +52 -0
- PYME/localization/Test/__init__.py +22 -0
- PYME/localization/Test/astig.md +50 -0
- PYME/localization/Test/astigCOI.md +50 -0
- PYME/localization/Test/astig_gauss.md +52 -0
- PYME/localization/Test/astig_pe.md +50 -0
- PYME/localization/Test/astig_splitter.md +66 -0
- PYME/localization/Test/astig_splitterCOI.md +67 -0
- PYME/localization/Test/astig_splitterQ.md +66 -0
- PYME/localization/Test/astig_theory.md +50 -0
- PYME/localization/Test/astig_theory.psf +0 -0
- PYME/localization/Test/astig_theory.tif +0 -0
- PYME/localization/Test/beads1.psf +0 -0
- PYME/localization/Test/beads1.tif +0 -0
- PYME/localization/Test/biplane_splitter.md +75 -0
- PYME/localization/Test/biplane_splitter2.md +103 -0
- PYME/localization/Test/biplane_splitter3.md +115 -0
- PYME/localization/Test/defoc.md +48 -0
- PYME/localization/Test/dumbell_3d.md +52 -0
- PYME/localization/Test/fitTestJig.py +172 -0
- PYME/localization/Test/fitTestJigSCMOS.py +487 -0
- PYME/localization/Test/fitTestJigWC.py +225 -0
- PYME/localization/Test/gauss.md +50 -0
- PYME/localization/Test/gaussCOI.md +50 -0
- PYME/localization/Test/pri_pe.md +50 -0
- PYME/localization/Test/pri_theory.md +51 -0
- PYME/localization/Test/pri_theory.psf +0 -0
- PYME/localization/Test/pri_theory.tif +0 -0
- PYME/localization/Test/psf_astig.psf +0 -0
- PYME/localization/Test/psf_astig.tif +0 -0
- PYME/localization/Test/psf_astig_bg_d.psf +0 -0
- PYME/localization/Test/psf_astig_bg_d.tif +0 -0
- PYME/localization/Test/psf_astig_pe.psf +0 -0
- PYME/localization/Test/psf_astig_pe.tif +0 -0
- PYME/localization/Test/psf_decon.psf +0 -0
- PYME/localization/Test/psf_decon.tif +0 -0
- PYME/localization/Test/psf_decon_pe.psf +0 -0
- PYME/localization/Test/psf_decon_pe.tif +0 -0
- PYME/localization/Test/psf_guess.psf +0 -0
- PYME/localization/Test/splitter.md +63 -0
- PYME/localization/Test/splitter_scav.md +63 -0
- PYME/localization/Test/test.psf +0 -0
- PYME/localization/Test/test.tif +0 -0
- PYME/localization/Test/test_decon.psf +0 -0
- PYME/localization/Test/test_decon.tif +0 -0
- PYME/localization/Test/test_pe.psf +0 -0
- PYME/localization/Test/test_pe.tif +0 -0
- PYME/localization/Test/wf_theory.psf +0 -0
- PYME/localization/Test/wf_theory2.psf +0 -0
- PYME/localization/__init__.py +17 -0
- PYME/localization/autopsf/__init__.py +1 -0
- PYME/localization/autopsf/autopsf.py +486 -0
- PYME/localization/autopsf/roifit.py +310 -0
- PYME/localization/cInterp/__init__.py +24 -0
- PYME/localization/cInterp/cInterp.cp39-win_amd64.dll.a +0 -0
- PYME/localization/cInterp/cInterp.cp39-win_amd64.pyd +0 -0
- PYME/localization/cInterp/setup.py +54 -0
- PYME/localization/cModels/__init__.py +24 -0
- PYME/localization/cModels/gauss_app.cp39-win_amd64.dll.a +0 -0
- PYME/localization/cModels/gauss_app.cp39-win_amd64.pyd +0 -0
- PYME/localization/ofind.py +444 -0
- PYME/localization/ofind3d.py +306 -0
- PYME/localization/ofind_nofilt.py +128 -0
- PYME/localization/ofind_pri.py +478 -0
- PYME/localization/ofind_split.py +399 -0
- PYME/localization/ofind_xcorr.py +351 -0
- PYME/localization/ofind_xcorr_fw.py +441 -0
- PYME/localization/remFitBuf.py +657 -0
- PYME/localization/setup.py +56 -0
- PYME/localization/splitting.py +240 -0
- PYME/localization/twist.py +60 -0
- PYME/misc/TiSettings.py +36 -0
- PYME/misc/TiffImagePlugin.py +838 -0
- PYME/misc/VolProj.py +144 -0
- PYME/misc/__init__.py +25 -0
- PYME/misc/aligned_array.py +10 -0
- PYME/misc/aniso.py +29 -0
- PYME/misc/big_sur_fix.py +20 -0
- PYME/misc/check_for_updates.py +139 -0
- PYME/misc/colormaps.py +199 -0
- PYME/misc/colorsys.py +201 -0
- PYME/misc/computerName.py +33 -0
- PYME/misc/coverslipGeometries.py +60 -0
- PYME/misc/cython_numpy_monkey.py +40 -0
- PYME/misc/depGraph.py +406 -0
- PYME/misc/dirSize.py +31 -0
- PYME/misc/diskCleanup.py +64 -0
- PYME/misc/djangoRecarray.py +57 -0
- PYME/misc/django_widgets.py +27 -0
- PYME/misc/editgrid.py +101 -0
- PYME/misc/eventSpy.py +122 -0
- PYME/misc/exceptions.py +30 -0
- PYME/misc/facsPlot.py +89 -0
- PYME/misc/fbpIcons.py +90 -0
- PYME/misc/fftw_compat.py +28 -0
- PYME/misc/findCycles.py +91 -0
- PYME/misc/fortran_interrupt_defeat.py +43 -0
- PYME/misc/glassModel.py +64 -0
- PYME/misc/hash32.py +41 -0
- PYME/misc/hillcurve.py +88 -0
- PYME/misc/hybrid_ns.py +84 -0
- PYME/misc/kdFit.py +72 -0
- PYME/misc/locate.py +10 -0
- PYME/misc/memUsage.py +65 -0
- PYME/misc/memmap.py +52 -0
- PYME/misc/mock_ctypes.py +28 -0
- PYME/misc/mock_traits.py +59 -0
- PYME/misc/mock_traitsui.py +29 -0
- PYME/misc/pyme_zeroconf.py +287 -0
- PYME/misc/pyro_tracebacks.py +32 -0
- PYME/misc/read_agf.py +605 -0
- PYME/misc/sffake.py +16 -0
- PYME/misc/snells.py +71 -0
- PYME/misc/sqlite_ns.py +132 -0
- PYME/misc/sqlitendarray.py +56 -0
- PYME/misc/taskDef.py +44 -0
- PYME/misc/tempDB.py +56 -0
- PYME/misc/wxThread.py +33 -0
- PYME/misc/zemax.py +259 -0
- PYME/misc/zernike.py +151 -0
- PYME/pyme_warnings.py +70 -0
- PYME/recipes/Recipes/STEDDeconvolution.yaml +14 -0
- PYME/recipes/Recipes/STEDMinistacks.yaml +15 -0
- PYME/recipes/Recipes/STED_COP3.yaml +25 -0
- PYME/recipes/Recipes/blobMeas.yaml +19 -0
- PYME/recipes/Recipes/blobMeas2.yaml +37 -0
- PYME/recipes/Recipes/blobMeasSR.yaml +66 -0
- PYME/recipes/Recipes/coloc.yaml +43 -0
- PYME/recipes/Recipes/coloc_roi_masked.yaml +46 -0
- PYME/recipes/Recipes/multiblob.yaml +38 -0
- PYME/recipes/Recipes/pre_particleTracking.yaml +30 -0
- PYME/recipes/Recipes/segmentAndMeasureLoci.yaml +41 -0
- PYME/recipes/__init__.py +6 -0
- PYME/recipes/acquisition.py +158 -0
- PYME/recipes/bakeshop.py +32 -0
- PYME/recipes/base.py +1393 -0
- PYME/recipes/batchProcess.py +147 -0
- PYME/recipes/filters.py +394 -0
- PYME/recipes/fudges.py +41 -0
- PYME/recipes/graphing.py +108 -0
- PYME/recipes/html_recipe_editor.py +90 -0
- PYME/recipes/localisations.py +1386 -0
- PYME/recipes/machine_learning.py +286 -0
- PYME/recipes/measurement.py +1062 -0
- PYME/recipes/modules.py +50 -0
- PYME/recipes/multiview.py +435 -0
- PYME/recipes/output.py +667 -0
- PYME/recipes/pointcloud.py +510 -0
- PYME/recipes/processing.py +2954 -0
- PYME/recipes/pyramid.py +206 -0
- PYME/recipes/recipe.py +965 -0
- PYME/recipes/recipeGui.py +1029 -0
- PYME/recipes/recipeLayout.py +499 -0
- PYME/recipes/runRecipe.py +140 -0
- PYME/recipes/setup.py +37 -0
- PYME/recipes/simulation.py +91 -0
- PYME/recipes/skfilters.py +143 -0
- PYME/recipes/surface_fitting.py +776 -0
- PYME/recipes/tablefilters.py +275 -0
- PYME/recipes/tracking.py +343 -0
- PYME/recipes/traits.py +157 -0
- PYME/recipes/vertical_recipe_display.py +373 -0
- PYME/resources/__init__.py +23 -0
- PYME/resources/config_template/distributor.yaml +14 -0
- PYME/resources/config_template/nodeserver.yaml +15 -0
- PYME/resources/icons/LUT.png +0 -0
- PYME/resources/icons/YSM_Shield.png +0 -0
- PYME/resources/icons/YSM_logo.png +0 -0
- PYME/resources/icons/arrow.png +0 -0
- PYME/resources/icons/crosshairs.png +0 -0
- PYME/resources/icons/line_select.png +0 -0
- PYME/resources/icons/logo_fmhs.png +0 -0
- PYME/resources/icons/media-playback-pause.png +0 -0
- PYME/resources/icons/media-playback-start.png +0 -0
- PYME/resources/icons/media-skip-backward.png +0 -0
- PYME/resources/icons/media-skip-forward.png +0 -0
- PYME/resources/icons/mesh.png +0 -0
- PYME/resources/icons/mesh.svg +28 -0
- PYME/resources/icons/pmacquire.icns +0 -0
- PYME/resources/icons/pmacquire.ico +0 -0
- PYME/resources/icons/pmanal.icns +0 -0
- PYME/resources/icons/pmanal.ico +0 -0
- PYME/resources/icons/pmvis.icns +0 -0
- PYME/resources/icons/pmvis.ico +0 -0
- PYME/resources/icons/points.png +0 -0
- PYME/resources/icons/points.svg +16 -0
- PYME/resources/icons/pymeLogo.png +0 -0
- PYME/resources/icons/rect_select.png +0 -0
- PYME/resources/icons/squiggle_select.png +0 -0
- PYME/resources/icons/text3800.icns +0 -0
- PYME/resources/icons/text3800.ico +0 -0
- PYME/resources/icons/text3800.png +0 -0
- PYME/resources/icons/text3800.tif +0 -0
- PYME/resources/icons/text5377.icns +0 -0
- PYME/resources/icons/text5377.ico +0 -0
- PYME/resources/icons/text5377.png +0 -0
- PYME/resources/icons/tracks.png +0 -0
- PYME/resources/icons/tracks.svg +19 -0
- PYME/resources/icons/view-front.png +0 -0
- PYME/resources/icons/view-home.png +0 -0
- PYME/resources/icons/view-right.png +0 -0
- PYME/resources/icons/view-top.png +0 -0
- PYME/resources/test_datasets/README.md +8 -0
- PYME/resources/test_datasets/t_im.tif +0 -0
- PYME/resources/test_datasets/test_csv.csv +4282 -0
- PYME/resources/test_datasets/test_hdf.hdf +0 -0
- PYME/resources/web/rule_inline.html +21 -0
- PYME/resources/web/ruleserver.html +75 -0
- PYME/resources/web/static/bootstrap.min.js +7 -0
- PYME/resources/web/static/cluster.css +137 -0
- PYME/resources/web/static/css/bootstrap-theme.css +587 -0
- PYME/resources/web/static/css/bootstrap-theme.min.css +6 -0
- PYME/resources/web/static/css/bootstrap.css +6757 -0
- PYME/resources/web/static/css/bootstrap.min.css +6 -0
- PYME/resources/web/static/css/flat_design_colors_full.css +306 -0
- PYME/resources/web/static/css/recipe_editor.css +106 -0
- PYME/resources/web/static/dashboard.css +106 -0
- PYME/resources/web/static/fileselector.js +77 -0
- PYME/resources/web/static/fonts/glyphicons-halflings-regular.eot +0 -0
- PYME/resources/web/static/fonts/glyphicons-halflings-regular.svg +288 -0
- PYME/resources/web/static/fonts/glyphicons-halflings-regular.ttf +0 -0
- PYME/resources/web/static/fonts/glyphicons-halflings-regular.woff +0 -0
- PYME/resources/web/static/fonts/glyphicons-halflings-regular.woff2 +0 -0
- PYME/resources/web/static/images/osd_flat/LICENSE.txt +116 -0
- PYME/resources/web/static/images/osd_flat/README.md +9 -0
- PYME/resources/web/static/images/osd_flat/fullpage_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/fullpage_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/fullpage_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/fullpage_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/home_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/home_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/home_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/home_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/next_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/next_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/next_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/next_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/previous_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/previous_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/previous_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/previous_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateleft_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateleft_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateleft_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateleft_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateright_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateright_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateright_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/rotateright_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomin_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomin_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomin_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomin_rest.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomout_grouphover.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomout_hover.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomout_pressed.png +0 -0
- PYME/resources/web/static/images/osd_flat/zoomout_rest.png +0 -0
- PYME/resources/web/static/jigna-vue-bare.js +1395 -0
- PYME/resources/web/static/jquery.min.js +2 -0
- PYME/resources/web/static/jstree.min.js +6 -0
- PYME/resources/web/static/openSeadragonGL.js +102 -0
- PYME/resources/web/static/openseadragon-svg-overlay.js +103 -0
- PYME/resources/web/static/openseadragon-viewerinputhook.min.js +6 -0
- PYME/resources/web/static/openseadragon.min.js +9 -0
- PYME/resources/web/static/recipe_editor.js +119 -0
- PYME/resources/web/static/shaders/fragment/lut.glsl +20 -0
- PYME/resources/web/static/shaders/fragment/none.glsl +17 -0
- PYME/resources/web/static/shaders/fragment/outline.glsl +43 -0
- PYME/resources/web/static/shaders/fragment/rect.glsl +7 -0
- PYME/resources/web/static/shaders/fragment/sobel3.glsl +71 -0
- PYME/resources/web/static/shaders/fragment/white.glsl +4 -0
- PYME/resources/web/static/shaders/vertex/rect.glsl +22 -0
- PYME/resources/web/static/shaders/vertex/square.glsl +9 -0
- PYME/resources/web/static/utils.js +3 -0
- PYME/resources/web/static/viaWebGL.js +217 -0
- PYME/setup.py +109 -0
- PYME/setup_exe.py +57 -0
- PYME/simulation/__init__.py +0 -0
- PYME/simulation/locify.py +319 -0
- PYME/simulation/pointsets.py +279 -0
- PYME/simulation/wormlike.py +99 -0
- PYME/simulation/wormlike2.py +198 -0
- PYME/simulation/wormlike3.py +197 -0
- PYME/simulation/wormlike_curled.py +104 -0
- PYME/tileviewer/__init__.py +0 -0
- PYME/tileviewer/templates/roi_list.html +12 -0
- PYME/tileviewer/templates/tileviewer.html +247 -0
- PYME/tileviewer/tileviewer.py +207 -0
- PYME/ui/AUIFrame.py +279 -0
- PYME/ui/MetadataTree.py +469 -0
- PYME/ui/__init__.py +4 -0
- PYME/ui/about_dlg.py +29 -0
- PYME/ui/autoFoldPanel.py +643 -0
- PYME/ui/cascading_layout.py +45 -0
- PYME/ui/crop_dialog.py +145 -0
- PYME/ui/custom_traits_editors.py +508 -0
- PYME/ui/editFilterDialog.py +80 -0
- PYME/ui/editList.py +40 -0
- PYME/ui/fastGraph.py +240 -0
- PYME/ui/filterPane.py +348 -0
- PYME/ui/histLimits.py +543 -0
- PYME/ui/layerFoldPanel.py +232 -0
- PYME/ui/manualFoldPanel.py +870 -0
- PYME/ui/mytimer.py +116 -0
- PYME/ui/patch_traitsui.py +151 -0
- PYME/ui/progress.py +160 -0
- PYME/ui/recArrayView.py +145 -0
- PYME/ui/selection.py +71 -0
- PYME/ui/shell.py +37 -0
- PYME/ui/traitsui_constants.py +91 -0
- PYME/ui/wx_compat.py +43 -0
- PYME/update_version.py +159 -0
- PYME/util/__init__.py +3 -0
- PYME/util/authenticate.py +164 -0
- PYME/util/execfile.py +21 -0
- PYME/util/fProfile/__init__.py +1 -0
- PYME/util/fProfile/convertProfile.py +117 -0
- PYME/util/fProfile/fProfile.py +162 -0
- PYME/util/fProfile/html/404.html +60 -0
- PYME/util/fProfile/html/css/main.css +258 -0
- PYME/util/fProfile/html/css/normalize.css +427 -0
- PYME/util/fProfile/html/css/normalize.min.css +1 -0
- PYME/util/fProfile/html/index.html +64 -0
- PYME/util/fProfile/html/js/main.js +492 -0
- PYME/util/fProfile/html/js/plugins.js +24 -0
- PYME/util/fProfile/html/js/vendor/crossfilter.min.js +1 -0
- PYME/util/fProfile/html/js/vendor/jquery-1.11.2.min.js +4 -0
- PYME/util/fProfile/html/js/vendor/modernizr-2.8.3.min.js +4 -0
- PYME/util/fProfile/html/js/vendor/tinycolor-min.js +4 -0
- PYME/util/fProfile/viewProfile.py +30 -0
- PYME/util/install_dependencies.py +95 -0
- PYME/util/log_verbosity.py +11 -0
- PYME/util/mProfile/__init__.py +1 -0
- PYME/util/mProfile/colorize_db_t.py +297 -0
- PYME/util/mProfile/mProfile.py +164 -0
- PYME/util/mProfile/p.py +101 -0
- PYME/util/mProfile/tProfile.py +165 -0
- PYME/util/pymelauncher.py +47 -0
- PYME/util/shmarray/__init__.py +0 -0
- PYME/util/shmarray/shmTest.py +74 -0
- PYME/util/shmarray/shmarray.py +165 -0
- PYME/util/webframework.py +365 -0
- PYME/version.py +65 -0
- python_microscopy-25.6.5.dist-info/METADATA +68 -0
- python_microscopy-25.6.5.dist-info/RECORD +1277 -0
- python_microscopy-25.6.5.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,776 @@
|
|
|
1
|
+
|
|
2
|
+
from .base import register_module, ModuleBase
|
|
3
|
+
from .traits import Input, Output, Float, Int, Bool, CStr, ListFloat, Enum
|
|
4
|
+
import numpy as np
|
|
5
|
+
from PYME.IO import tabular
|
|
6
|
+
import logging
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
logger = logging.getLogger(__name__)
|
|
10
|
+
|
|
11
|
+
@register_module('FitSurfaceWithPatches')
|
|
12
|
+
class FitSurfaceWithPatches(ModuleBase):
|
|
13
|
+
"""
|
|
14
|
+
Fits patches of quadratic planes to point data.
|
|
15
|
+
|
|
16
|
+
Parameters
|
|
17
|
+
----------
|
|
18
|
+
|
|
19
|
+
input : Input
|
|
20
|
+
tabular data containing x, y, and z columns for the surface to be fit to.
|
|
21
|
+
fit_influence_radius : Float
|
|
22
|
+
The region around each localization to include in the surface fit [nm]. The fit is performed on all points
|
|
23
|
+
falling within this radius of each control point.
|
|
24
|
+
reconstruction_radius : Float
|
|
25
|
+
The size of the reconstructed surface patch. This should usually be <= fit_influence_radius.
|
|
26
|
+
constrain_surface_to_point : Bool
|
|
27
|
+
Whether the fit should be constrained to pass through the control point.
|
|
28
|
+
limit_reconstruction_to_support_hull: Bool
|
|
29
|
+
If enabled, this will clip each surface reconstruction to the convex-hull of all the points used for the fit.
|
|
30
|
+
Useful for avoiding the generation of large surface patches from isolated antibodies, but also reduces the
|
|
31
|
+
ability to paper-over holes.
|
|
32
|
+
alignment_threshold : Float
|
|
33
|
+
Lower alignment_threshold keeps more patches, higher rejects more. For each patch, normal vectors for adjacent
|
|
34
|
+
patches (within fit_influence_radius) are projected along the normal vector. If the median of these dot products
|
|
35
|
+
is less than the alignment_threshold, the patch is removed.
|
|
36
|
+
reconstruction_point_spacing : Float
|
|
37
|
+
Spacing of points used to reconstruct the surface.
|
|
38
|
+
|
|
39
|
+
Returns
|
|
40
|
+
-------
|
|
41
|
+
|
|
42
|
+
out_fits_raw : Output
|
|
43
|
+
tabular data containing fit results for quadratic surface patches following the form
|
|
44
|
+
$w(u,v) = A \times u^2 + B \times v^2$. See PYME.Analysis.points.surfit.fit_quad_surf.
|
|
45
|
+
out_fits_filtered : Output
|
|
46
|
+
Filtered version of out_fits_filtered. Use alignment_threshold to reject surface patches which differ greatly in
|
|
47
|
+
orientation from their neighbors.
|
|
48
|
+
out_surface_reconstruction : Output
|
|
49
|
+
Reconstruction of out_fits_filtered. Fitted points are augmented with additional points to interpolate the
|
|
50
|
+
surface. The density of this reconstruction can be altered using the reconstruction_point_spacing and
|
|
51
|
+
reconstruction_radius parameters. Each point contains normal information and is compatible with shaded-point
|
|
52
|
+
viewing.
|
|
53
|
+
|
|
54
|
+
"""
|
|
55
|
+
input = Input('localizations')
|
|
56
|
+
|
|
57
|
+
fit_influence_radius = Float(100, desc=('The region around each localization to include in the surface fit [nm]. '
|
|
58
|
+
'The fit is performed on all points falling within this radius of each '
|
|
59
|
+
'control point'))
|
|
60
|
+
reconstruction_radius = Float(50, desc=('The size of the reconstructed surface patch. This should usually '
|
|
61
|
+
'be <= fit_influence_radius'))
|
|
62
|
+
constrain_surface_to_point = Bool(True,
|
|
63
|
+
desc='Whether the fit should be constrained to pass through the control point')
|
|
64
|
+
limit_reconstruction_to_support_hull = Bool(False,
|
|
65
|
+
desc='If enabled, this will clip each surface reconstruction to the '
|
|
66
|
+
'convex-hull of all the points used for the fit. Useful for '
|
|
67
|
+
'avoiding the generation of large surface patches from isolated '
|
|
68
|
+
'antibodies, but also reduces the ability to paper-over holes')
|
|
69
|
+
alignment_threshold = Float(0.85, desc='Lower alignment_threshold keeps more patches, higher rejects more.'
|
|
70
|
+
'For each patch, normal vectors for adjacent patches (within '
|
|
71
|
+
'fit_influence_radius) are projected along the normal vector. If the median '
|
|
72
|
+
'of these dot products is less than the alignment_threshold, the patch is '
|
|
73
|
+
'removed.')
|
|
74
|
+
reconstruction_point_spacing = Float(10., desc='Spacing of points used to reconstruct the surface')
|
|
75
|
+
|
|
76
|
+
output_fits_raw = Output('raw_surface_fits')
|
|
77
|
+
output_fits_filtered = Output('filtered_surface_fits')
|
|
78
|
+
output_surface_reconstruction = Output('surface_reconstruction')
|
|
79
|
+
|
|
80
|
+
def execute(self, namespace):
|
|
81
|
+
from PYME.Analysis.points import surfit
|
|
82
|
+
data_source = namespace[self.input]
|
|
83
|
+
|
|
84
|
+
# arrange point data in the format we expect
|
|
85
|
+
points = np.vstack([data_source['x'].astype('f'), data_source['y'].astype('f'), data_source['z'].astype('f')])
|
|
86
|
+
|
|
87
|
+
# do the actual fitting - this fits one surface for every point in the dataset
|
|
88
|
+
results = surfit.fit_quad_surfaces_Pr(points.T, self.fit_influence_radius,
|
|
89
|
+
fitPos=(not self.constrain_surface_to_point))
|
|
90
|
+
|
|
91
|
+
# calculate a radius of curvature from our polynomials
|
|
92
|
+
raw_fits = tabular.MappingFilter(tabular.RecArraySource(results))
|
|
93
|
+
raw_fits.setMapping('r_curve', '1./(np.abs(A) + np.abs(B) + 1e-6)') # cap max at 1e6 instead of inf
|
|
94
|
+
raw_fits.mdh = data_source.mdh
|
|
95
|
+
namespace[self.output_fits_raw] = raw_fits
|
|
96
|
+
|
|
97
|
+
# filter surfaces and throw out patches with normals that don't point approx. the same way as their neighbors
|
|
98
|
+
results = surfit.filter_quad_results(results, points.T, self.fit_influence_radius, self.alignment_threshold)
|
|
99
|
+
|
|
100
|
+
# again, add radius of curvature calculation with lazy evaluation
|
|
101
|
+
filtered_fits = tabular.MappingFilter(tabular.RecArraySource(results.view(surfit.SURF_PATCH_DTYPE_FLAT)))
|
|
102
|
+
filtered_fits.setMapping('r_curve', '1./(np.abs(A) + np.abs(B) + 1e-6)')
|
|
103
|
+
filtered_fits.mdh = data_source.mdh
|
|
104
|
+
namespace[self.output_fits_filtered] = filtered_fits
|
|
105
|
+
|
|
106
|
+
# reconstruct the surface by generating an augmented point data set for each surface, adding virtual
|
|
107
|
+
# localizations spread evenly across each surface patch. Note this is done on the filtered fits.
|
|
108
|
+
if self.limit_reconstruction_to_support_hull:
|
|
109
|
+
xs, ys, zs, xn, yn, zn, N, j = surfit.reconstruct_quad_surfaces_Pr_region_cropped(results,
|
|
110
|
+
self.reconstruction_radius,
|
|
111
|
+
points.T,
|
|
112
|
+
fit_radius=self.fit_influence_radius,
|
|
113
|
+
step=self.reconstruction_point_spacing)
|
|
114
|
+
else:
|
|
115
|
+
xs, ys, zs, xn, yn, zn, N, j = surfit.reconstruct_quad_surfaces_Pr(results, self.reconstruction_radius,
|
|
116
|
+
step=self.reconstruction_point_spacing)
|
|
117
|
+
|
|
118
|
+
j = j.astype(int)
|
|
119
|
+
try:
|
|
120
|
+
# duck-type probe; note we assume surface was fit to single-color data
|
|
121
|
+
probe = np.ones_like(xs) * data_source['probe'][0]
|
|
122
|
+
except KeyError:
|
|
123
|
+
probe = np.zeros_like(xs)
|
|
124
|
+
# construct a new datasource with our augmented points
|
|
125
|
+
reconstruction = tabular.MappingFilter({'x': xs, 'y': ys, 'z': zs,
|
|
126
|
+
'xn': xn, 'yn': yn, 'zn': zn,
|
|
127
|
+
'probe': probe, 'n_points_fit': N, 'patch_id': j,
|
|
128
|
+
'r_curve': filtered_fits['r_curve'][j]})
|
|
129
|
+
reconstruction.mdh = data_source.mdh
|
|
130
|
+
namespace[self.output_surface_reconstruction] = reconstruction
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
@register_module('DualMarchingCubes')
|
|
134
|
+
class DualMarchingCubes(ModuleBase):
|
|
135
|
+
input = Input('octree')
|
|
136
|
+
output = Output('mesh')
|
|
137
|
+
|
|
138
|
+
threshold_density = Float(2e-5)
|
|
139
|
+
n_points_min = Int(50) # lets us truncate on SNR
|
|
140
|
+
|
|
141
|
+
smooth_curvature = Bool(True) # TODO: This is actually a mesh property, so it can be toggled outside of the recipe.
|
|
142
|
+
repair = Bool(False)
|
|
143
|
+
remesh = Bool(True)
|
|
144
|
+
cull_inner_surfaces = Bool(True)
|
|
145
|
+
|
|
146
|
+
auto_threshold = Bool(False)
|
|
147
|
+
auto_threshold_offset = Float(40) #find surface 40nm outside the points
|
|
148
|
+
|
|
149
|
+
def execute(self, namespace):
|
|
150
|
+
#from PYME.experimental import dual_marching_cubes_v2 as dual_marching_cubes
|
|
151
|
+
from PYME.experimental import dual_marching_cubes
|
|
152
|
+
# from PYME.experimental import triangle_mesh
|
|
153
|
+
from PYME.experimental import _triangle_mesh as triangle_mesh
|
|
154
|
+
from PYME.IO import MetaDataHandler
|
|
155
|
+
|
|
156
|
+
inp = namespace[self.input]
|
|
157
|
+
md = MetaDataHandler.DictMDHandler(getattr(inp, 'mdh', None)) # get metadata from the input dataset if present
|
|
158
|
+
|
|
159
|
+
if self.auto_threshold:
|
|
160
|
+
# don't invalidate and trigger re-run when auto-setting threshold
|
|
161
|
+
ip = self._invalidate_parent
|
|
162
|
+
self._invalidate_parent = False
|
|
163
|
+
try:
|
|
164
|
+
self.threshold_density = self._calc_optimal_threshold(inp)
|
|
165
|
+
finally:
|
|
166
|
+
self._invalidate_parent = ip
|
|
167
|
+
|
|
168
|
+
surf = self._generate_surface(self.threshold_density, inp, smooth_curvature=self.smooth_curvature)
|
|
169
|
+
|
|
170
|
+
self._params_to_metadata(md)
|
|
171
|
+
surf.mdh = md #inject metadata
|
|
172
|
+
|
|
173
|
+
namespace[self.output] = surf
|
|
174
|
+
|
|
175
|
+
def _generate_surface(self, threshold, inp, smooth_curvature=False):
|
|
176
|
+
from PYME.experimental import dual_marching_cubes
|
|
177
|
+
from PYME.experimental import _triangle_mesh as triangle_mesh
|
|
178
|
+
|
|
179
|
+
dmc = dual_marching_cubes.PiecewiseDualMarchingCubes(threshold)
|
|
180
|
+
dmc.set_octree(inp.truncate_at_n_points(int(self.n_points_min)))
|
|
181
|
+
tris = dmc.march(dual_march=False)
|
|
182
|
+
|
|
183
|
+
print('Generating TriangularMesh object')
|
|
184
|
+
surf = triangle_mesh.TriangleMesh.from_np_stl(tris, smooth_curvature=smooth_curvature)
|
|
185
|
+
|
|
186
|
+
print('Generated TriangularMesh object')
|
|
187
|
+
|
|
188
|
+
if self.repair:
|
|
189
|
+
surf.repair()
|
|
190
|
+
|
|
191
|
+
if self.remesh:
|
|
192
|
+
# target_length = np.mean(surf._halfedges[''][surf._halfedges['length'] != -1])
|
|
193
|
+
surf.remesh(5, l=0.5, n_relax=10)
|
|
194
|
+
|
|
195
|
+
if self.cull_inner_surfaces:
|
|
196
|
+
surf.remove_inner_surfaces()
|
|
197
|
+
|
|
198
|
+
return surf
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def _calc_optimal_threshold(self, inp):
|
|
203
|
+
from scipy.optimize import fmin, root_scalar, brentq, fsolve, bisect
|
|
204
|
+
from PYME.experimental import isosurface
|
|
205
|
+
pts = np.vstack([inp.points['x'], inp.points['y'], inp.points['z']]).T
|
|
206
|
+
|
|
207
|
+
def _surface_quality(log_threshold):
|
|
208
|
+
s = self._generate_surface(10.0**log_threshold, inp)
|
|
209
|
+
|
|
210
|
+
if len(s.faces) > 1:
|
|
211
|
+
d = isosurface.distance_to_mesh(pts, s, smooth=False)
|
|
212
|
+
|
|
213
|
+
#metric = (d < 0).sum()/len(d)
|
|
214
|
+
metric = np.median(d)
|
|
215
|
+
|
|
216
|
+
return (metric + self.auto_threshold_offset)
|
|
217
|
+
else:
|
|
218
|
+
#threshold was too high, try something return an arbitrary outside value
|
|
219
|
+
return 200 + log_threshold
|
|
220
|
+
|
|
221
|
+
#t = fmin(_surface_quality, self.threshold_density, maxiter=10)
|
|
222
|
+
#t = root_scalar(_surface_quality, x0=self.threshold_density, maxiter=10)
|
|
223
|
+
|
|
224
|
+
# st = np.log10(self.threshold_density)
|
|
225
|
+
|
|
226
|
+
# # decrease starting threshold until we get at least 5 faces
|
|
227
|
+
# i = 0
|
|
228
|
+
# s = self._generate_surface(10.0**st, inp)
|
|
229
|
+
# while (len(s.faces) < 5) and (i < 5):
|
|
230
|
+
# st -=1
|
|
231
|
+
# s = self._generate_surface(10.0**st, inp)
|
|
232
|
+
# i += 1
|
|
233
|
+
|
|
234
|
+
# lt, infodict, ier, msg = fsolve(_surface_quality, st, epsfcn=0.1, xtol=0.1, full_output=True)
|
|
235
|
+
# t = 10.0**lt
|
|
236
|
+
# print('error code:', ier, msg, 'fval:', infodict['fvec'])
|
|
237
|
+
# print('\nSurface auto-threshold: %f\n)' % t)
|
|
238
|
+
|
|
239
|
+
lt, rr = bisect(_surface_quality, -6, -3, xtol=0.1, full_output=True)
|
|
240
|
+
t = 10.0**lt
|
|
241
|
+
#print(rr)
|
|
242
|
+
print('\nSurface auto-threshold: %f\n)' % t)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
return t
|
|
246
|
+
#return brentq(_surface_quality, 1e-3, 1e-5, maxiter=10)
|
|
247
|
+
|
|
248
|
+
#return t[0]
|
|
249
|
+
#return t.root
|
|
250
|
+
|
|
251
|
+
@register_module('NthPointIsosurface')
|
|
252
|
+
class NthPointIsosurface(ModuleBase):
|
|
253
|
+
input = Input('points')
|
|
254
|
+
output = Output('mesh')
|
|
255
|
+
|
|
256
|
+
offset = Float(40.)
|
|
257
|
+
window = Int(50) # lets us truncate on SNR
|
|
258
|
+
|
|
259
|
+
smooth_curvature = Bool(True) # TODO: This is actually a mesh property, so it can be toggled outside of the recipe.
|
|
260
|
+
repair = Bool(False)
|
|
261
|
+
remesh = Bool(True)
|
|
262
|
+
cull_inner_surfaces = Bool(True)
|
|
263
|
+
|
|
264
|
+
def run(self, input):
|
|
265
|
+
from PYME.experimental import func_octree
|
|
266
|
+
from PYME.experimental import dual_marching_cubes
|
|
267
|
+
from PYME.experimental import _triangle_mesh as triangle_mesh
|
|
268
|
+
from scipy.spatial import cKDTree
|
|
269
|
+
|
|
270
|
+
points = np.vstack([input['x'], input['y'], input['z']]).T
|
|
271
|
+
tree = cKDTree(points)
|
|
272
|
+
|
|
273
|
+
offset = float(self.offset)
|
|
274
|
+
window = int(self.window)
|
|
275
|
+
|
|
276
|
+
def f(x, y, z):
|
|
277
|
+
pts = np.vstack([x, y, z]).T
|
|
278
|
+
dd, ii = tree.query(pts, k=window, workers=-1)
|
|
279
|
+
return -(dd.max(1) - offset)
|
|
280
|
+
|
|
281
|
+
x0, y0, z0 = points.min(0)
|
|
282
|
+
x1, y1, z1 = points.max(0)
|
|
283
|
+
|
|
284
|
+
o = func_octree.FOctree([x0, x1, y0, y1, z0, z1], f, maxdepth=6)
|
|
285
|
+
mc = dual_marching_cubes.PiecewiseDualMarchingCubes()
|
|
286
|
+
mc.set_octree(o)
|
|
287
|
+
tris = mc.march()
|
|
288
|
+
surf = triangle_mesh.TriangleMesh.from_np_stl(tris, smooth_curvature=True)
|
|
289
|
+
|
|
290
|
+
if self.repair:
|
|
291
|
+
surf.repair()
|
|
292
|
+
|
|
293
|
+
if self.remesh:
|
|
294
|
+
# target_length = np.mean(surf._halfedges[''][surf._halfedges['length'] != -1])
|
|
295
|
+
surf.remesh(5, l=0.5, n_relax=10)
|
|
296
|
+
|
|
297
|
+
if self.cull_inner_surfaces:
|
|
298
|
+
surf.remove_inner_surfaces()
|
|
299
|
+
|
|
300
|
+
return surf
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
@register_module('Isosurface')
|
|
304
|
+
class Isosurface(ModuleBase):
|
|
305
|
+
"""
|
|
306
|
+
Generate a surface mesh from a 3D image using the Marching Cubes algorithm.
|
|
307
|
+
|
|
308
|
+
"""
|
|
309
|
+
input = Input('input')
|
|
310
|
+
output = Output('mesh')
|
|
311
|
+
|
|
312
|
+
threshold = Float(0.5)
|
|
313
|
+
remesh = Bool(True)
|
|
314
|
+
|
|
315
|
+
def execute(self, namespace):
|
|
316
|
+
from PYME.experimental import isosurface
|
|
317
|
+
|
|
318
|
+
im = namespace[self.input]
|
|
319
|
+
T = isosurface.isosurface(im.data_xyztc[:,:,:,0,0].astype('f'), isolevel=self.threshold, voxel_size=im.voxelsize, origin=im.origin, remesh=self.remesh)
|
|
320
|
+
|
|
321
|
+
namespace[self.output] = T
|
|
322
|
+
|
|
323
|
+
@register_module('DelaunayMarchingTetrahedra')
|
|
324
|
+
class DelaunayMarchingTetrahedra(ModuleBase):
|
|
325
|
+
"""
|
|
326
|
+
Generate a surface mesh from a Delaunay tesselation of a set of points using the Marching Tetrahedra algorithm.
|
|
327
|
+
|
|
328
|
+
"""
|
|
329
|
+
input = Input('delaunay0')
|
|
330
|
+
output = Output('mesh')
|
|
331
|
+
|
|
332
|
+
threshold_density = Float(2e-5)
|
|
333
|
+
|
|
334
|
+
repair = Bool(False)
|
|
335
|
+
remesh = Bool(False)
|
|
336
|
+
|
|
337
|
+
def execute(self, namespace):
|
|
338
|
+
#from PYME.experimental import dual_marching_cubes_v2 as dual_marching_cubes
|
|
339
|
+
from PYME.experimental import marching_tetrahedra
|
|
340
|
+
from PYME.experimental import _triangle_mesh as triangle_mesh
|
|
341
|
+
import time
|
|
342
|
+
|
|
343
|
+
simplices = namespace[self.input].T.simplices
|
|
344
|
+
vertices = namespace[self.input].T.points[simplices]
|
|
345
|
+
values = namespace[self.input].dn[simplices]
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
mt = marching_tetrahedra.MarchingTetrahedra(vertices, values, self.threshold_density)
|
|
349
|
+
print('Marching...')
|
|
350
|
+
start = time.time()
|
|
351
|
+
tris = mt.march()
|
|
352
|
+
stop = time.time()
|
|
353
|
+
elapsed = stop-start
|
|
354
|
+
print('Generated mesh in {} s'.format(elapsed))
|
|
355
|
+
print('Generating TriangularMesh object')
|
|
356
|
+
surf = triangle_mesh.TriangleMesh.from_np_stl(tris)
|
|
357
|
+
print('Generated TriangularMesh object')
|
|
358
|
+
|
|
359
|
+
if self.repair:
|
|
360
|
+
surf.repair()
|
|
361
|
+
|
|
362
|
+
if self.remesh:
|
|
363
|
+
#target_length = np.mean(surf._halfedges['length'][surf._halfedges['length'] != -1])
|
|
364
|
+
surf.remesh(5, l=0.5, n_relax=10)
|
|
365
|
+
|
|
366
|
+
namespace[self.output] = surf
|
|
367
|
+
|
|
368
|
+
@register_module('DistanceToMesh')
|
|
369
|
+
class DistanceToMesh(ModuleBase):
|
|
370
|
+
input_mesh = Input('mesh')
|
|
371
|
+
input_points = Input('input')
|
|
372
|
+
output = Output('output')
|
|
373
|
+
|
|
374
|
+
def execute(self, namespace):
|
|
375
|
+
from PYME.IO import tabular
|
|
376
|
+
from PYME.experimental.isosurface import distance_to_mesh
|
|
377
|
+
|
|
378
|
+
inp = namespace[self.input_points]
|
|
379
|
+
surf = namespace[self.input_mesh]
|
|
380
|
+
|
|
381
|
+
points = np.vstack([inp['x'], inp['y'], inp['z']]).T
|
|
382
|
+
|
|
383
|
+
d = distance_to_mesh(points, surf)
|
|
384
|
+
|
|
385
|
+
out = tabular.MappingFilter(inp)
|
|
386
|
+
out.addColumn('distance_to_{}'.format(self.input_mesh), d)
|
|
387
|
+
|
|
388
|
+
try:
|
|
389
|
+
out.mdh = inp.mdh
|
|
390
|
+
except AttributeError:
|
|
391
|
+
pass
|
|
392
|
+
|
|
393
|
+
namespace[self.output] = out
|
|
394
|
+
|
|
395
|
+
@register_module('FilterMeshComponentsByVolume')
|
|
396
|
+
class FilterMeshComponentsByVolume(ModuleBase):
|
|
397
|
+
"""
|
|
398
|
+
USE WITH CAUTION - Will likely change/dissapear in future versions without deprecation.
|
|
399
|
+
|
|
400
|
+
Create a new mesh which only contains components within a given size range
|
|
401
|
+
|
|
402
|
+
Notes
|
|
403
|
+
-----
|
|
404
|
+
- this is extremely specific (arguably too specific for it's own recipe module), it would be good to incorporate the functionality
|
|
405
|
+
in a more generic mesh filtering/manipulation module in the future.
|
|
406
|
+
- this would be better positioned (along with some of the others here) in, e.g., a `mesh.py` or `meshes.py` top level set of recipes, rather than `surface_fitting`
|
|
407
|
+
|
|
408
|
+
"""
|
|
409
|
+
input_mesh = Input('mesh')
|
|
410
|
+
min_size = Float(100.0)
|
|
411
|
+
max_size = Float(1e9)
|
|
412
|
+
output = Output('filtered_mesh')
|
|
413
|
+
|
|
414
|
+
def execute(self, namespace):
|
|
415
|
+
from PYME.experimental import _triangle_mesh as triangle_mesh
|
|
416
|
+
|
|
417
|
+
mesh = triangle_mesh.TriangleMesh(mesh=namespace[self.input_mesh])
|
|
418
|
+
mesh.keep_components_by_volume(self.min_size, self.max_size)
|
|
419
|
+
|
|
420
|
+
namespace[self.output] = mesh
|
|
421
|
+
|
|
422
|
+
@register_module('SphericalHarmonicShell')
|
|
423
|
+
class SphericalHarmonicShell(ModuleBase):
|
|
424
|
+
"""
|
|
425
|
+
Fits a shell represented by a series of spherical harmonic co-ordinates to a 3D set of points. The points
|
|
426
|
+
should represent a hollow, fairly round structure (e.g. the surface of a cell nucleus). The object should NOT
|
|
427
|
+
be filled (i.e. points should only be on the surface).
|
|
428
|
+
|
|
429
|
+
Parameters
|
|
430
|
+
----------
|
|
431
|
+
input_name: PYME.IO.tabular.TabularBase
|
|
432
|
+
input localizations to fit a shell to
|
|
433
|
+
max_n_mode: Int
|
|
434
|
+
maximum order of spherical harmonics to use in fit
|
|
435
|
+
max_iterations: Int
|
|
436
|
+
number of fit iterations
|
|
437
|
+
init_tolerance: Float
|
|
438
|
+
relative outlier tolerance. Used to ignore outliers in subsequent iterations
|
|
439
|
+
d_angles: Float
|
|
440
|
+
Sets the step size in radians of zenith and azimuth arrays used in reconstructing the spherical harmonic shell.
|
|
441
|
+
Only relevant for distance_to_shell column of mapped output.
|
|
442
|
+
bound_tolerance: Float
|
|
443
|
+
Factor of fitting point spatial extent to allow in each dimension. The
|
|
444
|
+
default of 0 means this tolerance is not checked, otherwise if the
|
|
445
|
+
spatial extent of shell is a factor of `bound_tolerance` larger than
|
|
446
|
+
extent of the fitting points, the fit is failed.
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
Returns
|
|
450
|
+
-------
|
|
451
|
+
output_name: PYME.Analysis.points.spherical_harmonics.ScaledShell
|
|
452
|
+
The shell instance, with to_hdf method for use with PYME.recipes.outputs.HDFOutput
|
|
453
|
+
output_name_mapped: PYME.IO.tabular.TabularBase
|
|
454
|
+
localizations used to fit the shell, with two additional columns corresponding to whether than point is inside
|
|
455
|
+
the shell, and it's approximate distance to the shell (the latter being subject to the precision of a gridded
|
|
456
|
+
reconstruction subject to `d_angles` input).
|
|
457
|
+
name_inside_shell: CStr
|
|
458
|
+
name of column in `output_name_mapped` indicating whether each point is inside of the shell or not
|
|
459
|
+
name_distance_to_shell: CStr
|
|
460
|
+
name of column in `output_name_mapped` containing the approximate distance to the shell, in the same units as
|
|
461
|
+
the input localizations [nm]
|
|
462
|
+
|
|
463
|
+
"""
|
|
464
|
+
input_name = Input('input')
|
|
465
|
+
|
|
466
|
+
max_n_mode = Int(3)
|
|
467
|
+
max_iterations = Int(2)
|
|
468
|
+
init_tolerance = Float(0.3, desc='Fractional tolerance on radius used in first iteration')
|
|
469
|
+
|
|
470
|
+
name_inside_shell = CStr('inside_shell')
|
|
471
|
+
name_distance_to_shell = CStr('distance_to_shell')
|
|
472
|
+
d_angles = Float(0.1)
|
|
473
|
+
bound_tolerance = Float(0.0, desc='Factor of fitting point image bounds to allow.')
|
|
474
|
+
|
|
475
|
+
output_name = Output('harmonic_shell')
|
|
476
|
+
output_name_mapped = Output('shell_mapped')
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
def execute(self, namespace):
|
|
480
|
+
from PYME.Analysis.points import spherical_harmonics
|
|
481
|
+
|
|
482
|
+
points = tabular.MappingFilter(namespace[self.input_name])
|
|
483
|
+
|
|
484
|
+
shell = spherical_harmonics.ScaledShell()
|
|
485
|
+
x = points['x'].astype(np.float32, copy=False)
|
|
486
|
+
y = points['y'].astype(np.float32, copy=False)
|
|
487
|
+
z = points['z'].astype(np.float32, copy=False)
|
|
488
|
+
shell.set_fitting_points(x, y, z)
|
|
489
|
+
shell.fit_shell(max_iterations=self.max_iterations, tol_init=self.init_tolerance)
|
|
490
|
+
|
|
491
|
+
separations, closest_points = shell.distance_to_shell((x, y, z),
|
|
492
|
+
d_angles=self.d_angles)
|
|
493
|
+
if self.bound_tolerance != 0:
|
|
494
|
+
shell_bounds = shell.approximate_image_bounds()
|
|
495
|
+
max_extent = np.asarray(shell._fitting_point_bounds.extent) * self.bound_tolerance
|
|
496
|
+
if np.any(shell_bounds.extent > max_extent):
|
|
497
|
+
raise AssertionError('Shell bounds exceed fit-point bound tolerance')
|
|
498
|
+
|
|
499
|
+
points.addColumn(self.name_distance_to_shell, separations)
|
|
500
|
+
points.addColumn(self.name_inside_shell, shell.check_inside())
|
|
501
|
+
|
|
502
|
+
# add median distance to shell as a goodness of fit parameter
|
|
503
|
+
shell.table_representation.addColumn('median_residual', np.array([np.median(separations),]))
|
|
504
|
+
namespace[self.output_name] = shell
|
|
505
|
+
namespace[self.output_name_mapped] = points
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
@register_module('AddSphericalHarmonicShellMappedCoords')
|
|
509
|
+
class AddSphericalHarmonicShellMappedCoords(ModuleBase):
|
|
510
|
+
"""Add scaled spherical coordinates and harmonic shell radius to an input
|
|
511
|
+
tabular datasource, returning a copy
|
|
512
|
+
|
|
513
|
+
TODO: Rename and/or refactor
|
|
514
|
+
|
|
515
|
+
"""
|
|
516
|
+
input_localizations = Input('input')
|
|
517
|
+
input_shell = Input('harmonic_shell')
|
|
518
|
+
|
|
519
|
+
name_scaled_azimuth = CStr('scaled_azimuth')
|
|
520
|
+
name_scaled_zenith = CStr('scaled_zenith')
|
|
521
|
+
name_scaled_radius = CStr('scaled_radius')
|
|
522
|
+
name_normalized_radius = CStr('normalized_radius')
|
|
523
|
+
|
|
524
|
+
output_mapped = Output('harmonic_shell_mapped')
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
def execute(self, namespace):
|
|
528
|
+
from PYME.Analysis.points import spherical_harmonics
|
|
529
|
+
from PYME.IO import MetaDataHandler
|
|
530
|
+
|
|
531
|
+
inp = namespace[self.input_localizations]
|
|
532
|
+
points = tabular.MappingFilter(inp)
|
|
533
|
+
shell = namespace[self.input_shell]
|
|
534
|
+
if isinstance(shell, tabular.TabularBase):
|
|
535
|
+
shell = spherical_harmonics.ScaledShell.from_tabular(shell)
|
|
536
|
+
|
|
537
|
+
# map points to scaled spherical coordinates
|
|
538
|
+
azimuth, zenith, r = shell.shell_coordinates((points['x'].astype(np.float32, copy=False),
|
|
539
|
+
points['y'].astype(np.float32, copy=False),
|
|
540
|
+
points['z'].astype(np.float32, copy=False)))
|
|
541
|
+
|
|
542
|
+
# lookup shell radius at those angles
|
|
543
|
+
r_shell = spherical_harmonics.reconstruct_shell(shell.modes,
|
|
544
|
+
shell.coefficients,
|
|
545
|
+
azimuth, zenith)
|
|
546
|
+
|
|
547
|
+
points.addColumn(self.name_scaled_azimuth, azimuth)
|
|
548
|
+
points.addColumn(self.name_scaled_zenith, zenith)
|
|
549
|
+
points.addColumn(self.name_scaled_radius, r)
|
|
550
|
+
points.addColumn(self.name_normalized_radius, r / r_shell)
|
|
551
|
+
|
|
552
|
+
try:
|
|
553
|
+
points.mdh = MetaDataHandler.DictMDHandler(inp.mdh)
|
|
554
|
+
except AttributeError:
|
|
555
|
+
pass
|
|
556
|
+
namespace[self.output_mapped] = points
|
|
557
|
+
|
|
558
|
+
@register_module('SHShellRadiusDensityEstimate')
|
|
559
|
+
class SHShellRadiusDensityEstimate(ModuleBase):
|
|
560
|
+
"""
|
|
561
|
+
Estimate the normalized radius histogram for a uniform distribution within
|
|
562
|
+
the shell.
|
|
563
|
+
TODO: make more generic re: SDF / other surfaces
|
|
564
|
+
|
|
565
|
+
Also estimates the volume of the shell, the anisotropy of the shell, and
|
|
566
|
+
the standard deviation along its principle axes (if filled with a uniform
|
|
567
|
+
distribution)
|
|
568
|
+
|
|
569
|
+
TODO - rename/refactor. This has too much logic in the recipe module itself, it also feels very special case and the name might make it hard to discover.
|
|
570
|
+
"""
|
|
571
|
+
input_shell = Input('harmonic_shell')
|
|
572
|
+
|
|
573
|
+
r_bin_spacing = Float(0.05)
|
|
574
|
+
sampling_nm = ListFloat([75, 75, 75]) # TODO - convert this to a single float - we only use the first entry
|
|
575
|
+
jitter_iterations = Int(3)
|
|
576
|
+
batch_size = Int(100000)
|
|
577
|
+
sampling_method = Enum(['grid', 'uniform random'])
|
|
578
|
+
|
|
579
|
+
output = Output('r_uniform_kde')
|
|
580
|
+
shell_properties_output = Output('')
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
def execute(self, namespace):
|
|
584
|
+
from PYME.Analysis.points import spherical_harmonics
|
|
585
|
+
from PYME.IO import MetaDataHandler, tabular
|
|
586
|
+
|
|
587
|
+
shell = namespace[self.input_shell]
|
|
588
|
+
if isinstance(shell, tabular.TabularBase):
|
|
589
|
+
shell = spherical_harmonics.ScaledShell.from_tabular(shell)
|
|
590
|
+
|
|
591
|
+
if self.sampling_method == 'uniform random':
|
|
592
|
+
# uniform random sampling with Monte-Carlo rejection.
|
|
593
|
+
bin_edges, counts = shell.uniform_random_radial_density(n_radial_bins=int(1./self.r_bin_spacing), batch_size=self.batch_size, target_sampling_nm=self.sampling_nm[0])
|
|
594
|
+
bin_centers = 0.5 * (bin_edges[1:] + bin_edges[:-1])
|
|
595
|
+
|
|
596
|
+
# estimate the volume, convert from nm^3 to um^3
|
|
597
|
+
# note, volume estimate will have an error of around +- sqrt(N_counts)
|
|
598
|
+
volume = counts.sum() * (np.prod(self.sampling_nm) / (1e9))
|
|
599
|
+
|
|
600
|
+
res = tabular.DictSource({
|
|
601
|
+
'bin_centers': bin_centers,
|
|
602
|
+
'counts': counts
|
|
603
|
+
})
|
|
604
|
+
|
|
605
|
+
res.mdh = MetaDataHandler.DictMDHandler(getattr(shell, 'mdh', None))
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
# FIXME - this is really gross - we must not pass data / results in metadata
|
|
610
|
+
# Leaving here for now, for backwards compatibility, but needs to be fixed / removed somewhat urgently
|
|
611
|
+
# if we record sampling in the metadata, as we should, the volume calculation could easily be done in the consuming module)
|
|
612
|
+
res.mdh['SHShellRadiusDensityEstimate.Volume'] = float(volume)
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
# record module parameters - FIXME this should be under the 'Analysis' top-level metadata key.
|
|
616
|
+
res.mdh['SHShellRadiusDensityEstimate.sampling_nm'] = self.sampling_nm[0]
|
|
617
|
+
|
|
618
|
+
namespace[self.output] = res
|
|
619
|
+
|
|
620
|
+
if self.shell_properties_output != '':
|
|
621
|
+
props = tabular.tabular.MappingFilter(shell.table_representation)
|
|
622
|
+
props.addColumn('radial_dens_volume', np.array([float(volume)]))
|
|
623
|
+
namespace[self.shell_properties_output]
|
|
624
|
+
|
|
625
|
+
return
|
|
626
|
+
|
|
627
|
+
## old code (sampling on a regular grid) TODO - refactor out of this module
|
|
628
|
+
|
|
629
|
+
bin_edges = np.arange(0, 1.0 + self.r_bin_spacing, self.r_bin_spacing,
|
|
630
|
+
dtype=np.float32)
|
|
631
|
+
bin_centers = 0.5 * (bin_edges[1:] + bin_edges[:-1])
|
|
632
|
+
out_hist = np.zeros(len(bin_centers), dtype=np.float32)
|
|
633
|
+
|
|
634
|
+
# get shell bounds, make grid within
|
|
635
|
+
shell_bounds = shell.approximate_image_bounds()
|
|
636
|
+
xv = np.arange(shell_bounds.x0, shell_bounds.x1 + self.sampling_nm[0],
|
|
637
|
+
self.sampling_nm[0], dtype=np.float32)
|
|
638
|
+
yv = np.arange(shell_bounds.y0, shell_bounds.y1 + self.sampling_nm[1],
|
|
639
|
+
self.sampling_nm[1], dtype=np.float32)
|
|
640
|
+
zv = np.arange(shell_bounds.z0, shell_bounds.z1 + self.sampling_nm[2],
|
|
641
|
+
self.sampling_nm[2], dtype=np.float32)
|
|
642
|
+
# meshgrid with copy false to use a view (don't write x,y,z after)
|
|
643
|
+
x, y, z = np.meshgrid(xv, yv, zv, indexing='ij', copy=False)
|
|
644
|
+
|
|
645
|
+
v_estimates = []
|
|
646
|
+
sdev_estimates = []
|
|
647
|
+
|
|
648
|
+
for _ in range(self.jitter_iterations):
|
|
649
|
+
xr = np.random.rand(len(xv), len(yv), len(zv)).astype(np.float32, copy=False)
|
|
650
|
+
yr = np.random.rand(len(xv), len(yv), len(zv)).astype(np.float32, copy=False)
|
|
651
|
+
zr = np.random.rand(len(xv), len(yv), len(zv)).astype(np.float32, copy=False)
|
|
652
|
+
xr = (xr - 0.5) * self.sampling_nm[0] + x
|
|
653
|
+
yr = (yr - 0.5) * self.sampling_nm[1] + y
|
|
654
|
+
zr = (zr - 0.5) * self.sampling_nm[2] + z
|
|
655
|
+
azi, zen, r = shell.shell_coordinates((xr, yr, zr))
|
|
656
|
+
r_shell = spherical_harmonics.reconstruct_shell(shell.modes,
|
|
657
|
+
shell.coefficients,
|
|
658
|
+
azi, zen)
|
|
659
|
+
inside = r < r_shell
|
|
660
|
+
N = np.sum(inside)
|
|
661
|
+
# normalize r, and writeover to save memory
|
|
662
|
+
r = r[inside] / r_shell[inside]
|
|
663
|
+
# sum-normalize this iteration and add to output
|
|
664
|
+
out_hist += np.histogram(r, bins=bin_edges)[0] / N
|
|
665
|
+
|
|
666
|
+
# record volume estimate
|
|
667
|
+
v_estimates.append(N)
|
|
668
|
+
# estimate spread along principle axes of the shell
|
|
669
|
+
X = np.vstack([xr[inside], yr[inside], zr[inside]])
|
|
670
|
+
if N > self.batch_size:
|
|
671
|
+
# downsample to avoid memory error
|
|
672
|
+
X = X[:, np.random.choice(N, self.batch_size, replace=False)]
|
|
673
|
+
# TODO - do we need to be mean-centered?
|
|
674
|
+
X = X - X.mean(axis=1)[:, None]
|
|
675
|
+
_, s, _ = np.linalg.svd(X.T)
|
|
676
|
+
# svd cov is not normalized, handle that
|
|
677
|
+
sdev_estimates.append(s / np.sqrt(X.shape[1] - 1)) # with bessel's correction
|
|
678
|
+
|
|
679
|
+
# finish the average
|
|
680
|
+
out_hist = out_hist / self.jitter_iterations
|
|
681
|
+
# finish the volume calculation, convert from nm^3 to um^3
|
|
682
|
+
volume = np.mean(v_estimates) * (np.prod(self.sampling_nm) / (1e9))
|
|
683
|
+
# average the standard deviation estimates
|
|
684
|
+
standard_deviations = np.mean(np.stack(sdev_estimates), axis=0)
|
|
685
|
+
# similar to Basser, P. J., et al. doi.org/10.1006/jmrb.1996.0086
|
|
686
|
+
# note that singular values are square roots of the eigenvalues. Use
|
|
687
|
+
# the sample standard deviation rather than pop.
|
|
688
|
+
anisotropy = np.sqrt(np.var(standard_deviations**2, ddof=1)) / (np.sqrt(3) * np.mean(standard_deviations**2))
|
|
689
|
+
|
|
690
|
+
res = tabular.DictSource({
|
|
691
|
+
'bin_centers': bin_centers,
|
|
692
|
+
'counts': out_hist
|
|
693
|
+
})
|
|
694
|
+
try:
|
|
695
|
+
res.mdh = MetaDataHandler.DictMDHandler(shell.mdh)
|
|
696
|
+
except AttributeError:
|
|
697
|
+
pass
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
if self.shell_properties_output != '':
|
|
701
|
+
props = tabular.tabular.MappingFilter(shell.table_representation)
|
|
702
|
+
props.addColumn('radial_dens_volume', np.array([float(volume)]))
|
|
703
|
+
props.addColumn('radial_dens_std_dev', np.array([standard_deviations.astype('f4')]))
|
|
704
|
+
props.addColumn('radial_dens_anisotropy', np.array([float(anisotropy)]))
|
|
705
|
+
namespace[self.shell_properties_output]
|
|
706
|
+
|
|
707
|
+
namespace[self.output] = res
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
@register_module('ImageMaskFromSphericalHarmonicShell')
|
|
711
|
+
class ImageMaskFromSphericalHarmonicShell(ModuleBase):
|
|
712
|
+
"""
|
|
713
|
+
|
|
714
|
+
Parameters
|
|
715
|
+
----------
|
|
716
|
+
input_shell: spherical_harmonics.ScaledShell()
|
|
717
|
+
input localizations to fit a shell to
|
|
718
|
+
bounds_source: PYME.IO.tabular
|
|
719
|
+
optional input to estimate image bounds from, otherwise the points
|
|
720
|
+
used to fit the shell are used
|
|
721
|
+
voxelsize_nm: list
|
|
722
|
+
x, y, z pixel size in nm
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
Returns
|
|
726
|
+
------
|
|
727
|
+
output: PYME.IO.image.ImageStack
|
|
728
|
+
boolean mask True inside, False outside
|
|
729
|
+
"""
|
|
730
|
+
input_shell = Input('harmonic_shell')
|
|
731
|
+
input_image_bound_source = Input('input')
|
|
732
|
+
voxelsize_nm = ListFloat([75, 75, 75])
|
|
733
|
+
output = Output('output')
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
def execute(self, namespace):
|
|
737
|
+
from PYME.IO.image import ImageBounds, ImageStack
|
|
738
|
+
from PYME.IO.MetaDataHandler import DictMDHandler, origin_nm
|
|
739
|
+
|
|
740
|
+
shell = namespace[self.input_shell]
|
|
741
|
+
if isinstance(shell, tabular.TabularBase):
|
|
742
|
+
from PYME.Analysis.points import spherical_harmonics
|
|
743
|
+
shell = spherical_harmonics.ScaledShell.from_tabular(shell)
|
|
744
|
+
image_bound_source = namespace[self.input_image_bound_source]
|
|
745
|
+
# TODO - make bounds estimation more generic - e.g. to match an existing image.
|
|
746
|
+
b = ImageBounds.estimateFromSource(image_bound_source)
|
|
747
|
+
ox, oy, _ = origin_nm(image_bound_source.mdh)
|
|
748
|
+
|
|
749
|
+
nx = np.ceil((np.ceil(b.x1) - np.floor(b.x0)) / self.voxelsize_nm[0]) + 1
|
|
750
|
+
ny = np.ceil((np.ceil(b.y1) - np.floor(b.y0)) / self.voxelsize_nm[1]) + 1
|
|
751
|
+
nz = np.ceil((np.ceil(b.z1) - np.floor(b.z0)) / self.voxelsize_nm[2]) + 1
|
|
752
|
+
|
|
753
|
+
x = np.arange(np.floor(b.x0), b.x0 + nx * self.voxelsize_nm[0], self.voxelsize_nm[0])
|
|
754
|
+
y = np.arange(np.floor(b.y0), b.y0 + ny * self.voxelsize_nm[1], self.voxelsize_nm[1])
|
|
755
|
+
z = np.arange(np.floor(b.z0), b.z0 + nz * self.voxelsize_nm[2], self.voxelsize_nm[2])
|
|
756
|
+
logger.debug('mask size %s' % ((len(x), len(y), len(z)),))
|
|
757
|
+
|
|
758
|
+
xx, yy, zz = np.meshgrid(x, y, z, indexing='ij')
|
|
759
|
+
|
|
760
|
+
inside = shell.check_inside(xx.ravel(), yy.ravel(), zz.ravel())
|
|
761
|
+
inside = np.reshape(inside, xx.shape)
|
|
762
|
+
|
|
763
|
+
mdh = DictMDHandler({
|
|
764
|
+
'voxelsize.x': self.voxelsize_nm[0] / 1e3,
|
|
765
|
+
'voxelsize.y': self.voxelsize_nm[1] / 1e3,
|
|
766
|
+
'voxelsize.z': self.voxelsize_nm[2] / 1e3,
|
|
767
|
+
'ImageBounds.x0': x.min(), 'ImageBounds.x1': x.max(),
|
|
768
|
+
'ImageBounds.y0': y.min(), 'ImageBounds.y1': y.max(),
|
|
769
|
+
'ImageBounds.z0': z.min(), 'ImageBounds.z1': z.max(),
|
|
770
|
+
'Origin.x': ox + b.x0,
|
|
771
|
+
'Origin.y': oy + b.y0,
|
|
772
|
+
'Origin.z': b.z0
|
|
773
|
+
})
|
|
774
|
+
|
|
775
|
+
namespace[self.output] = ImageStack(data=inside, mdh=mdh,
|
|
776
|
+
haveGUI=False)
|