Home
get the manual as a PDF here
Contents
1. If the parameters especially the FWHM of the point spread function of the microscope are set incorrectly then 3B will not be able to model the image correctly which may lead to poorer resolution or artefacts The FWHM can be readily determined by taking a diffraction limited image of beads e Very high background levels See Live cell datasets 1 3 Using the ImageJ Plugin A tutorial for using the ImageJ plugin is provided under Plugins gt 3B gt Help The plugin can operate in two modes standard and advanced The standard mode allows the user to set the microscope PSF and spot size the starting number of spots for the analysis and the range of frames The plugin also offers an advanced mode of operation which allows much greater control over 3B See The configuration file and advanced settings for further details 1 4 Using the commandline program We have provided a set of test data on the website Download and unpack the zip file It will create a new directory called test data with the collowing contents test_data AVG_test_data bmp test_data markupl bmp img_000000000 fits img_000000001 fits img_000000002 fits img_000000299 fits Then run the following command multispot5_headless save_spots test_data results txt log_ratios test_data m arkupl bmp test_data img_000000 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 4 Using the commandline program 6 The program will save the result
2. for unsigned int j 0 j lt pixels size j sum ims i pixels j second sum2 sq ims i pixels j second double num 1 0 pixels size ims size double mean sum num double std sqrt sum2 num mean xmean num num 1 cout lt lt Automatic determination of fixed scaling lt lt endl lt lt mean lt lt mean lt lt endl lt lt std lt lt std lt lt endl lt lt sqrt mean lt lt sqrt mean 255 255 lt lt endl return make_pair mean std Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 19 storm_imagery h File Reference 288 11 19 storm_imagery h File Reference Code dealing with storm imagery low level include lt cvd image h gt include lt cvd byte h gt include lt utility gt include lt vector gt 11 19 1 Detailed Description Code dealing with storm imagery low level Definition in file storm_imagery h 11 20 three_B java File Reference Classes e class ThreeBGlobalConstants e class SPair Utility class to hold a pair of strings e class Util Utility calss to hold a number of handy static functions e class three_B ImageJ plugin class e class AdvancedDialog Control panel which basically presents the cfg file in a large edit box along with addi tional necessary things frame range and pixel size e class ThreeBDialog Dialog box for starting 3B The dialog highlights bad things in red e clas
3. units s setValue value return this 10 10 3 2 FloatSliderWithBox FloatSliderWithBox setFormat Strings inline Definition at line 762 of file three_B java References format setValue and value Referenced by EControlPanel EControlPanel format s setValue value return this Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 10 FloatSliderWithBox Class Reference 138 10 10 3 3 void FloatSliderWithBox addChangeListener ChangeListener changeListener inline Definition at line 769 of file three_B java References slider Referenced by EControlPanel EControlPanel slider addChangeListener changeListener return 10 10 3 4 void FloatSliderWithBox setValue double v inline package Definition at line 774 of file three_B java References format label max min number reciprocal slider steps units and value Referenced by FloatSliderWithBox TextChanged actionPerformed FloatSliderWith Box setFormat setUnits and FloatSliderWithBox SliderChanged stateChanged value v if reciprocal slider setValue int Math round steps 1 value min max min else slider setValue int Math round steps value min max min number setText String format format value label setText units 10 10 3 5 double FloatSliderWithBox getValue inline package Definition at line 786 of file three_B java References value Refer
4. 2 2 0 241 10 41 2 Constructor amp Destructor Documentation 241 10 41 3 Member Function Documentation 242 10 41 4 Member Data Documentation 247 10 42UserInterfaceCallback Class Reference 249 10 42 1 Detailed Description 2 2 0 249 10 42 2 Constructor amp Destructor Documentation 249 10 42 3 Member Function Documentation 250 10 43 UserlnterfaceCallback UserlssuedStop Struct Reference 251 10 43 1 Detailed Description 2 2 0 251 10 44Util Class Reference 2 2 2 0 0 2 0 0000 eee eee 251 10 44 1 Detailed Description 2 2 0 251 10 44 2 Member Function Documentation 252 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS viii 11 File Documentation 252 11 1 ClassicGlow java File Reference 00 04 252 11 2 conjugate_gradient_only h File Reference 253 11 3 debug cc File Reference 2 22 250 000 253 11 3 1 Detailed Description 2 o o cocca ee eruo riau 253 11 4 debug h File Reference 2 22 20 0202 eee 253 11 4 1 Detailed Description 254 11 5 documentation h File Reference 254 11 5 1 Detailed Description 2 2 0 254 11 6 forward_algorithm h File Reference 254 11 6 1 Detailed Description
5. Dialog background color getTextAreal removeTextListener this To prevent event thrashing whe n we write messages Process initial warnings textValueChanged null 10 37 3 Member Function Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 229 10 37 3 1 double ThreeBDialog parseDouble Strings inline Definition at line 460 of file three_B java Referenced by getFWHM and getPixelSize try return Double parseDouble s catch Exception e return 0 10 37 3 2 int ThreeBDialog parselnt Strings inline package Definition at line 471 of file three_B java Referenced by getFirstFrame getLastFrame and getSpots try return Integer parselInt s catch Exception e return 0 10 37 3 3 TextField ThreeBDialog getFWHMField inline package Definition at line 483 of file three_B java Referenced by getFWHM textValueChanged and ThreeBDialog return TextField getNumericFields get 0 10 37 3 4 TextField ThreeBDialog getPixelSizeField inline package Definition at line 487 of file three_B java Referenced by getPixelSize and textValueChanged Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 230 return TextField getNumericFields get 1 10 37 3 5 TextField ThreeBDialog getSpotsField inline pa
6. Implemented in NullGraphics 10 14 3 10 virtual void FitSpotsGraphics draw_krap const std vector lt TooN Vector lt 4 gt gt amp spots const CVD Image lt CVD byte gt amp im const BBox amp box int N TooN Vector lt 4 gt sS TooN Ones 1e99 pure virtual inherited Draw a bunch of stuff Parameters spots List of spots to draw im Background image box Bounding box of region N Spot to highlight s Extra spot to draw as a cross Implemented in NullGraphics 10 14 3 11 virtual void FitSpotsGraphics draw_pixels const std vector lt CVD lmageRef gt amp pix float r float g float b floata 1 pure virtual inherited Draw the pixel mask in an r g b a tuple colour Parameters pix mask red green fp g b blue a alpha Implemented in NullGraphics 10 14 3 12 virtual void FitSpotsGraphics glDrawCross const TooN Vector lt 2 gt amp p int size 3 pure virtual inherited Draw a cross Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 15 IndexLexicographicPosition lt Cmp First gt Struct Template Referencel 65 Parameters p Position of cross size Size to draw cross Implemented in NullGraphics 10 14 4 Member Data Documentation 10 14 4 1 std auto_ptr lt GLWindow gt GraphicsGL win private Definition at line 122 of file multispot5_gui
7. The documentation for this struct was generated from the following file e mt19937 h 10 26 SampledBackgroundData Struct Reference Closure holding image data generated using samples drawn from the model Inheritance diagram for SampledBackgroundData SampledBackgroundData SpotNegProbability DiffWithSampledBackground Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 26 SampledBackgroundData Struct Reference 195 Public Member Functions e SampledBackgroundData const vector lt vector lt vector lt double gt gt gt amp sample_ intensities_without_spot_ const vector lt vector lt double gt gt amp pixel_intensities_ const vector lt ImageRef gt pixels_ double mu_brightness_ double sigma_ brightness_ double mu_blur_ double sigma_blur_ const Matrix lt 3 gt A_ const Vector lt 3 gt pi_ double variance_ Public Attributes e const vector lt vector lt vector lt double gt gt gt amp sample_intensities_without_spot e const vector lt vector lt double gt gt amp pixel_intensities const vector lt ImageRef gt pixels e double mu_brightness e double sigma_brightness e double mu_blur e double sigma_blur e const Matrixx 3 gt A e const Vector lt 3 gt pi e double variance const vector lt int gt O 10 26 1 Detailed Description Closure holding image data generated using samples drawn from the model NB this is used with one spot removed i e set
8. catch java io FileNotFoundException ferr Toolkit getDefaultToolkit beep ij IJ showStatus Error opening file ferr getMessage return GenericDialog g new GenericDialog Pixel size g addNumericField Pixel size 100 0 5 nm g showDialog ps g getNextNumber Yay cargoculting InputStreamReader d new InputStreamReader in BufferedReader r new BufferedReader d String line final ArrayList lt Spot gt spots new ArrayList lt Spot gt int iterations 0 Rectangle roi null final double pixel_size_in_nm_ ps while line r readLine null String tokens line split p Space if tokens 0 equals PIXELS if tokens length 1 2 0 throw new IOException corrupt file bad pixels line for int i l i lt tokens length it 2 int x y try x Integer parseInt tokens i 0 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 40 ThreeBLoader Class Reference 239 y Integer parselInt tokens i 1 catch NumberFormatException nerr throw new IOException corrupt file bad pixel coordi nate if roi null roi new Rectangle x y 1 1 else roi add x y if tokens 0 matches PASS 0 9 iterationst if tokens length 1 4 0 throw new IOException corrupt file pad pass line for int i l i lt tokens length it 4 Spot s new Spot
9. SampledMultispot GibbsSampler sample_ intensities SampledMultispot GibbsSampler set_variance spots_to_vector and Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 186 sq double base_sigma sqrt variance should be 1 double scale_pow 100 0 const unsigned int nspots spots size 4 const unsigned int nframes pixel_intensities size const unsigned int npixels pixels size assert spots size 4 0 Compute the intensities and derivatives for all spot vector lt vector lt double gt gt spot_intensity spot pixel for unsigned int i 0 i lt nspots i spot_intensity push_back compute_spot_intensity pixels spots slice lt D ynamic 4 gt ix4 4 GibbsSampler sampler pixel_intensities spot_intensity spots_to_vector s pots A pi variance sample_iterations double sum 0 Kahan ksum for int sample 0 sample lt samples samplet Compute the positions of the surrounding steps double varl variance_from_sample sample 2 samples base_sigma sca le_pow double var2 variance_from_sample sample 1 samples base_sigma sca le_pow double var3 variance_from_sample samplet l samples base_sigma sca le_pow double var4 variance_from_sample sample 2 samples base_sigma sca le_pow Take a sample sampler set_variance var2 sampler next DataForMCMC get_rng Compute the
10. amp current_sample_intensities const vector lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask Definition at line 115 of file sampled_multispot h References intensity and spot_intensities const int steps spot_intensities size const int frames current_sample_intensities size for int frame 0 frame lt frames frame int s frame steps frames if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 9 1 SampledMultispot Namespace Reference 74 nsities s mask p 9 1 1 9 vector lt double gt SampledMultispot compute_spot_intensity const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params inline Definition at line 133 of file sampled_multispot h Referenced by NegativeFreeEnergy compute_with_mask FreeEnergyHessian hessian NegativeFreeEnergy operator FitSpots optimize_each_spot_in_turn_for_several_ passes sampled_background_spot_hessian_ffbs and FitSpots try_modifying_model vector lt double gt intensities pixels size for unsigned int i 0 i lt pixels size i intensities i spot_shape vec pixels i params return intensities 9 1 1 10 vector lt pair lt
11. class ThreeBHelp 3B plugin cclass to bring up a basic help window class ThreeBLoader Plugin class to load up an old 3B run Functions 8 4 1 string get_string JNIEnv env jstring js Image lt jbyte gt get_local_copy_of_image JNIEnv xenv joyteArray data int rows int cols Image lt float gt get_local_copy_of_image JNIEnv env jfloatArray data int rows int cols JNIEXPORT void JNICALL Java_ThreeBRunner_call JNIEnv xenv jobject jthis jstring cfg jobjectArray images jbyteArray mask_data jint n_images jint rows jint cols jstring file static SPair Util getFileName String t Function Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 4 Classes related to the ImageJ Plugin 44 8 4 1 1 string get_string JNIEnv env jstring js Get a local C copy of a java string Definition at line 122 of file multispot5_jni cc Referenced by Java_ThreeBRunner_call const char str Covert the config into a string str env gt GetStringUTFChars js NULL string stdstring str env gt ReleaseStringUTFChars js str return stdstring 8 4 1 2 Image lt jbyte gt get_local_copy_of_image JNIEnv env jbyteArray data int rows int cols Get a local C copy of an image from a jbyteArray coming from the guts of ImageJ Definition at line 138 of file multispot5_jni cc Referenced by Java_ThreeBRunner_call This takes a copy of the pixels per
12. slider new JSlider 0 steps label new JLabel number new JTextField cols Assemble into a panel completePanelConstraints_ new GridBagConstraints completePanelConstraints_ fill GridBagConstraints HORIZONTAL completePanelConstraints_ gridx 0 completePanelConstraints_ gridy 0 completePanelConstraints_ weightx 1 this add slider completePanelConstraints_ Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 10 FloatSliderWithBox Class Reference 137 completePanelConstraints_ gridx 2 completePanelConstraints_ gridy 0 completePanelConstraints_ weightx 0 this add label completePanelConstraints_ completePanelConstraints_ gridx 1 completePanelConstraints_ gridy 0 completePanelConstraints_ weightx 0 Add some space to the left to move away from slider slightly And some more to the bottom to help with the way they are displayed completePanelConstraints_ insets new Insets 0 5 10 0 this add number completePanelConstraints_ this setBorder BorderFactory createTitledBorder text slider addChangeListener new SliderChanged this number addActionListener new TextChanged this setValue value 10 10 3 Member Function Documentation 10 10 3 1 FloatSliderWithBox FloatSliderWithBox setUnits Strings inline Definition at line 755 of file three_B java References setValue units and value Referenced by EControlPanel EControlPanel
13. template lt class Deriv gt bool iterate const Deriv amp deriv Public Attributes const int size TooN Vector lt Size gt g TooN Vector lt Size gt new_g TooN Vector lt Size gt h TooN Vector lt Size gt minus_h TooN Vector lt Size gt old_g TooN Vector lt Size gt old_h TooN Vector lt Size gt x TooN Vector lt Size gt old_x Precision tolerance int max_iterations TooN Vector lt Size gt delta_max Precision linesearch_tolerance Precision linesearch_epsilon int iterations Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 83 10 4 1 Detailed Description template lt int Size 1 class Precision double gt struct ConjugateGradientOnly lt Size Precision S Class for performing optimization with Conjugate Gradient where only the derivatives are available Definition at line 9 of file conjugate_gradient_only h 10 4 2 Constructor amp Destructor Documentation 10 4 2 141 template lt int Size 1 class Precision double gt template lt class Deriv gt ConjugateGradientOnly lt Size Precision gt ConjugateGradientOnly const TooN Vector lt Size gt amp start const Deriv amp deriv const TooN Vector lt Size gt amp d inline Initialize the ConjugateGradient class with sensible values Parameters start Starting point x deriv Function to compute V f x d Maximum
14. vector lt vector lt double gt gt tmp_spot_intensities index size vector lt vector lt int gt gt tmp_spot_pixels index size for unsigned int i 0 i lt index size i tmp_spot i spots index i swap tmp_spot_intensities i spot_intensities index i swap tmp_spot_pixels i spot_pixels i swap tmp_spot spots swap tmp_spot_intensities spot_intensities swap tmp_spot_pixels spot_pixels Sweep through and optimize each spot in turn for int s 0 s lt int spots size s ui per_spot iteration pass s spots size ui perhaps_stop TIME timer reset Get some samples with Gibbs sampling vector lt vector lt vector lt State gt gt gt sample_list N spot frame list of samples drawn using Gibbs sampling rame vector lt vector lt vector lt double gt gt gt sample_intensities sample f pixel GibbsSampler2 sampler pixel_intensities spot_intensities spots spot_pixels A pi variance sample_iterations for int i 0 i lt main_samples i sampler next rng sample_list push_back sampler sample sample_intensities push_back sampler sample_intensities ui perhaps_stop First remove the spot from all the samples for unsigned int i 0 i lt sample_list size i Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 117 remove_spot sample_intensities i spot_intensities
15. 10 8 4 32 ofstream amp FitSpots save_spots private Output stream for log file Definition at line 1408 of file multispot5 cc 10 8 4 33 double FitSpots time_gibbs private Benchmarking data Definition at line 1411 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 131 10 8 4 34 double FitSpots time_cg private Benchmarking data Definition at line 1412 of file multispot5 cc 10 8 4 35 const bool FitSpots scale_brightness_ limit private Motion limit for ConjugateGradientOnly The x distance y distance and spot size are all approximately the same scale which is of order 1 The brigntness is not By default the brightness limit is also 1 This flag controls whether is should be set to the standard deviation of the brightness prior distribution This setting will put the motion limit on the same scale as the other three parameters Definition at line 1420 of file multispot5 cc 10 8 4 36 const Vector lt 4 gt FitSpots limit private Limit vector for ConjugateGradientOnly Definition at line 1421 of file multispot5 cc 10 8 4 37 const Matrix lt 3 gt FitSpots A private Transition matrix Definition at line 1423 of file multispot5 cc 10 8 4 38 const Vector lt 3 gt FitSpots pi private Initial probabilities Definition at line 1424 of file multispot5 cc 10 8 4 39 vector lt vector lt double gt gt FitSpots pixel_in
16. 8 3 1 Detailed Description lt csaa ee eb be ee ee a Hes 8 3 2 Function Documentation 2 we eee ee ee to 8 4 Classes related to the ImageJ Plugin 8 4 1 Function Documentation 2 222202 Gio SOMMMIAESOS oc ae ee ba eee ee ee Re Re 6 5 1 Funetion Documentation 2 6 sc eos 40 ready ee et 8 6 Storm imagery classes basic image processing 8 6 1 Function Documentation 2 020 8 7 Storm classes specific to multispot processing Namespace Documentation 9 1 SampledMultispot Namespace Reference 9 1 1 Function Documentation 04 Class Documentation 10 1 AdvancedDialog Class Reference 10 1 1 Detailed Description o a oaaao 10 1 2 Constructor amp Destructor Documentation 10 1 3 Member Function Documentation 10 1 4 Member Data Documentation 10 2 ClassicGlow Class Reference 00000 00 10 2 1 Detailed Description 2 2 0 10 2 2 Member Data Documentation 10 3 CloseButtonListener Class Reference 10 3 1 Detailed Description oo o cocca conata rearea 10 3 2 Constructor amp Destructor Documentation 10 3 3 Member Function Documentation 10 3 4 Member Data Documentation 10 4 ConjugateGradientOnly lt Size Precision gt St
17. Definition at line 55 of file multispot5 cc 10 24 2 3 void NullUICallback per_pass int iteration int pass const std vector lt TooN Vector lt 4 gt gt amp spots inline private virtual This function is called once each time PASS data is outputted It will allow the GUI to build up a reconstruction Parameters iteration Iteration number pass Pass number spots Data to be reconstructed Implements UserlnterfaceCallback Definition at line 56 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 25 MT19937 ParseError Struct Reference 194 10 24 2 4 void NullUICallback perhaps_stop inline private virtual The user wishes to issue a stop instruction to the program perhaps done via an asyn chronus call to an instance of of UserlnterfaceCallback This function is called as often as possible and will throw UserlssuedStop when the condition is met Implements UserlnterfaceCallback Definition at line 57 of file multispot5 cc The documentation for this class was generated from the following file e multispot5 cc 10 25 MT19937 ParseError Struct Reference Null struct thrown if attempting to load state from stream yields a parse error include lt mt19937 h gt 10 25 1 Detailed Description Null struct thrown if attempting to load state from stream yields a parse error Definition at line 17 of file mt19937 h
18. Load all images from disk and do the initial preprocessing Parameters names List of filenames to load Returns preprocessed images Definition at line 23 of file storm_imagery cc vector lt Image lt float gt gt ims Load images for unsigned int i 0 i lt names size i Image lt float gt im img_load names i ims push_back im if ims back size ims 0 size cerr lt lt Error with image lt lt names i lt lt all images must be the same size n exit 1 double mean variance tie mean variance mean_and_variance ims for unsigned int i 0 i lt ims size i transform ims i begin ims i end ims i begin bind2nd minus lt double gt mean for unsigned int i 0 i lt ims size i transform ims i begin ims i end ims i begin bindlst multi plies lt double gt 1 sqrt variance tie mean variance mean_and_variance ims Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 6 Storm imagery classes basic image processing 66 cerr lt lt Rescaled n cerr lt lt mean lt lt mean lt lt endl cerr lt lt Std lt lt sqrt variance lt lt endl Normalize Fit the background model ImageRef size ims 0 size Vector lt 10 gt p Zeros pl6 3 p 9 4 Image lt Vector lt 6 gt gt monomials size Image lt double gt polynomial
19. double gt template lt class Deriv gt void ConjugateGradientOnly lt Size Precision gt find_next_point const Deriv amp deriv inline Perform a linesearch from the current point x along the current conjugate vector h The linesearch does not make use of values You probably do not want to call this function directly See iterate instead This function updates ex old_c e iterations Note that the conjugate direction and gradient are not updated If bracket_minimum_forward detects a local maximum then essentially a zero sized step is taken Parameters deriv Functor returning the derivative value at a given point Definition at line 87 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt delta_max ConjugateGradientOnly lt Size Precision gt g ConjugateGradientOnly lt Size Precision gt h ConjugateGradientOnly lt Size Precision gt iterations ConjugateGradientOnly lt Size Precision gt linesearch_ epsilon ConjugateGradientOnly lt Size Precision gt linesearch_tolerance ConjugateGradientOnly lt Size Precision gt minus_h ConjugateGradientOnly lt Size Precision gt new_g and ConjugateGradientOnly lt Size Precision gt x Referenced by ConjugateGradientOnly lt Size Precision gt iterate iterations using std abs Conjugate direction is h grad h is should be negative We should have that fl is
20. hi Brightest pixel in the image lo Dimmest pixel in the image im Image to scale Returns scaled image Definition at line 9 of file debug cc Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes test_output_ patch_variance and FitSpots try_modifying_model Image lt byte gt out im size for int r 0 r lt out size y 0O r t t for int c 0 c lt out size x 0 c out r c int floor im r c lo 255 hi lo return out 8 1 1 2 void test_output_patch_variance const vector lt Image lt float gt gt amp ims Find the variance of every patch in the image and save it to a file Parameters ims List of images Definition at line 23 of file debug cc References assert_same_size scale_to_bytes and sub_images Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 21 assert_same_size ims int rr GV3 get lt int gt test variance radius 1 1 ImageRef r rr rr ImageRef size r 2 ImageRef 1 1 Image lt float gt stds ims front size 0 ImageRef p for ImageRef p 0 0 p y lt stds size y size y p ytt for p x 0 p x lt stds size x size x p x stds p r sqrt mean_and_variance sub_images ims p size second SubImage lt float gt s stds sub_image ImageRef 2 2 stds size ImageRef 4 4 i float hi max_eleme
21. lt lt GV3 get lt string gt log_ratios lt lt lt lt e what lt lt endl exit 1 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 14 multispot5_jni cc File Reference 279 gvar3 lt int gt cluster_to_show cluster_to_show 0 1 gvar3 lt int gt use_largest use_largest 0 1 vector lt vector lt ImageRef gt gt regions regions get_regions log_ratios if regions size 0 cerr lt lt There are no regions n ofstream save_spots open_or_die save_spots save_spots_file save_spots lt lt NOREGIONS n exit 1 if xuse_largest amp amp regions empty xcluster_to_show 0 for unsigned int i l i lt regions size i if regions i size gt regions xcluster_to_show size xcluster_to_show i else cluster_to_show max min cluster_to_show int regions size 1 0 auto_ptr lt FitSpotsGraphics gt gr null_graphics place_and_fit_spots ims regions cluster_to_show le gr 11 13 2 3 int main int argc char xx argv Definition at line 161 of file multispot5_headless cc References mmain try mmain argc argv catch Exceptions All e cerr lt lt Fatal error lt lt e what lt lt endl 11 14 multispot5 jni cc File Reference include lt sstream gt log_ratios save_spots_fi Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 15 randomc h File Refe
22. 0 hess_log_log_normal spot 0 d mu_brightness d sigma_brightness sum_hess 1 1 hess_log_log_normal spot 1 d mu_blur d sigma_blur sum_deriv 0 diff_log_log_normal spot 0 d mu_brightness d sigma_brightness sum_deriv 1 diff_log_log_normal spot 1 d mu_blur d sigma_blur cout lt lt Turboderiv lt lt sum_deriv lt lt endl cout lt lt Turbohess n lt lt sum_hess lt lt endl return sum_hess 11 10 3 2 Matrix lt 4 gt sampled_background_spot_hessian2 const Vector lt 4 gt amp spot const SampledBackgroundDaita amp d Debugging function Not mathematically correct Do not use Definition at line 819 of file multispot5 cc References SampledBackgroundData A SampledMultispot compute_spot_intensity_ hessian diff_log_log_normal forward_algorithm_hessian hess_log_log_normal SampledBackgroundData mu_blur SampledBackgroundData mu_brightness Sampled BackgroundData 0 SampledBackgroundData pi SampledBackgroundData pixel_intensities SampledBackgroundData pixels SampledBackgroundData sample_intensities_without_ spot SampledBackgroundData sigma_blur SampledBackgroundData sigma_brightness and SampledBackgroundData variance Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 262 vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt spot_intensities compute_spot_intensity_hessian d p
23. 11 18 1 Detailed Description Code dealing with storm imagery low level Definition in file storm_imagery cc 11 18 2 Function Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 18 storm_imagery cc File Reference 287 11 18 2 1 pair lt double double gt auto_fixed_scaling const vector lt Image lt float gt gt amp ims double frac Compute the mean and variance of the on average darkest pixels in order to find the correct scaling by examining hte background Definition at line 197 of file storm_imagery cc References assert_same_size and sq Referenced by load_and_normalize_images assert_same_size ims Compute the mean image ish Image lt double gt ave ims 0 size ave fill 0 for unsigned int i 0 i lt ims size i for int y 0 y lt ave size y ytt for int x 0 x lt ave size x X avely x ims i y x Find the smallest N of the pixels vector lt pair lt double ImageRef gt gt pixels for int y 0 y lt ave size y ytt for int x 0 x lt ave size x X pixels push_back make_pair ave y x ImageRef x y int npix int floor frac pixels size 0 5 npix max 0 min npix int pixels size nth_element pixels begin pixels begin npix pixels end pixels resize npix Now compute the mean and variance of those pixels double sum 0 sum2 0 for unsigned int i 0 i lt ims size i
24. 2 gt amp p int size 3 0 e virtual FitSpotsGraphics Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 9 FitSpotsGraphics Class Reference 133 10 9 1 Detailed Description Graphics class for FittingSpots This abstraction prevents FitSpots from depending on and graphics library The func tions are tied very heavily to the internals of FitSpots Definition at line 21 of file multispot5 h 10 9 2 Constructor amp Destructor Documentation 10 9 2 1 FitSpotsGraphics FitSpotsGraphics virtual Desctructor Definition at line 71 of file multispot5 cc 10 9 3 Member Function Documentation 10 9 3 1 virtual void FitSpotsGraphics init CVD ImageRef size pure virtual Initialize graphics Parameters size Size of window for display Implemented in NullGraphics 10 9 3 2 virtual void FitSpotsGraphics draw_krap const std vector lt TooN Vector lt 4 gt gt amp spots const CVD lmage lt CVD byte gt amp im const BBox amp box int N TooN Vector lt 4 gt S TooN Ones 1e99 pure virtual Draw a bunch of stuff Parameters spots List of spots to draw im Background image box Bounding box of region N Spot to highlight s Extra spot to draw as a cross Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 9 FitSpotsGraphics Class Reference 134 Implemented in NullGraphics 10 9 3 3 vir
25. A State transition probabilities pi 7 initial state probabilities O O or I the observed data ie the images B B A function object giving the log probability of an observation given a state and derivatives with respect to the parameters Returns the log probability of observing all the data Backward pass Epsilon is log beta Definition at line 424 of file forward_algorithm h References forward_algorithm_delta and In using namespace TooN using namespace std using namespace std trl Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 40 int states pi size delta j i delta_t i vector lt array lt double States gt gt delta forward_algorithm_delta A Backward pass Epsilon is log beta vector lt array lt double States gt gt epsilon O size Initialize beta to 1 ie epsilon to 0 for int i 0 i lt states i epsilon O size 1 i 0 Perform the backwards recursion for int t O size 2 t gt 0 t for int i 0 i lt states i Find a normalizing constant double Z HUGE_VAL for int j 0 j lt states j pi B O Z max Z ln A i j B log j O t 1 epsilon t 1 j double sum 0 for int j 0 j lt states j sum exp ln A i j B log j O t 1 epsilon t 1 j Z epsilon t i ln sum Z return make_pair de
26. Plugin implementing the classic glow hot LUT which seems to be missing from ImageJ e class LoadTestData Plugin class to load the standard test data from the JAR file e class JNIUserInterface 3B User interface for the Java plugin e class SPair Utility class to hold a pair of strings e class Util Utility calss to hold a number of handy static functions e class three_B ImageJ plugin class e class AdvancedDialog Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 4 Classes related to the ImageJ Plugin 43 Control panel which basically presents the cfg file in a large edit box along with addi tional necessary things frame range and pixel size class ThreeBDialog Dialog box for starting 3B The dialog highlights bad things in red class Spot Basic spot class simply contains coordinates class SomethingChanges Listener class which triggers a complete redraw class FloatSliderWithBox This class makes a floating point slider bar with an edit box next to it for more precision class CloseButtonListener Close button issues a window close event class StopButtonListener Stop 3B thread class ExportButtonListener Listener for the export button class EControlPanel Control panel for running 3B plugin and providing interactive update class ThreeBRunner This class deals with running the actual 3B code It should be run in a separate thread It will make calls back to a viewer and accepts termination calls as well
27. Vector lt 4 gt logprior_deriv makeVector diff_log_log_normal spot 0 mu_brightness sigma_brightness Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 31 SpotNegProbabilityDiffWithSampledBackground Struct Reference 205 diff_log_log_normal spot 1 mu_blur sigma_blur 0 0 return diff_log logprior_deriv 10 31 4 Member Data Documentation 10 31 4 1 const vector lt vector lt vector lt double gt gt gt amp SampledBackgroundDaia sample_intensities_without_spot inherited Definition at line 486 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 2 const vector lt vector lt double gt gt amp SampledBackgroundData pixel_ intensities inherited Definition at line 487 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 3 const vector lt ImageRef gt SampledBackgroundData pixels inherited Definition at line 488 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 4 double SampledBackgroundData mu_brightness inherited Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot
28. amp save_spots FitSpotsGraphics amp gr UserlnterfaceCallback amp ui Wrapper function for using FitSpots Definition at line 2090 of file multispot5 cc References FitSpots run try FitSpots fit ims gr ui p save_spots fit run catch UserInterfaceCallback UserIssuedStop 8 5 1 8 template lt class B gt double spot_shape_s const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi See spot_shape Parameters x xX phi Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 55 Returns 5 x o Definition at line 17 of file storm h Referenced by spot_shape spot_shape_diff spot_shape_diff_position spot_shape_ hess and spot_shape_hess_position return norm_sq x phi template slice lt 2 2 gt 2 phi l phi 1 8 5 1 9 template lt class B gt std pair lt double TooN Vector lt 4 gt gt spot_shape_diff_position const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi Compute the spot shape and its derivative with respect to posision See also spot_shape Parameters x x phi Definition at line 27 of file storm h References spot_shape_s and sq using namespace TooN double s spot_shape_s x phi double r_2_pi sqrt 2 M_PI double prob exp s phi 0 phi 1 r_2_pi Vector lt 4
29. double log probability spot const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_parameters See log_probability_spot_hess Parameters im Image variance o spot_ parameters Returns The log probability Definition at line 292 of file storm h References spot_shape and sq Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 62 1 because if the image is 3x3 ie 0 1 2 then 1 1 is the centre Tf it is 2x2 ie 0 1 then 5 5 is the centre TooN Vector lt 2 gt centre TooN makeVector im size x 1 2 0 im size y SLY cf 2 00 9 double logprob_part 0 for int y 0 y lt im size y ytt for int x 0 x lt im size x X TooN Vector lt 2 gt d TooN makeVector x y centre double mu spot_shape d spot_parameters double e im y x mu logprob_part sq e return logprob_part 2x variance im size area log 2 M_PI variance 2 8 5 1 17 double log_normal_std double mu double sigma inline Compute the standard deviation of a log normal distribution See log_normal Var P x elo 1 e 2 x u 07 43 Parameters sigma 0 mu u Returns The standard deviation Definition at line 324 of file storm h References sq Referenced by brightness_motion_limit return sqrt exp sq sig
30. e int iteration e std vector lt CVD lmageRef gt pixels 10 33 1 Detailed Description Internal state excluding fixed settings which represents the entire internal state of spot fitting Used to restart from interruptions Definition at line 115 of file multispot5 h 10 33 2 Member Data Documentation 10 33 2 1 std tr1 shared_ptr lt MT19937 gt StateParameters rng Random number generator state Definition at line 116 of file multispot5 h Referenced by generate_state_parameters_ye_olde and parse_log_file 10 33 2 2 std vector lt TooN Vector lt 4 gt gt StateParameters spots Spots positions Definition at line 117 of file multispot5 h Referenced by generate_state_parameters_ye_olde and parse_log_file 10 33 2 3 int StateParameters pass Pass number Definition at line 118 of file multispot5 h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 34 StopButtonListener Class Reference 220 Referenced by generate_state_parameters_ye_olde and parse_log_file 10 33 2 4 int StateParameters iteration Iteration number Definition at line 119 of file multispot5 h Referenced by generate_state_parameters_ye_olde and parse_log_file 10 33 2 5 std vector lt CVD lmageRef gt StateParameters pixels Area for analysis Definition at line 120 of file multispot5 h Referenced by generate_state_parameters_ye_olde and parse_log_file The documentation for this s
31. ecs accan ee ee a 222 10 35 2 Constructor amp Destructor Documentation 222 10 35 3 Member Function Documentation 222 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS vii 10 35 4 Member Data Documentation 222 10 36three_B Class Reference 0 0002 e eee ee 223 10 36 1 Detailed Description 2 2 0 223 10 36 2 Member Function Documentation 223 10 36 38 Member Data Documentation 226 10 37ThreeBDialog Class Reference 2 0 227 10 37 1 Detailed Description o lt c ca ee resi 228 10 37 2 Constructor amp Destructor Documentation 228 10 37 3 Member Function Documentation 228 10 37 4 Member Data Documentation 234 10 38ThreeBGlobalConstants Class Reference 235 10 38 1 Detailed Description 2 2 0 4 235 10 38 2 Member Data Documentation 235 10 39ThreeBHelp Class Reference 2 22000 235 10 39 1 Detailed Description lt c accis ee saai 235 10 39 2 Member Function Documentation 236 10 40ThreeBLoader Class Reference 20 00004 236 10 40 1 Detailed Description 2 0 237 10 40 2 Member Function Documentation 237 10 41ThreeBRunner Class Reference 20005 240 10 41 1 Detailed Description
32. gt sample_intensities sampl e frame pixel GibbsSampler sampler pixel_intensities model2_spot_intensiti es model_2 A pi variance sample_iterations for int i 0 i lt h_outer_samples i ui perhaps_stop sampler next rng sample_list push_back sampler sample sample_intensities push_back sampler sample_intensities Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 124 First remove the spot from all the samples for unsigned int i 0 i lt sample_list size i remove_spot sample_intensities i model2_spot_intensitie s spot sample_list i spot Package up all the data SampledBackgroundData data sample_intensities pixel_intensities pixels intensity_mu intensity_sigma blur_mu blur_sigma A pi variance hess sampled_background_spot_hessian_ffbs model_2 spot da ta h_inner_samples rng double det determinant hess M_PI 2 SymEigen lt 4 gt hess_decomp hess cout lt lt Hessien Eigenvalues are lt lt hess_decomp get_evalues lt lt endl const double smallest_evalue le 6 T the determinant is negative then we are still at a saddle p oint despite the attempts above so abandon the attempt if hess_decomp get_evalues 0 gt smallest_evalue Compute the free energy of model 2 at the MLE estimate cout lt lt Model 2 n double model_2_energy NegativeFreeEnergy d
33. gt std pair lt double TooN Vector lt 2 gt gt im size y 1 im size area ie 0 1 2 then 1 1 is the centre 250 7 spot_parameters x diff_mu as_row log 2 M log_probability_spot_diff const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_parameters See log_probability_spot_hess Parameters im Image variance o spot_ parameters Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 61 Returns The log probability Definition at line 257 of file storm h References spot_shape_diff and sq using namespace TooN using namespace std trl using namespace std 1 because if the image is 3x3 ie 0 1 2 then 1 1 is the centre T it is 2x2 ie 0 1 then 5 5 is the centre Vector lt 2 gt centre makeVector im size x 1 2 0 im size y 1 double logprob_part 0 Vector lt 2 gt diff Zeros for int y 0 y lt im size y ytt for int x 0 x lt im size x X Vector lt 2 gt d makeVector x y centre double mu Vector lt 2 gt diff_mu tie mu diff_mu spot_shape_diff d spot_parameters double e im y x mu logprob_part sq e diff diff_mu e return make_pair logprob_part 2 variance im size area log 2 M_PI variance 2 diff variance 8 5 1 16 template lt class Base gt
34. ksum add 8 e2 12 ksum add 8 e3 12 ksum add e4 12 double log_final log variance_from_sample samples samples base_sigma scale_pow 2 M_PI 2 npixels nframes double priors 0 for unsigned int i 0 i lt nspots i priors log_log_normal spots i 4 0 mu_brightness sigma_brightness priors log_log_normal spots i 4 1 mu_blur sigma_blur xcout lt lt Thermo n cout lt lt sum lt lt sum log_final lt lt endl cout lt lt kah lt lt ksum sum log_final lt lt endl cout lt lt priors lt lt priors sum log_final lt lt endl cout lt lt kah lt lt priors ksum sum log_final lt lt endl x cout lt lt log_final lt lt endl cout lt lt sum log_final lt lt endl sampler set_variance variance return sumtpriors log_final 10 22 3 3 double NegativeFreeEnergy operator const Vector lt gt amp spots const inline Estimate free energy using the Slow Growth Thermodynamic Integration method given in Probalistic Inference Using Markov Chain Monte Carlo Methods Radford M Neal 1993 Except using a 5 point stencil instead of forward differenceing in Eq 6 30 Parameters spots list of spots Definition at line 372 of file multispot5 cc References Kahan add SampledMultispot compute_spot_intensity DataForMCMC get_ rng log_log_normal SampledMultispot GibbsSampler next
35. lt phi l r_2_pi gt makeVector 1 esx 1 2xs hess 0 phifl phi 2 phi 2 phi 3 phi 3 xesx 1 5 5 es x 3 es 3 2 i es es es hess 2 3 sq x sq x x 0 return make_tuple prob deriv he phi 0 1 2 s phi 1 x 0 phi 2 phi 0 sq phil1 x 1 phi 3 phil0 sq phil1 phi l r_2_pi pow phi l 3 r_2_pi pow phi l 3 r_2_pi pow phi 1l 3 r_2_pi pow phi l 3 r_2_pi 2eses pow phi l 3 2 pi 2 s x x 0 phi 2 pow phi 1 4 r 2x s x 1 phi 3 pow phif 1 4 r 0 phi 2 sq phil1 r_2_pi pow p 1 phi 3 sq phil1 r_2_pi pow p phi 2 x 1 phi 3 r_2_pi pow ph Ss Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 57 8 5 1 11 template lt class B gt std tr1 tuple lt double TooN Vector lt 2 gt TooN Matrix lt 2 gt gt spot_shape_hess const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi Value of the spot given the parameters and input location The spot is described by the following formula 1 s u x SS an O 21 where x1 93 x2 oa 293 This describes a generic blobby spot function of a variable size The light output can be tuned by varying 1 and the level of blur can be change
36. n_inner_samples 0 1 h_outer_samples GV3 get lt int gt add_remove hessian outer_samples 0 1 h_inner_samples GV3 get lt int gt add_remove hessian inner_samples 0 1 tsamples GV3 get lt int gt add_remove thermo samples 0 1 ave average_image ims_ save_spots save_spots_ time_gibbs 0 time_cg 0 scale_brightness_limit GV3 get lt bool gt max_motion use_brightness_std 0 limit makeVector brightness_motion_limit intensity_mu intensity_sigma scale_brightness_limit 1 1 1 max_motion A GV3 get lt Matrix lt 3 gt gt A Zeros 1 pi GV3 get lt Vector lt 3 gt gt pi Zeros 1 data_for_t_mcmc pixels pixel_intensities intensity_mu intensity_sigma blur_mu blur_sigma variance tsamples sample_iterations A pi rng data_for_h_mcmc pixels pixel_intensities intensity_mu intensity_sigma blur_mu blur_sigma variance h_outer_samples sample_iterations A pi assert_same_size ims Pixel intensities for all images frame pixel pixel_intensities resize ims size vector lt double gt pixels size for unsigned int frame 0 frame lt ims size framet t for unsigned int p 0 p lt pixels size p Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen rng 10 8 FitSpots Class Reference 115 pixel_intensities frame p ims frame pixels p 10 8 3 Member Function Documentation 10 8 3 1 void FitSpots optimi
37. private Definition at line 1086 of file three_B java References time_msg Referenced by EControlPanel and send_time_text_message Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 102 time_msg setText Estimated time s 10 6 3 9 synchronized void EControlPanel update_canvas inline private Generic redraw function which recomputes the reconstruction this is a synchronized method since it makes use of the shared writable array of points Definition at line 1094 of file three_B java References blur_fwhm canvas ThreeBGlobalConstants critical_iterations exportBut ton exportButtonColor FloatSliderWithBox getValue iterations linear_reconstruction pixel_size_in_nm reconstruct reconstructed_pixel_size reconstruction_blur_fwhm and zoom Referenced by send_update_canvas_event reconstruction_blur_fwhm blur_fwhm getValue j zoom pixel_size_in_nm reconstructed_pixel_size getValue linear_reconstruction setProcessor reconstruct linear_reconstruction updateImage linear_reconstruction updateAndRepaintWindow canvas repaint Update the canvas size and viewport to prevent funny things with zoomin Gs canvas setDrawingSize linear_reconstruction getWidth linear_reconstruction getHeight canvas setSourceRect new Rectangle linear_reconstruction getWidth linear_reconstruction getHeight validate pa
38. spots spots_ A A_ pi pi_ base_variance variance_ variance variance_ sample_iterations sample_iterations_ num_frames pixel_intensities size num_pixels pixel_intensities 0 size Observations vector As usual for this application the observations ar e just numbered integers which refer to data held elsewhere O sequence num_frames Start all spots OFF so the intensity is 0 OFF is 1 or 2 not 0 sample_list sample spot frame list of samples drawn using Gibbs s ampling current_sample spots size vector lt State gt num_frames 2 current sample spot frame pixel intensities assosciated with the current sample frame pixel current_sample_intensities num_frames vector lt double gt num_pixels Check a bunch of stuff assert_same_size pixel_intensities assert_same_size spot_intensities 10 12 3 Member Function Documentation 10 12 3 1 void SampledMultispot GibbsSampler set_variance double v inline Update the noide variance Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 12 SampledMultispot GibbsSampler Class Reference 148 Used for adding thermal noise Parameters v noise variance Definition at line 241 of file sampled_multispot h Referenced by NegativeFreeEnergy operator variance v 10 12 3 2 void SampledMultispot GibbsSampler reset inline Reset the gibbs sampler oro the initial
39. std vector lt array lt double 3 gt gt delta3 for int j 0 j lt sample_iterations j for int k 0 k lt int spots size k t reset Subtract off the spot we re interested in remove_spot current_sample_intensities spot_intensities k current_sample k spot_pixels k removet t reset Cut out spot cutout_spot_intensities resize spot_pixels k size for unsigned int i 0 i lt spot_pixels k size i cutout_spot_intensities i spot_intensities k spot_pixels k ill others Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2 Class Reference 155 for int f 0 f lt num frames f cutout_current_sample_intensities f resize spot_pixels k si ze cutout_pixel_intensities f resize spot_pixels k size for unsigned int i 0 i lt spot_pixels k size it cutout_current_sample_intensities f i current_sample_ intensities f spot_pixels k iJ cutout_pixel_intensities f i pixel_intensities f spo t_pixels k il x cut t reset Now current_sample_intensities is the image value for every spo t in every frame except the current spot which is always set to off This allow s us to add it in easily SpotWithBackground B current_sample_intensities spot_intensities k pixel_intensities variance vector lt array lt double 3 gt gt delta forward_algorithm_d
40. void SampledMultispot add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample Definition at line 68 of file sampled_multispot h References intensity Referenced by SampledMultispot GibbsSampler2 next SampledMultispot GibbsSampler next and FitSpots try_modifying_model for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt spot_intensities size ptt current_sample_intensities frame p intensity spot_intensitie s p 9 1 1 5 template lt class T gt void SampledMultispot remove_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask Definition at line 79 of file sampled_multispot h References intensity for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities mask p 9 1 1 6 template lt class T gt void SampledMultispot add_spot vector lt vector lt double gt gt amp current_sample_intensities const ve
41. 0 g gridy 2 g anchor GridBagConstraints FIRST_LINE_START g fill GridBagConstraints BOTH return g 10 6 3 4 GridBagConstraints EControlPanel buttons pos inline private Definition at line 1052 of file three_B java Referenced by EControlPanel GridBagConstraints g new GridBagConstraints g gridx 0 g gridy 5 g fill GridBagConstraints BOTH return g Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 101 10 6 3 5 GridBagConstraints EControlPanel pixel_sizepos _ inline private Definition at line 1061 of file three_B java Referenced by EControlPanel GridBagConstraints g new GridBagConstraints g gridx 0 g gridy 4 g anchor GridBagConstraints FIRST_LINE_START g fill GridBagConstraints BOTH return g 10 6 3 6 GridBagConstraints EControlPanel blur pos inline private Definition at line 1071 of file three_B java Referenced by EControlPanel GridBagConstraints g new GridBagConstraints g gridx 0 g gridy 3 g anchor GridBagConstraints FIRST_LINE_START g fill GridBagConstraints BOTH return g 10 6 3 7 void EControlPanel set_status Strings inline private Definition at line 1081 of file three_B java References status Referenced by EControlPanel and send_status_text_message status setText Status s 10 6 3 8 void EControlPanel set_time Strings inline
42. 10 31 4 10 double SampledBackgroundData variance inherited Definition at line 493 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 11 const vector lt int gt SampledBackgroundData 0 inherited Definition at line 495 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs The documentation for this struct was generated from the following file e multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 207 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference This class compute the log diff hess probability of a spot given an image patch and background due to existing spots include lt sampled_multispot h gt Public Member Functions e double get_val double d e Vector lt 4 gt get_diff double e Matrix lt 4 gt get_hess double e double get_val const pair lt double Vector lt 4 gt gt amp d e Vector lt 4 gt get_diff const pair lt double Vector lt 4 gt gt amp d e Matrix lt 4 gt get_hess const pair lt double Vector lt 4 gt gt amp e double get_val const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d e Vector lt 4 gt get_diff const
43. 1359 of file multispot5 cc 10 8 4 7 int FitSpots start_pass private Starting pass for restarting from checkpoint Definition at line 1360 of file multispot5 cc 10 8 4 MT19937 amp FitSpots rng private Random numbewr generator Definition at line 1362 of file multispot5 cc 10 8 4 9 const double FitSpots variance private Variance of noise in data Must be 1 Definition at line 1364 of file multispot5 cc 10 8 4 10 const double FitSpots intensity mu private Prior for spot intensity Definition at line 1365 of file multispot5 cc 10 8 4 11 const double FitSpots intensity_ sigma private Prior for spot intensity Definition at line 1366 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 128 10 8 4 12 const double FitSpots blur_mu private Prior for spot shape Definition at line 1367 of file multispot5 cc 10 8 4 13 const double FitSpots blur_sigma private Prior for spt shape Definition at line 1368 of file multispot5 cc 10 8 4 14 const double FitSpots area_extra_radius private Extra size beyone marked region in which spots are allowed to exist Definition at line 1377 of file multispot5 cc 10 8 4 15 set lt ImageRef gt FitSpots allowed_area private Total allowed region pixels dilated by area_extra_radius Definition at line 1378 of file multispot5 cc 10 8 4 16 constint FitSpots use_positi
44. 16 template lt class Stream gt void open_or_die Stream amp save_spots const std string amp save_spots_file Parameters save_spots Stream save_ File to open spots_file Definition at line 64 of file utility h Referenced by mmain using std cerr using std endl using std strerror using std exit save_spots open save_spots_file c_str j int err errno if save_spots good cerr lt lt Tce ee eee ee ee ee ee ee ee ee ee Ae cerr lt lt ERROR failed to open lt lt save_spots_file lt lt lt lt strerror er r lt lt endl cerr lt lt Tce e tee ee ee ee ee ee ee ee ee Aske exit 1 8 3 Generic hidden Markov model solver The notation follows A tutorial on hidden Markov models and selected applications in speech recognition Rabiner 1989 Functions e template lt int States class Btype class Otype gt std tr1 tuple lt double TooN Vector lt Btype NumParameters gt TooN Matrix lt Btype NumParameters gt gt forward_algorithm_hessian TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O bool compute_deriv 1 bool compute_hessian 1 e template lt int States class Btype class Otype gt double forward_algorithm TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O e template lt int Stat
45. 234 of file multispot5 cc c 0 sum 0 10 17 3 Member Function Documentation 10 17 3 1 void Kahan add doublei inline Add a number to the running sum Parameters Number to add Definition at line 240 of file multispot5 cc Referenced by NegativeFreeEnergy compute_with_mask and NegativeFreeEnergy operator y input c t sum t y c t sum y c sum y sum y CG Sk c sum Ce E sum t 10 17 4 Member Data Documentation 10 17 4 1 double Kahan y private Input with the compensation removed Temporary working space Definition at line 228 of file multispot5 cc 10 17 4 2 doubleKahan c private Running compenstation for low order bits Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 18 LessSecond Struct Reference 174 Definition at line 229 of file multispot5 cc 10 17 4 3 double Kahan t private y sum which loses low order bits of y Temporary working space Definition at line 230 of file multispot5 cc 10 17 4 4 double Kahan sum running sum Definition at line 232 of file multispot5 cc The documentation for this class was generated from the following file e multispot5 cc 10 18 LessSecond Struct Reference Comparator functor for the first element of a std pair Public Member Functions e template lt class A class B gt bool operator const pair lt A B gt amp a con
46. 4 3 const vector lt Vector lt 4 gt gt SampledMultispot GibbsSampler spots private Definition at line 192 of file sampled_multispot h 10 12 4 4 const Matrix lt 3 gt SampledMultispot GibbsSampler A private Definition at line 193 of file sampled_multispot h 10 12 4 5 const Vector lt 3 gt SampledMultispot GibbsSampler pi private Definition at line 194 of file sampled_multispot h 10 12 4 6 const double SampledMultispot GibbsSampler base_variance private Definition at line 195 of file sampled_multispot h 10 12 4 7 double SampledMultispot GibbsSampler variance private Definition at line 196 of file sampled_multispot h 10 12 4 8 const int SampledMultispot GibbsSampler sample_iterations private Definition at line 198 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2 Class Reference 151 10 12 4 9 const int SampledMultispot GibbsSampler num_frames private Definition at line 199 of file sampled_multispot h 10 12 4 10 const int SampledMultispot GibbsSampler num_pixels private Definition at line 199 of file sampled_multispot h 10 12 4 11 const vector lt int gt SampledMultispot GibbsSampler 0 private Definition at line 200 of file sampled_multispot h 10 12 4 12 vector lt vector lt State gt gt SampledMultispot GibbsSampler current_ sample private Definition at line 202 of file sampled_m
47. Class Reference 156 10 13 3 4 const vector lt vector lt State gt gt amp SampledMultispot GibbsSampler2 sample _ const inline Retrieve the current sample Definition at line 465 of file sampled_multispot h Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_ modifying_model return current_sample 10 13 3 5 const vector lt vector lt double gt gt amp SampledMultispot GibbsSampler2 sample_ intensities const inline Retrieve the intensities for the current sample Definition at line 470 of file sampled_multispot h Referenced by NegativeFreeEnergy compute_with_mask FitSpots optimize_each_ spot_in_turn_for_several_passes and FitSpots try_modifying_model return current_sample_intensities 10 13 4 Member Data Documentation 10 13 4 1 const vector lt vector lt double gt gt amp SampledMultispot GibbsSampler2 pixel_intensities private Definition at line 306 of file sampled_multispot h 10 13 4 2 const vector lt vector lt double gt gt amp SampledMultispot GibbsSampler2 spot_intensities private Definition at line 307 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2 Class Reference 157 10 13 4 3 const vector lt Vector lt 4 gt gt SampledMultispot GibbsSampler2 spots private Definition at line 308 of file sampled_multispot h 10 13 4 4 c
48. Functions e void stateChanged ChangeEvent e Package Functions e SliderChanged FloatSliderWithBox f_ Package Attributes e FloatSliderWithBox f 10 27 1 Detailed Description Definition at line 803 of file three_B java 10 27 2 Constructor amp Destructor Documentation 10 27 2 1 FloatSliderWithBox SliderChanged SliderChanged FloatSliderWithBox f inline package Definition at line 806 of file three_B java References f 10 27 3 Member Function Documentation 10 27 3 1 void FloatSliderWithBox SliderChanged stateChanged ChangeEvent e inline Definition at line 811 of file three_B java References f FloatSliderWithBox get_value_from_slider and FloatSliderWithBox setValue Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 28 SomethingChanges Class Reference 199 f setValue f get_value_from_slider j 10 27 4 Member Data Documentation 10 27 4 1 FloatSliderWithBox FloatSliderWithBox SliderChanged f package Definition at line 805 of file three_B java Referenced by SliderChanged and stateChanged The documentation for this class was generated from the following file e three_B java 10 28 SomethingChanges Class Reference Listener class which triggers a complete redraw Public Member Functions e SomethingChanges EControlPanel c_ e void stateChanged ChangeEvent e Private Attributes e EControlPanel c 10 28 1 Detailed Description Listen
49. GV3 get lt double gt intensity rel_sigma 0 1 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 114 blur_mu GV3 get lt double gt blur mu 0 1 blur_sigma GV3 get lt double gt blur sigma 0 1 Spot position prior area_extra_radius GV3 get lt double gt position extra_radius 0 1 allowed_area dilate_mask pixels area_extra_radius use_position_prior GV3 get lt bool gt position use_prior true 1 position_prior 1 0 allowed_area size General optimizing and sampling parameters max_motion GV3 get lt double gt cg max_motion 0 1 sample_iterations GV3 get lt int gt gibbs mixing_iterations 0 1 Task specific optimizing and sampling parameters Main optimization loop main_cg_max_iterations GV3 get lt double gt main cg max_iterations 0 1 main_samples GV3 get lt int gt main gibbs samples 0 1 main_passes GV3 get lt int gt main passes 0 1 outer_loop_iterations GV3 get lt int gt main total_iterations 100000000 1 Spot selection loop r add_remove_tries GV3 get lt int gt add_remove tries 0 1 add_remove_opt_samples GV3 get lt int gt add_remove optimizer samples 0 1 add_remove_opt_retries GV3 get lt int gt add_remove optimizer attempts 0 1 r add_remove_opt_hess_inner_samples GV3 get lt int gt add_remove optimizer hessia
50. Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 28 Returns square of the number Definition at line 29 of file utility h Referenced by auto_fixed_scaling NegativeFreeEnergy compute_with_mask diff_ log_log_normal hess_log_log_normal log_log_normal log_normal_std log_probability_ spot log_probability_spot_diff log_probability_spot_hess NegativeFreeEnergy operator spot_shape_diff_position spot_shape_hess_position and NegativeFreeEnergy variance_ from_sample return fxf 8 2 2 14 const std vector lt CVD Sublmage lt float gt gt sub_images const std vector lt CVD Image lt float gt gt amp im CVD lmageRef pos CVD lmageRef size Cut sub images out of every member of a vector of images Parameters im Images to be cut pos Top left corner size Size of the patch Returns subimages Referenced by test_output_patch_variance 8 2 2 15 std pair lt CVD lmageRef CVD ImageRef gt boundingbox const std vector lt CVD ImageRef gt amp all_spots Compute the bounding box of a set of points Parameters all_spots List of points Referenced by mmain FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_modifying_model Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 29 8 2 2
51. Inbj O Tae e8 1 i naij7 Z 3 Inb O Z J j InY ef i lna j Z j i In order to prevent a loss of scale on the addition Z j mag i Inaj so the largest exponent will be exactly 0 The final log probability is similarly InP O A Z ny e 0 7 Z can take any value but to keep the numbers within a convenient range ze max r i l For computing derivatives two useful results are _ Fx T oof fixet There are M parameters of B denoted dy The derivatives of P are a Idn P O A oe eo i 2 Eao Tart G 10 11 12 14 15 16 17 18 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 32 Taking derivatives of InP and rearranging to get numerically more convenient results gives 3 2 P 0 2 TF InP O A FOR o N e r 3 51 i POJA F orl InP O A d r i Abn The derivarives of 6 are d r j 9 C a na pe R y 1 Z ndj 4 TA n bi 0 be j AN Ine e i Ina j TA Inb 0 az EN j e 1 Hna j sum_top ye 1 i n a Z j 06r j EA inb 0 z a ee N dOn OOn Y e i nai Z0 diff_delta t j B diff_log j O t i 1 lt SS sum with Z j as defined in forward_algorithm 20 21 24 For computing second derivatives with V yielding column vectors two
52. Matrix lt 4 gt e hess rhess for int i 0 i lt 4 i fi fortint j 07 3 lt 47 J e i j hess_errors i 3 cout lt lt Err n lt lt e lt lt endl cout lt lt Deriv lt lt compute_deriv cg x lt lt endl Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 118 cout lt lt Full n lt lt sampled_background_spot_hessian2 cg x data grad as_col grad as_row lt lt endl FreeEnergyHessian hesscomputer data_for_h_memc Matrix lt 4 gt nhess hesscomputer hessian spots 0 cout lt lt NHess n lt lt nhess lt lt endl cout lt lt Turbo N Hess n lt lt sampled_background_spot_hessian_ffbs cg x data 10000 lt lt endl cout lt lt TI energy lt lt NegativeFreeEnergy data_for_t_mcmc spots_to_Vector spots lt lt endl cout lt lt FA energy lt lt SpotProbabilityWithSampledBackgroun GFAKE data cg x lt lt endl cout lt lt Numerical hessian from FD n lt lt numerical_hessian SpotProbabilityWithSampledBackgroundFAKE data cg x lt lt endl exit 0 fendif cout lt lt Starting opt lt lt cg x lt lt endl while cg iterate compute_deriv graphics draw_krap spots scale_to_bytes ave boundingbox pixels s cg x graphics draw_pixels pixels 0 0 1 2 graphics swap ui perhaps_stop cout lt lt cg x lt lt endl Up
53. Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 105 Referenced by EControlPanel and update_canvas Reconstruct an image which is based around the ROI in size int xoff int roi x int yoff int roi y int xsize int Math ceil roi width zoom int ysize int Math ceil roi height zoom New blank image set to zero FloatProcessor reconstructed new FloatProcessor xsize ysize for int i 0 i lt pts size i Increment the count int xc int Math floor pts get i x xoff zoom 0 5 int yc int Math floor pts get i y yoff zoom 0 5 float p reconstructed getPixelValue xc yc reconstructed putPixelValue xc yc ptl double blur_sigma reconstruction_blur_fwhm 2 Math sqrt 2 Math lo g 2 zoom pixel_size_in_nm new GaussianBlur blurGaussian reconstructed blur_sigma blur_sigma 0 005 return reconstructed 10 6 3 19 void EControlPanel issue_stop inline Definition at line 1196 of file three_B java References ThreeBRunner stop_thread stooButton and tbr Referenced by StopButtonListener actionPerformed if tbr null tbhr stop_thread stopButton setEnabled false 10 6 3 20 synchronized void EControlPanel append final ArrayList lt Spot gt p int its inline Callback issued by the runnre thread which appends the latest set of points to the array This is synchronized since it invol
54. References f Voodoo from Stack Overflow WindowEvent wev new WindowEvent f WindowEvent WINDOW_CLOSING Toolkit getDefaultToolkit getSystemEvent Queue postEvent wev 10 3 4 Member Data Documentation 10 3 4 1 JFrame CloseButtonListener f private Definition at line 839 of file three_B java Referenced by actionPerformed and CloseButtonListener Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 82 The documentation for this class was generated from the following file 10 4 three_B java ConjugateGradientOnly lt Size Precision gt Struct Template Reference Class for performing optimization with Conjugate Gradient where only the derivatives are available include lt conjugate_gradient_only h gt Public Member Functions template lt class Deriv gt ConjugateGradientOnly const TooN Vector lt Size gt amp start const Deriv amp deriv const TooN Vector lt Size gt amp d template lt int S class P class B gt void init const TooN Vector lt Size gt amp start const TooN Vector lt S P B gt amp deriv template lt class Deriv gt void init const TooN Vector lt Size gt amp start const Deriv amp deriv template lt class Deriv gt void find_next_point const Deriv amp deriv bool finished void update_vectors_PR const TooN Vector lt Size gt amp grad
55. T for unsigned int t 1 t lt O size t for int j 0 j lt states j double Ztj HUGE_VAL This is Z_t j for int i 0 i lt states i Ztj max Ztj delta t 1 i ln A i j double sum 0 for int i 0 i lt states i sum exp delta t 1 i ln A i 3j Ztj delta t j B log j O t Ztj 1ln sum Compute the log prob using normalization double Z HUGE_VAL for int i 0 i lt states i Z max Z delta back i double sum 0 for int i 0 i lt states i sum exp delta back i Z double log_prob Z I1n sum return log_prob 8 3 2 3 template lt int States class Btype class Otype gt std pair lt double TooN Vector lt Btype NumParameters gt gt forward_algorithm_deriv TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp 0 Run the forward algorithm and return the log probability and its derivatives Parameters A A State transition probabilities pi 7 initial state probabilities O O or I the observed data ie the images B B A function object giving the log probability of an observation given a state and derivatives with respect to the parameters Returns the log probability of observing all the data Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver
56. UserInterfaceCallback JNIUserlInterface Public Member Functions e JNIUserlnterface JNIEnv env_ jobject jthis e virtual void per_spot int iteration int pass int soot_num int total_spots e virtual void per_modification int iteration int spot_num int total_spots e virtual void per_pass int int const std vector lt TooN Vector lt 4 gt gt amp spots e virtual void perhaps_stop void send_message const string amp s e void fatal const string amp s Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 16 JNiUserInterface Class Reference 168 Private Attributes e JNIEnv env e jobject ThreeBRunner_this e jmethodID send_message_string e jmethodlD die e jmethodID should_stop jmethodID send_new_points e int passes 10 16 1 Detailed Description 3B User interface for the Java plugin This particular UI ferries various messages between Java and C via callbacks and polling Definition at line 33 of file multispot5_jni cc 10 16 2 Constructor amp Destructor Documentation 10 16 2 1 JNIUserlnterface JNIUserinterface JNIEnv env_ jobject jthis inline Definition at line 45 of file multispot5_jni cc env env_ ThreeBRunner_this jthis jclass cls env gt GetObjectClass jthis send_message_string env gt GetMethodID cls send_message_string Ljava lang String V die env gt GetMethodID cls die Ljava lang String V should_sto
57. Vector lt 4 gt get_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d e Matrix lt 4 gt get_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d e template lt class C gt bool type_has_hess const C amp Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 208 bool type_has_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp e template lt class C gt bool type_has_diff const C amp bool type_has_diff const pair lt double Vector lt 4 gt gt amp bool type_has_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp e template lt class Input gt SpotWithBackgroundMasked const vector lt vector lt double gt gt amp sample_ intensities const SWBG_SPOT_INTENSITIES amp spot_intensities const vector lt vector lt double gt gt amp pixel_intensities const double variance const vector lt int gt amp mask e double log int state int obs const e Vector lt 4 gt diff_log int state int obs const e Matrix lt 4 gt hess_log int state int obs const Public Attributes e vector lt pair lt double double gt gt log_prob e vector lt Vector lt 4 gt gt diff_log_prob e vector lt Matrix lt 4 gt gt hess_log_prob Static Public Attributes static const int NumParameters 4 10 32 1 Detailed Desc
58. Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 10 FloatSliderWithBox Class Reference 140 10 10 4 4 GridBagConstraints FloatSliderWithBox completePanelConstraints_ private Definition at line 690 of file three_B java Referenced by FloatSliderWithBox 10 10 4 5 int FloatSliderWithBox steps 1000000 private Definition at line 692 of file three_B java Referenced by FloatSliderWithBox get_value_from_slider and setValue 10 10 4 6 double FloatSliderWithBox min private Definition at line 693 of file three_B java Referenced by FloatSliderWithBox get_value_from_slider and setValue 10 10 4 7 double FloatSliderWithBox max package Definition at line 693 of file three_B java Referenced by FloatSliderWithBox get_value_from_slider and setValue 10 10 4 8 String FloatSliderWithBox text private Definition at line 694 of file three_B java Referenced by FloatSliderWithBox 10 10 4 9 String FloatSliderWithBox units private Definition at line 695 of file three_B java Referenced by setUnits and setValue 10 10 4 10 String FloatSliderWithBox format 8 3f private Definition at line 696 of file three_B java Referenced by setFormat and setValue Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 11 FreeEnergyHessian Class Reference 141 10 10 4 11 double FloatSliderWithBox value private Definition at line 698 of file three_B ja
59. cc 10 14 4 2 int GraphicsGL debug_window_zoom private Definition at line 124 of file multispot5_gui cc The documentation for this class was generated from the following file e multispot5_gui cc 10 15 IndexLexicographicPosition lt Cmp First gt Struct Template Reference Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots Public Member Functions e IndexLexicographicPosition const vector lt Vector lt 4 gt gt amp s e bool operator int a int b Public Attributes e const vector lt Vector lt 4 gt gt amp spots Static Public Attributes e static const int Second First 2 3 2 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 15 IndexLexicographicPosition lt Cmp First gt Struct Template Referencel 66 10 15 1 Detailed Description template lt class Cmp int First gt struct IndexLexicographicPosition lt Cmp First gt Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots Parameters Cmp comparator function to specify less or greater First most significant position index Definition at line 453 of file multispot5 cc 10 15 2 Constructor amp Destructor Documentation 10 15 2 1 template lt class Cmp int First gt IndexLexicographicPosition lt Cmp First gt uIndexLexicographicPosition const vector lt Vector lt
60. class StateType class Rng gt std vector lt StateType gt backward_sampling TooN Matrix lt States gt A const std vector lt std tr1 array lt double States gt gt amp delta Rng amp rng An implementation of the backwards sampling part of the forwards filtering oackwards sampling algorithm See Monte Carlo smoothing for non linear time series Godsill and Doucet JASA 2004 Parameters A HMM transition matrix delta Forward partial probabilities stored as logarithms rng Random number generator to use Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 4 Classes related to the ImageJ Plugin 42 Returns state at each time step Definition at line 519 of file forward_algorithm h References In Compute the elementwise log of A for int r 0 r lt A num_rows r for int c 0 c lt A num_cols c A r c In A r c std vector lt StateType gt samples delta size samples back sample_unscaled_log lt States Rng gt delta back rng A is A t t 1 for int i delta size 2 i gt 0 i std trl array lt double States gt reverse_probabilities delta i for int j 0 j lt States j reverse_probabilities j A j samples it 1 samples i sample_unscaled_log lt States Rng gt reverse_probabilities rng return samples 8 4 Classes related to the ImageJ Plugin Classes class ClassicGlow
61. comment and is ignored by the plugin TILIITTTTTTSITTTTT AITITA ALINIA TIAA TTT TTT TTT TTT TTT TTT Things you might want to change are below here Random seed for the Monte Carlo process Changing this value will change the random numbers which are generated Please refer to the user manual section Iterations and run time for further discussion seed 0 TETTLITTITTLTTLTATT TTT TTT TATA TATA TT TAT TT Spot intensity priors You can probably leave this as is unless your fluorophores are very much brighter compared to the noise than the ones in the paper See Modelling the image in Supplementary Note 1 See here for definitions of mu and sigma http en wikipedia org wiki Log normal_distribution Note that these values are for the spot brightness once the image has been normalised to have unit standard deviation so these should not be changed unless your images are very significantly less noisy than the data presented in the paper intensity rel_mu 2 intensity rel_sigma 1 TITTTTTTTTTTTT TTT TTT TTT TTT TTT TTT AAA TT TT Spot shape priors CHANGE THIS This specifies the log normal distribution for the prior over spot radius This is specified in pixels not nm Corresponds to 300nm at 100nm per pixel blur mu 0 242 blur sigma 0 1 Corresponds to 300nm at 160nm per pixel Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 5 The c
62. const A amp v const double scale Rng amp rng e template lt int N class Rng gt int sample_unscaled_log std tr1 array lt double N gt a Rng amp rng e template lt int States class StateType class Rng gt std vector lt StateType gt backward_sampling TooN Matrix lt States gt A const std vector lt std tr1 array lt double States gt gt amp delta Rng amp rng 11 6 1 Detailed Description Contains an implementation fo the forward algorithm Definition in file forward_algorithm h 11 7 LoadTestData java File Reference Classes e class LoadTestData Plugin class to load the standard test data from the JAR file 11 8 mersenne cpp File Reference Agner Fogg s Mersenne Twister implementation include randomc h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 9 mt19937 h File Reference 256 11 8 1 Detailed Description Agner Fogg s Mersenne Twister implementation Definition in file mersenne cpp 11 9 mt19937 h File Reference Mersenne twister interface code include randomc h include lt iostream gt include lt sstream gt include lt string gt include lt cmath gt include lt iomanip gt Classes struct MT19937 Useful wrapper for MT19937 random number generator class e struct MT19937 ParseError Null struct thrown if attempting to load state from stream yields a parse error 11 9 1 Detailed Description Mersenne twister
63. double Vector lt 4 gt gt gt SampledMultispot compute_spot_intensity_ derivatives const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params inline Definition at line 144 of file sampled_multispot h Referenced by SpotNegProbabilityDiffWithSampledBackground operator vector lt pair lt double Vector lt 4 gt gt gt derivatives pixels size for unsigned int i 0 i lt pixels size i derivatives i spot_shape_diff_position vec pixels i params return derivatives 9 1 1 11 vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt SampledMultispot compute_ spot_intensity_hessian const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params inline Definition at line 153 of file sampled_multispot h Referenced by FreeEnergyHessian hessian sampled_background_spot_hessian2 sampled_background_spot_hessian_FAKE and sampled_background_spot_hessian_ ffbs Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 Class Documentation 75 vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt hessian pixels size for unsigned int i 0 i lt pixels size i hessian i spot_shape_hess_position vec pixels i params return hessian 10 Class Documentation 10 1 AdvancedDialog Class Reference Control panel which basically presents the cfg file in a large edit box along with addi tional nece
64. gt deriv exp s phi l r_2_pi gt makeVector 1 phi 0 1 2 s phi 1 x 0 phif 2 phi 0 sq phi 1 x 1 phif3 phil 0 sq phi 1 return std make_pair prob deriv 8 5 1 10 template lt class B gt std tr1 tuple lt double TooN Vector lt 4 gt TooN Matrix lt 4 gt gt spot_shape_hess_position const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi Compute the spot shape and its Hessian with respect to posision See also spot_shape Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 56 Parameters X X phi Definition at line 49 of file storm h References spot_shape_s and sq using namespa using namespa double s sp double r_2_pi ce TooN ce std trl ot_shape_s x phi sqrt 2 M_PI double es exp s double prob Vector lt 4 gt der atrix lt 4 gt hes hess 0 0 H l hess hess 1 0 hess 0 2 hess N jo ll hess 0 3 hess 3 0 hess 1 1 hess 1 2 2_pi hess 1 3 2_pi hess 2 1 hess 3 1 hess 2 2 hifl 5 hess 3 3 hifl 5 hess 2 3 ifl 5 hess 3 2 es phi 0 phi 1 r_2_pi iv S 0 es es es es 2xphi es 0 phi 0 phi 0 hess hess phi 0 phi 0 phi 0
65. gt null_ui auto_ptr lt FitSpotsGraphics gt null_graphics void get_spot_pixels const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp spot vector lt int gt amp out StateParameters parse_log_file istream amp in double brightness_motion_limit double mu double sigma bool not_one void fit_spots_new const vector lt Image lt float gt gt amp ims StateParameters amp p ofstream amp save_spots FitSpotsGraphics amp gr void fit_spots_new const vector lt Image lt float gt gt amp ims StateParameters amp p ofstream amp save_spots FitSpotsGraphics amp gr UserlnterfaceCallback amp ui template lt class B gt double spot_shape_s const TooN Vector lt 2 gt amp x const TOooN Vector lt 4 dou ble B gt amp phi template lt class B gt std pair lt double TooN Vector lt 4 gt gt spot_shape_diff_position const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi template lt class B gt std tr1 tuple lt double TooN Vector lt 4 gt TooN Matrix lt 4 gt gt spot_shape_hess_position const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi template lt class B gt std tr1 tuple lt double TooN Vector lt 2 gt TooN Matrix lt 2 gt gt spot_shape_hess const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi template lt class B gt std pair lt double Too
66. gt spots_to_vector const Vector lt gt amp s Image lt byte gt scale_to_bytes const Image lt float gt amp im float lo float hi Image lt byte gt scale_to_bytes const Image lt float gt amp im Image lt float gt average_image const vector lt Image lt float gt gt amp ims vector lt string gt split const string amp line template lt class C gt string xtoa const C amp x template lt class C gt C atox const string amp s const string amp msg set lt ImageRef gt dilate_mask const vector lt ImageRef gt amp v double r vector lt int gt SampledMultispot sequence int n double sign double x float sq float f const std vector lt CVD Sublmage lt float gt gt sub_images const std vector lt CVD lmage lt float gt gt amp im CVD lmageRef pos CVD lmageRef size std pair lt CVD lmageRef CVD lmageRef gt boundingbox const std vector lt CVD ImageRef gt amp all_spots template lt class Stream gt void open_or_die Stream amp save_spots const std string amp save_spots_file Typedef Documentation typedef std pair lt CVD lmageRef CVD ImageRef gt BBox Deffinition of a pixel aligned bounding box Definition at line 49 of file utility h 8 2 2 Function Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 23 8 2 2 1 doubleIn doublex inline Computes the natural logarithm but retur
67. interface code Definition in file mt19937 h 11 10 multispot5 cc File Reference Fit spots to the data include lt cstdlib gt include lt cerrno gt include lt cstring gt include lt stack gt include lt algorithm gt include lt climits gt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 257 include lt iomanip gt include lt map gt include lt tr1 memory gt include lt cvd image_io h gt include lt cvd image_convert h gt include lt cvd morphology h gt include lt cvd connected_components h gt include lt cvd draw h gt include lt cvd vector_image_ref h gt include lt cvd random h gt include lt cvd timer h gt include lt gvars3 instances h gt include lt TooN functions derivatives h gt include lt TooN determinant h gt include lt TooN SymEigen h gt include lt TooN optimization conjugate_gradient h gt include conjugate_gradient_only h include forward_algorithm h include numerical _derivatives h include storm h include storm_imagery h include debug h include sampled_multispot h include mt19937 h include utility h include multispot5 h Classes e class NullUlCallback User interface callback class which does nothing e class NullGraphics Graphics class which does absoloutely nothing e class DataFor MCMC Closure hoding the data required do use GibbsSampler2 S
68. is affected by z drift it is useful to carry out a calibration of the drift of the microscope using a bead sample before starting acquisition of data for superresolution 1 2 1 3 Live cell datasets These datasets are of live cells generally labelled with standard fluorescent proteins such as mCherry The mounting medium should be phenol red free to avoid unneces sary background The intensity of the light source should be selected such that it is high Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 2 Getting started 3 enough to produce blinking but not strong enough to completely bleach the sample over the time of the acquisition For example for a standard Xe arc lamp illumination with the full power of the lamp is generally suitable but if you are using a powerful laser source it is recommended to take multiple datasets with different power levels to determine which is suitable The time which is needed to acquire the data necessary for a single superresolution frame is dependent on the illumination intensity the speed of the camera and the prop erties of the flurophore Many older EMCCD cameras have a maximum acquisition speed of around 50 frames per second for a small region of interest which then gives a limit of 4 s to acquire 200 frames High specification EMCCD cameras and SCMOS cameras have much higher acquisition speeds of up to thousands of frames per sec ond for restricted areas However in order to
69. lt kah lt lt priors ksum sum log_final lt lt endl x cout lt lt log_final lt lt endl cout lt lt sum log_final lt lt endl sampler set_variance variance return sumt tpriors log_final 10 22 3 4 MT19937 amp DataForMCMC get_rng const inline inherited Definition at line 189 of file multispot5 cc Referenced by compute_with_mask and operator return rng 10 22 4 Member Data Documentation 10 22 4 1 const vector lt ImageRef gt amp DataForMCMC pixels protected inherited Definition at line 179 of file multispot5 cc 10 22 4 2 const vector lt vector lt double gt gt amp DataForMCMC pixel_intensities protected inherited Definition at line 180 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 188 10 22 4 3 const double DataForMCMC mu_brightness protected inherited Definition at line 181 of file multispot5 cc 10 22 4 4 const double DataForMCMC sigma_brightness protected inherited Definition at line 181 of file multispot5 cc 10 22 4 5 const double DataForMCMC mu_blur protected inherited Definition at line 181 of file multispot5 cc 10 22 4 6 const double DataForMCMC sigma_blur protected inherited Definition at line 181 of file multispot5 cc 10 22 4 7 const double DataForMCMC variance protected inherited Definition at line 182 of file multis
70. lt ImageRef gt gt get_regions const Sublmage lt double gt amp log_ratios Definition at line 31 of file multispot5_headless cc gvar3 lt double gt radius radius 0 1 Set the liklihood ratio threshold spot density prior same thing double threshold GV3 get lt double gt threshold 0 1 int edge GV3 get lt int gt edge 0 1 Threshold image Image lt byte gt thresholded log_ratios size 0 for int r 0 r lt thresholded size y r for int c 0 c lt min thresholded size x edge c thresholded r c 255 log_ratios r c gt threshold Dilate Image lt byte gt dilated morphology thresholded getDisc radius Morphology B inaryDilate lt byte gt transform dilated begin dilated end dilated begin bindlst multiplies lt int gt 255 Connected components of dilated image vector lt ImageRef gt fg for int r 0 r lt thresholded size y r for int c 0 c lt min thresholded size x edge c if dilated r c fg push_back ImageRef c r vector lt vector lt ImageRef gt gt regions connected_components fg regions return regions 11 13 2 2 void mmain int argc char gt argv Definition at line 65 of file multispot5_headless cc References fit_spots_new get_regions load_and_normalize_images null_graphics open_or_die parse_log_file and LogFileParseError what Generated on Wed Nov 28 2012 15 39 12
71. negative new_g g double fl g minus_h I 1 is positive then the conjugate vector points agains the newly computed gradient This can only happen if there is an error in the computation of the gradient eg we re using a stochastic method not much to do here except to stop LE EL gt 0 Return so try to search in a direction conjugate to the current on return What step size takes us up to the maximum length Precision max_step HUGE_VAL for int i 0 lt minus_h size i max_step min max_step abs delta_max i h i IB Taking the maximum step size may result in NaNs Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 86 Try the maximum step size and seccessively reduce it Precision full_max_step max_step for new_g deriv x max_step minus_h if TooN isnan new_g cout lt lt new_g is NAN free n break else max_step 2 I the step size gets too small then ceturn as we can t really do anything if max_step lt full_max_step linesearch_tolerance return double f2 new_g minus_h I 2 hasn t gone negative then the largest allowed step is not large enough So take a full step then keep going in the same direction if f2 lt 0 Take a full step x max_step minus_h return Now x1 and
72. noise cannot be accurately estimated n if getSpots gt 500 err err Warning large number of spots n3B will run very slowly n getSpotsField setBackground Color RED else getSpotsField setBackground c if getFWHM lt 200 err err Warning unrealistically small nmicsoscope resolution n getFWHMField setBackground Color RED else if getFWHM gt 350 err err Warning 3B will not work well with na poorly focussed m icroscope n getFWHMF ield setBackground Color RED Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 233 else getFWHMField setBackground c if getPixelSize lt 70 getPixelSizeField setBackground Color RED err err Warning Very small pixels specified nAre you sure n else if getPixelSize gt 180 getPixelSizeField setBackground Color RED err err Warning 3B will not work well if the camera nresolution is too poor n else getPixelSizeField setBackground c Clamp the frames int first getFirstFrame int last getLastFrame int nfirst Math max 0 Math min nframes 1 first int nlast Math max nfirst Math min nframes 1 last if first nfirst getFirstFrameField setText Integer toString nfirst if last nlast getLastFrameField setText Integer toString nlast if last first 1 gt 500 getFi
73. not have a mask set so we get a null pointer exception when we try to copy So we have to manually set the pixels rather than just copy them try mask copyBits ip getMask x y Blitter COPY catch NullPointerException e for int r 0 r lt ip getRoi height r for int c 0 c lt ip getRoi width c mask set ctx rty 255 Count the number of set pixels in the mask This is used to warn the user if the number is not within a reasonable range int count 0 for int r 0 r lt mask getHeight r for int c 0 c lt mask getWidth c if mask get c r 0 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 36 three_B Class Reference 225 count The non config file parameters are the range of frames to operate on and the pixel size in nm the config works in terms of FWHM in pixels These have to be sepficied whether the basic or advanced dialog is used int firstfr int lastfri double pixel_size_in_nm ImageStack s window getStack if arg equals advanced AdvancedDialog ad new AdvancedDialog cfg s getSize if ad wasOKed return cfg ad getTextAreal getText xpixel_size_in_nm ad getPixelSize firstfr ad getFirstFrame lastfr ad getLastFrame pixel_size_in_nm ad getNextNumber firstfr int ad getNextNumber lastfr int ad getNextNumber else ThreeBDialog gd new ThreeBDia
74. one spot given some samples of the other spots 203 SampledMultispot SpotWithBackgroundMasked This class compute the log diff hess probability of a spot given an image patch and back ground due to existing spots 207 StateParameters Internal state excluding fixed settings which repre sents the entire internal state of spot fitting 219 StopButionListener Stop 3B thread 220 FloatSliderWithBox TextChanged 221 three_B ImageJ plugin class 223 ThreeBDialog Dialog box for starting 3B The dialog highlights bad things in red 227 ThreeBGlobalConstants 235 ThreeBHelp 3B plugin cclass to bring up a basic help window 235 ThreeBLoader Plugin class to load up an old 3B run 236 ThreeBRunner This class deals with running the actual 3B code It should be run in a separate thread It will make calls back to a viewer and ac cepts termination calls as well 240 UserInterfaceCallback Callback class used by FitSpois to provide enough hooks for a user interface 249 UserlInterfaceCallback UserlssuedStop 251 Util Utility calss to hold a number of handy static functions 251 7 File Index 7 1 File List Here is a list of all files with brief descriptions ClassicGlow java 252 conjugate_gradient_only h 253 debug cc Debugging bits 253 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 Module Documentation 19 debug h Debugging bits 253 documentation h Doxygen documentation bits 254 forward_a
75. plotting directly and must be extracted The reason for this is that the output file contains enough information to seamlessly continue long runs which have been interrupted The provided AWK program extracts the coordinates of the spots over all iterations and puts them in coordinates txt Alternatively the data can ve visualised using the plugin under the menu Plugins gt 3B gt Open 3B run 1 5 The configuration file and advanced settings The 3B system has a large number of parameters which control its behaviour These are controled via the configuration file for the commandlie program or via the Advanced option for the plugin The Advanced option essentially allows you to supply a fully custom configuration file Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 5 The configuration file and advanced settings 8 The sample configuration file is given below along with explanations of all parameters In the program most of these parameters are used by the FitSpots class TITTTTTTTTTTT TTT TTT TAIT TTT TTT TTT TTT TTT TTT Advanced setting You probably do not want to change most of these Parameters which you are most likely to need to change are marked CHANGE THIS Note that if a variable is set twice the last setting takes precedence Comments in this section should be read in conjunction with the paper online methods and supplementary material Any line starting with is a
76. s sampl e_list i s pixels blur_mu cout lt lt timer get_time lt lt endl TIME time_gibbs timer reset Package up all the data SampledBackgroundData data sample_intensities pixel_intensities intensity_mu intensity_sigma blur_sigma A pi variance Derivative computer SpotNegProbabilityDiffWithSampledBackground compute_deriv data graphics draw_pixels pixels 0 0 1 1 graphics draw_krap spots scale_to_bytes ave boundingbox pixels s graphics swap Optimize spot s Optimize with the derivatives only since the actual probability is much harder to compute ConjugateGradientOnly lt 4 gt cg spots s compute_deriv limit cg max_iterations main_cg_max_iterations if 0 cout lt lt setprecision 10 cout lt lt spots_to_Vector spots lt lt endl Matrix lt 4 gt hess hess_errors cout lt lt Hello my name is Inigo Montoya n xfor int i 0 i lt 4 i Matrix lt 4 2 gt d numerical_gradient_with_errors NthDeriv compute_deriv i cg x hess i d T 0 hess_errors i d T 1 cout lt lt Errors n lt lt hess_errors lt lt endl cout lt lt NHess n lt lt hess lt lt endl Matrix lt 4 gt rhess sampled_background_spot_hessian cg x dat a cout lt lt Hess n lt lt rhess lt lt endl cout lt lt Err n lt lt hess rhess lt lt endl Vector lt 4 gt grad compute_deriv cg x
77. state all spots off Definition at line 248 of file sampled_multispot h vector lt State gt off num_frames 2 fill current_sample begin current_sample end off vector lt double gt black num_pixels fill current_sample_intensities begin current_sample_intensities end black variance base_variance 10 12 3 3 template lt class T gt void SampledMultispot GibbsSampler next T amp rng inline Get the next sample Parameters rng Random number generator Definition at line 260 of file sampled_multispot h References SampledMultispot add_spot forward_algorithm_delta SampledMultispot remove_ spot and spot_intensities Referenced by FreeEnergyHessian hessian NegativeFreeEnergy operator and FitSpots try_modifying_model for int j 0 j lt sample_iterations j for int k 0 k lt int spots size k Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 12 SampledMultispot GibbsSampler Class Reference 149 Subtract off the spot we re interested in remove_spot current_sample_intensities spot_intensities k current_sample k Now current_sample_intensities is the image value for every spo t in every frame except the current spot which is always set to off This allow s us to add it in easily SpotWithBackground B current_sample_intensities spot_intensities k pixel_intensities variance vector lt arra
78. template lt class T gt void SampledMultispot remove_spot vector lt vector lt double gt gt amp current_ sample_intensities const vector lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask template lt class T gt void SampledMultispot add_spot vector lt vector lt double gt gt amp current_sample_ intensities const vector lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask vector lt double gt SampledMultispot compute_spot_intensity const vector lt Im ageRef gt amp pixels const Vector lt 4 gt amp params vector lt pair lt double Vector lt 4 gt gt gt SampledMultispot compute_spot_intensity_derivatives const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt SampledMultispot compute_spot_intensity_hessian const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params vector lt int gt SampledMultispot sequence int n Define Documentation 11 16 1 1 define SWBG_NAME SpotWithBackground Definition at line 29 of file sampled_multispot h 11 16 1 2 define SWBG_NAME SpotWithBackgroundMasked Definition at line 29 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 17 stor
79. the algorithm maximum l_inf of motion vector during optimization stage See step 2 of the algorithm Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 5 The configuration file and advanced settings 10 cg max_motion 0 5 Scale the maximum step in brightness according to the prior shape The reason is that the brightness is a very different scale from the spot position and shape so the optimizer will get stuck taking many tiny steps in the direction of brightness Tf this is set to 0 then no scaling is used Tf it is set to 1 then scale by the brighness step by the standard deviation of the prior distribution max_motion use_brightness_std 1 Maximum number of iterations of conjugate gradient optimization See 29 for a description of an iteration in this context main cg max_iterations 5 Number of samples used for computing gradient using hybrid method This corresponds to S as applied to step 2 of the algorithm main gibbs samples 10 Number of passes of optimization in step 2 to be completed before advancing to step 3 main passes 4 Allow spots to be at most this far outside the marked region Anything further outside will be removed automatically position extra_radius 2 3 TITISITTTTTIITTTTTS TTT ITSAA TTT TIT TT Add remove spots step 3 of the algorithm When computing Z in step 3a and 3c use a uniform position prior to make spot probability a pro
80. three_B java 10 36 2 Member Function Documentation 10 36 2 1 int three_B setup String arg ImagePlus img inline Definition at line 138 of file three_B java References arg and window window img arg arg_ return ROI_REQUIRED SUPPORTS_MASKING STACK_REQUIRED NO_CHANGES DOE S_16 DOES_32 DOES_8G Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 36 three_B Class Reference 224 10 36 2 2 void three_B run ImageProcessor ip inline Definition at line 145 of file three_B java References SPair a arg SPair b Util getFileName mask Util read and window Load the config file contents Reader cfgstream new InputStreamReader getClass getClassLoader getR esourceAsStream multispot5 cfg String cfg Util read cfgstream try cfgstream close catch IOException close_err Toolkit getDefaultToolkit beep ij IJ showStatus Error reading config file return Some basic error checking if reading of the config file from the JAR archive fails if cfg TRI Toolkit getDefaultToolkit beep ij IJ showStatus Error reading config file return The image from getMask is only the size of the ROI We need it to be congruent with the original image in order to work with the C code mask new ByteProcessor ip getWidth ip getHeight int x ip getRoi x int y ip getRoi y Rectangular selections do
81. to dark As a result the data is treated as the background when considering that spot in isolation See FitSpots for naming of variables Definition at line 484 of file multispot5 cc 10 26 2 Constructor amp Destructor Documentation 10 26 2 1 SampledBackgroundData SampledBackgroundData const vector lt vector lt vector lt double gt gt gt amp sample_intensities_without_spot_ const vector lt vector lt double gt gt amp pixel_intensities_ const vector lt ImageRef gt pixels_ double mu_brightness_ double sigma_brightness_ double mu_blur_ double sigma_blur_ const Matrix lt 3 gt A const Vector lt 3 gt pi double variance inline Definition at line 497 of file multispot5 cc sample_intensities_without_spot sample_intensities_without_spot_ pixel_intensities pixel_intensities_ pixels pixels_ mu_brightness mu_brightness_ sigma_brightness sigma_brightness_ Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 26 SampledBackgroundData Struct Reference 196 mu_blur mu_blur_ sigma_blur sigma_blur_ A A_ pi pi_ variance variance_ O sequence pixel_intensities size 10 26 3 Member Data Documentation 10 26 3 1 const vector lt vector lt vector lt double gt gt gt amp SampledBackgroundDaia sample_intensities_without_spot Definition at line 486 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ F
82. useful results are wus 7 x Vf x V x He x e Vf x VE x x therefore Hf x H nP O A POOR VP O A VP O A and P O A e li mP 0l4 VVE 6 Define s j as s j yeh 1 Hna i so that 6 J Inb O Ins j 29 30 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 33 The derivatives and Hessian recursion are therefore V6 j VInb O ue 31 H5 j H nb O 4 Hs Ys Voli 32 sij sC j sj sum_top2 eee Y e 1U maij 2 5 1 i V _1 i VG 1 OW sum_top sum_t op H Inb 0 2 s sum sum B hess_log j O t 33 Parameters A A State transition probabilities pi 7 initial state probabilities O O or I the observed data ie the images B B A function object giving the log probability of an observation given a state and derivatives with respect to the parameters compute_ Whether to compute the derivative or return zero deriv compute_ Whether to compute the Hessian or return zero This implies compute_ hessian deriv Returns the log probability of observing all the data and the derivatives of the log probability with respect to the parameters and the Hessian Definition at line 134 of file forward_algorithm h References In Referenced by forward_algorithm_deriv sampled_background_spot_hes
83. 0 if int i N amp amp s 0 1e99 glDrawCross s slice lt 2 2 gt 1 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 163 else glDrawCross spots i slice lt 2 2 gt 1 glEnd glFlush 10 14 3 6 virtual void GraphicsGL glDrawCross const Vector lt 2 gt amp p int size inline virtual Definition at line 230 of file multispot5_gui cc glVertex p makeVector 0 size glVertex p makeVector 0 size glVertex p makeVector size 0 glVertex p makeVector size 0 10 14 3 7 virtual void GraphicsGL swap inline virtual Swap buffers if double buffered Implements FitSpotsGraphics Definition at line 239 of file multispot5_gui cc win gt swap_buffers 10 14 3 8 virtual void GraphicsGL init ImageRef log_ratios_size inline virtual Definition at line 245 of file multispot5_gui cc win auto_ptr lt GLWindow gt new GLWindow log_ratios_size debug_window_zoom set_GL_zoom_size log_ratios_size debug_window_zoom glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glEnable GL_LINE_SMOOTH Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 164 10 14 3 9 virtual void FitSpotsGraphics init CVD ImageRef size pure virtual inherited Initialize graphics Parameters size Size of window for display
84. 0 5 spots size 1 cout lt lt World n vector lt Vector lt 4 gt gt model_1l model_2 int original What is the original model Model 1 or Model 2 if add_spot Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 120 model_l spots model_2 model_1 Pick a pixel within the thresholded ones as a starting point int r do r int rng pixels size cout lt lt r lt lt lt lt log_ratios pixels r lt lt lt lt pixels r lt lt lt lt threshold lt lt endl while 0 This version does not yet suppotrt thresholding on log_ratio for placing spots since the purpose of log_ratios has diminish ed while log_ratios pixels r lt threshold model_2 push_back makeVector log_normal_mode intensity_mu intensity_sigma log_normal_mode blur_mu blur_sigma pixels r x rng 5 pixels r y rng 5 cout lt lt Adding a spot n original 1 else Pick a random point to optimize remove int a_random_spot static_cast lt int gt rng spots size model_l spots swap model_1 model_1l size 1 model_1l a_random_spot model_2 model_l model_1l pop_back cout lt lt Removing a spot n original 2 The mobile spot is always the last spot of model_2 const int spot model_2 size 1 cout lt lt Original model lt lt original lt lt
85. 0 6 4 20 int EControlPanel iterations 0 private Definition at line 915 of file three_B java Referenced by append and update_canvas The documentation for this class was generated from the following file e three_B java 10 7 ExportButtonListener Class Reference Listener for the export button Public Member Functions ExportButtonListener EControlPanel c_ e void actionPerformed ActionEvent e Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 7 ExportButtonListener Class Reference 111 Private Attributes e EControlPanel c 10 7 1 Detailed Description Listener for the export button Definition at line 872 of file three_B java 10 7 2 Constructor amp Destructor Documentation 10 7 2 141 ExportButtonListener ExportButtonListener EControlPanelc_ inline Definition at line 875 of file three_B java References c 10 7 3 Member Function Documentation 10 7 3 1 void ExportButtonListener actionPerformed ActionEvente inline Definition at line 880 of file three_B java References c and EControlPanel export_reconstruction_as_ij c export_reconstruction_as_ij 10 7 4 Member Data Documentation 10 7 41 EControlPanel ExportButtonListener c private Definition at line 874 of file three_B java Referenced by actionPerformed and ExportButtonListener The documentation for this class was generated from the following file e three_B java Generated on Wed
86. 1 10 multispot5 cc File Reference 265 You never get two spots in the same disc in the second stage of the alg orithm vector lt ImageRef gt disc getDisc GV3 get lt double gt spot_spread 3 1 1 Record all the pixels map lt ImageRef double gt valid_pixels for unsigned int i 0 i lt pixels size i if log_ratios pixels i gt threshold valid_pixels insert make_pair pixels i log_ratios pixels i Get some initial spots by finding the local maxima ImageRef neighbours 8 mageRef 1 1 mageRef 0 1 mageRef p SAP mageRef 1 0 mageRef 1 0 mageRef 1 1 mageRef 0 1 mageRef 7 ET for unsigned int i 0 i lt pixels size i if log_ratios pixels i gt threshold goto not_a_maximum for int j 0 j lt 8 j if log_ratios in_image pixels i neighbours j log_rati os pixels i gt log_ratios pixels i neighbours j goto not_a_maximum spots push_back makeVector log_normal_mode intensity_mu intensity_si gma log_normal_mode blur_mu blur_sigma pixels i x pixels i y Remove the pixels around the initial spots for unsigned int j 0 j lt disc size j valid_pixels erase pixels i disc j not_a_maximum for unsigned int i 0 i lt spots size i cout lt lt spots i lt lt endl Now place down extra spots in the remaining space while valid_pixels empty ImageRef p max_elem
87. 10 8 3 Member Function Documentation 115 10 8 4 Member Data Documentation 126 10 9 FitSpotsGraphics Class Reference 132 10 9 1 Detailed Description 2 2 0 133 10 9 2 Constructor amp Destructor Documentation 133 10 9 3 Member Function Documentation 133 10 10FloatSliderWithBox Class Reference 2 135 10 10 1 Detailed Description 2 2 0 136 10 10 2 Constructor amp Destructor Documentation 136 10 10 3 Member Function Documentation 137 10 10 4 Member Data Documentation 139 10 11 FreeEnergyHessian Class Reference 141 10 11 1 Detailed Description 2 0 142 10 11 2 Constructor amp Destructor Documentation 142 10 11 3 Member Function Documentation 142 10 11 4 Member Data Documentation 144 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS iv 10 12SampledMultispot GibbsSampler Class Reference 146 10 12 1 Detailed Description 2 2 0 147 10 12 2 Constructor amp Destructor Documentation 147 10 12 3 Member Function Documentation 147 10 12 4 Member Data Documentation 149 10 13SampledMultispot GibbsSampler2 Class Reference 151 10 13 1 Detailed Descript
88. 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 243 return stopped 10 41 3 4 void ThreeBRunner send_message_string Strings inline package Definition at line 1332 of file three_B java References cp and EControlPanel send_status_text_message Referenced by stop_thread cp send_status_text_message s 10 41 3 5 void ThreeBRunner send_new_points float points inline package Definition at line 1337 of file three_B java References EControlPanel append cp ThreeBGlobalConstants critical_iterations its EControlPanel send_time_text_message EControlPanel send_update_canvas_event start_time Spot x and Spot y New points are sent in the form x y X Y ArrayList lt Spot gt tmp new ArrayList lt Spot gt for int i 0 i lt points length i 2 Spot s new Spot s x points i s y points it l tmp add s cp append tmp its cp send_update_canvas_event This happens each iteration i e each pass long current new java util Date getTime LE its gt 0 if its lt 8 cp send_time_text_message computing else long time_per_it current start_time its int target int Math ceil its 1 0 ThreeBGlobalConstants critical_iterations ThreeBGlobalConstants critical_iterations int its_remaining target its System out println Its its System out println rem its_remaining Generated o
89. 28 of file sampled_multispot h References assert_same_size and spot_intensities Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2 Class Reference 153 pixel_intensities pixel_intensities_ pixel_intensities frame pixels spot_intensities spot_intensities_ spot_intensities spot pixel spots spots_ spot_pixels spot_pixels_ A A_ pi pi_ base_variance variance_ variance variance_ sample_iterations sample_iterations_ num_frames pixel_intensities size num_pixels pixel_intensities 0 size Observations vector As usual for this application the observations ar e just numbered integers which refer to data held elsewhere O sequence num_frames Start all spots OFF so the intensity is 0 OFF is 1 or 2 not 0 sample_list sample spot frame list of samples drawn using Gibbs s ampling current_sample spots size vector lt State gt num_frames 2 current sample spot frame pixel intensities assosciated with the current sample frame pixel current_sample_intensities num_frames vector lt double gt num_pixels cutout_pixel_intensities num_frames cutout_current_sample_intensities num_frames Check a bunch of stuff assert_same_size pixel_intensities assert_same_size spot_intensities 10 13 3 Member Function Documentation 10 13 3 1 void SampledMultispot GibbsSampler2 set_v
90. 2i bbox first x bbox second x bbox first y glVertex2i bbox first x bbox second x bbox first y glVertex bbox first glEnd 11 12 2 4 void watch_var void string comm string d Definition at line 69 of file multispot5_gui cc References watch Referenced by mmain Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5 gui cc File Reference 271 vector lt string gt vs ChopAndUnquoteString d if vs size 1 cerr lt lt Error lt lt comm lt lt takes 1 argument lt lt comm lt lt gvar n return watch vs 0 GV3 get_var vs 0 11 12 2 5 bool watch_update Definition at line 82 of file multispot5_gui cc References watch Referenced by mmain bool changes 0 for map lt string string gt iterator i watch begin i watch end i string s GV3 get_var i gt first if s watch i gt first changes 1 watch i gt first s return changes 11 12 2 6 void GUI_Pause intn 0 Definition at line 100 of file multispot5_gui cc if GV3 get lt int gt headless 0 1 glFlush gvar3 lt int gt pause pause 1 1 if n 0 xpause nj pause while xpause 0 GUI_Widgets process_in_crnt_thread j usleep 10000 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5 gui cc File Reference 272 11 12 2 7 vector lt vector lt Imag
91. 35 FloatSliderWithBox TextChanged Class Reference 222 Package Attributes e FloatSliderWithBox f 10 35 1 Detailed Description Definition at line 817 of file three_B java 10 35 2 Constructor amp Destructor Documentation 10 35 2 1 FloatSliderWithBox TextChanged TextChanged FloatSliderWithBox f_ inline package Definition at line 820 of file three_B java References f 10 35 3 Member Function Documentation 10 35 3 1 void FloatSliderWithBox TextChanged actionPerformed ActionEvent e inline Definition at line 825 of file three_B java References f FloatSliderWithBox get_value_from_text and FloatSliderWithBox setValue f setValue f get_value_from_text 10 35 4 Member Data Documentation 10 35 4 1 FloatSliderWithBox FloatSliderWithBox TextChanged f package Definition at line 819 of file three_B java Referenced by actionPerformed and TextChanged The documentation for this class was generated from the following file e three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 36 three_B Class Reference 223 10 36 three B Class Reference ImageJ plugin class Inherits Plug nFilter Public Member Functions e int setup String arg_ ImagePlus img e void run ImageProcessor ip Package Attributes e ImagePlus window e ByteProcessor mask e String arg 10 36 1 Detailed Description ImageJ plugin class Definition at line 132 of file
92. 37 Definition at line 302 of file forward_algorithm h References forward_algorithm_hessian Referenced by SpotNegProbabilityDiffWithSampledBackground operator using namespace std trl double p TooN Vector lt Btype NumParameters gt v tie p v ignore forward_algorithm_hessian A pi B O 1 0 return make_pair p v 8 3 2 4 template lt int States class Btype class Otype gt std vector lt std tr1 array lt double States gt gt forward_algorithm_delta TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O Run the forward algorithm and return the log partials delta Parameters A A State transition probabilities pi 7 initial state probabilities O O or I the observed data ie the images B B A function object giving the log probability of an observation given a state and derivatives with respect to the parameters Returns the log probability of observing all the data Definition at line 323 of file forward_algorithm h References In Referenced by forward_backward_algorithm SampledMultispot GibbsSampler next and sampled_background_spot_hessian_ffbs using namespace TooN using namespace std using namespace std trl int states pi size delta j i delta_t i vector lt array lt double States gt gt delta O size Initialization Eqn 19
93. 37 4 2 int ThreeBDialog npix package Definition at line 434 of file three_B java Referenced by textValueChanged and ThreeBDialog 10 37 4 3 int ThreeBDialog nframes package Definition at line 434 of file three_B java Referenced by textValueChanged and ThreeBDialog 10 37 4 4 Color ThreeBDialog c package Definition at line 435 of file three_B java Referenced by textValueChanged and ThreeBDialog 10 37 4 5 Color ThreeBDialog bg package Definition at line 435 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 38 ThreeBGlobalConstants Class Reference 235 Referenced by textValueChanged and ThreeBDialog The documentation for this class was generated from the following file e three_B java 10 38 ThreeBGlobalConstants Class Reference Static Public Attributes static int critical_iterations 200 10 38 1 Detailed Description Definition at line 29 of file three_B java 10 38 2 Member Data Documentation 10 38 2 1 int ThreeBGlobalConstants critical_iterations 200 static Definition at line 31 of file three_B java Referenced by ThreeBRunner send_new_points and EControlPanel update_canvas The documentation for this class was generated from the following file e three_B java 10 39 ThreeBHelp Class Reference 3B plugin cclass to bring up a basic help window Public Member Functions e void run String arg 10 39 1 D
94. 37 h References rng rng RandomInit seed Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 21 MT19937 Struct Reference 179 10 21 3 2 void MT19937 copy_state const MT19937 amp r Duplicate RNG state Parameters inline s RNG to duplicate Definition at line 36 of file mt19937 h References rng rng r rng 10 21 3 3 double MT19937 operator _ inline Generate a double Definition at line 42 of file mt19937 h References rng return rng Random 10 21 3 4 uint32_t MT19937 rand_int inline Generate an int Definition at line 48 of file mt19937 h References rng return rng BRandom 10 21 3 5 double MT19937 gaussian inline Generate a Gaussian variate Definition at line 54 of file mt19937 h double x1 x2 w do Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 21 MT19937 Struct Reference 180 xl 2 0 this 1 0 x2 2 0 this 1 0 w xl xl x2 x2 while w gt 1 0 w std i sqrt 2 0 std log w w return xl w spare so we don t have to save that one extra bit of state y2 x2 10 21 3 6 void MT19937 write std ostream amp o inline Serialise state Parameters o Stream to serialise to Definition at line 70 of file mt19937 h References rng using namespace std char f o fill ios_base fmtflags fl o f
95. 4 gt gt amp s inline Parameters s Vector to sort indices of Definition at line 457 of file multispot5 cc spots s 10 15 3 Member Function Documentation 10 15 3 1 template lt class Cmp int First gt bool IndexLexicographicPosition lt Cmp First gt noperator inta intb inline Compare two indexes into the array of spots Definition at line 465 of file multispot5 cc Cmp cmp if cmp spots a First spots b First return true else if spots a First spots b First return cmp spots a Second spots b Second else return false Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 16 JNiUserInterface Class Reference 167 10 15 4 Member Data Documentation 10 15 4 1 template lt class Cmp int First gt const vector lt Vector lt 4 gt gt amp IndexLexicographicPosition lt Cmp First gt spots Keep around the array of spots for later comprison Definition at line 454 of file multispot5 cc 10 15 4 2 template lt class Cmp int First gt const int IndexLexicographicPosition lt Cmp First gt Second First 273 2 static Second most siginifcant position index for sorting Definition at line 462 of file multispot5 cc The documentation for this struct was generated from the following file multispot5 cc 10 16 JNiUserinterface Class Reference 3B User interface for the Java plugin Inheritance diagram for JNIUserInterface
96. 7 of file multispot5 cc Cee istringstream i s i PP if i fail throw LogFileParseError Error parsing msg Text is Y s 7 3 return c 8 2 2 10 set lt ImageRef gt dilate_mask const vector lt ImageRef gt amp v double r Very simple and inefficient dilation function Definition at line 1319 of file multispot5 cc vector lt ImageRef gt m getDisc r set lt ImageRef gt ret for unsigned int i 0 i lt v size i for unsigned int j 0 j lt m size j ret insert v i m j return ret Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 27 8 2 2 11 vector lt int gt SampledMultispot sequence intn inline Create a sequence of integers These can be used as observations in an observation class by forward_algorithm and etc Parameters n Length of sequence Definition at line 169 of file sampled_multispot h Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes vector lt int gt v for int i 0O i lt n i v push_back i return v 8 2 2 12 double sign doublex inline computes the sign of x Parameters xX X Returns 1 x gt 0 x lt 0 Definition at line 19 of file utility h return x gt 0 1 1 8 2 2 13 floatsq floatf inline The ubiquitous square function Parameters Number to square
97. 898 of file three_B java Referenced by EControlPanel 10 6 4 12 JPanel EControlPanel buttons private Definition at line 899 of file three_B java Referenced by EControlPanel 10 6 4 13 ThreeBRunner EConitrolPanel tbr private Definition at line 901 of file three_B java Referenced by EControlPanel issue_stop and windowClosing 10 6 4 14 ArrayList lt Spot gt EControlPanel pts private Definition at line 902 of file three_B java Referenced by append EControlPanel and reconstruct 10 6 4 15 Rectangle EControlPanel roi private Definition at line 905 of file three_B java Referenced by EControlPanel and reconstruct Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 7 ExportButtonListener Class Reference 110 10 6 4 16 double EControlPanel zoom 0 01 private Definition at line 906 of file three_B java Referenced by reconstruct and update_canvas 10 6 4 17 double EControlPanel reconstruction_blur_ fwhm 5 private Definition at line 908 of file three_B java Referenced by reconstruct and update_canvas 10 6 4 18 double EControlPanel pixel_size_intnm private Definition at line 910 of file three_B java Referenced by EControlPanel reconstruct and update_canvas 10 6 4 19 String EControlPanel filename private Definition at line 911 of file three_B java Referenced by EControlPanel and export_reconstruction_as_ij 1
98. AKE and sampled_background_spot_hessian_ffbs 10 26 3 2 const vector lt vector lt double gt gt amp SampledBackgroundData pixel_ intensities Definition at line 487 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 3 const vector lt ImageRef gt SampledBackgroundData pixels Definition at line 488 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 4 double SampledBackgroundData mu_brightness Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 5 double SampledBackgroundData sigma_brightness Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 26 SampledBackgroundData Struct Reference 197 FAKE and sampled_background_spot_hessian_ffbs 10 26 3 6 double SampledBackgroundData mu_blur Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 7 double SampledBackground
99. ALM COUE lt lt KKK KKK RK KKK KKK KKK KKK KKK KKK KR AALS COUE lt lt KKK KKK KKK KKK KKK KKK RK KKK KKK KAAS cout lt lt Oe noes 1lone n cout lt lt pix size lt lt endl 8 5 1 4 StateParameters parse _log file istream amp in Parser for multispot 5 log files Log files are mostly line oriented and contain various records The main records are Iteraton ITNUM MAIN lt list of spot parameters gt Pass PASSNUM MT19937 lt random number generator state gt PASS PASSNUM lt list of spot parameters gt ENDCHECKPOINT Note that MAIN is redundant since it will be the same as the following PASS 1 or the first pass computed if restoring from a checkpoint Data should only be considered valid after ENDCHECKPOINT has been read Iteration is written once per iteration not once per pass FIXME Which moron invented this file format Note that the file format hasn t beren fixed so that the output can easily be compared Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 51 to the output of the historic version which is known to be good Parameters in Stream to parse file from Definition at line 986 of file multispot5 cc References StateParameters iteration StateParameters pass StateParameters pixels StateParameters rng split StateParameters spots and xtoa Referenced by mmain A line read from the file string line State lin
100. B java References config filename mask and pixels config cfg_ filename filename_ Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 242 Take a copy of the mask to stop it getting trashed by other threads mask ByteProcessor mask_ duplicate Convert all the input images into float as a common format They will be scaled differently from float images loaded by libcvd but the later normalization will take care of that Oh and ImageStack counts from 1 not 0 pixels new float lastfr firstfr 1 for int i firstfr i lt lastfr i pixels i firstfr float s getProcessor itl convertToFloat get Pixels 10 41 3 Member Function Documentation 10 41 3 1 void ThreeBRunner register EControlPanelc inline Definition at line 1314 of file three_B java References cp Referenced by EControlPanel EControlPanel cp Ci 10 41 3 2 void ThreeBRunner stop_thread inline package Definition at line 1319 of file three_B java References send_message_string and stop Referenced by EControlPanel issue_stop and EControlPanel windowClosing stop true send_message_string stopping 10 41 3 3 boolean ThreeBRunner has_stopped inline package Definition at line 1325 of file three_B java References stopped Referenced by EControlPanel windowClosing Generated on Wed Nov 28 2012 15 39
101. BackgroundData mu_brightness SampledBackgroundData O Sampled BackgroundData pi SampledBackgroundData pixel_intensities SampledBackground Data pixels SampledBackgroundData sample_intensities_without_spot SampledBackgroundData sigma_ blur SampledBackgroundData sigma_brightness and SampledBackgroundData variance vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt spot_intensities compute_spot_intensity_hessian d pixels spot Matrix lt 4 gt sum_hess_log Zeros Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 263 for unsigned int s 0 s lt d sample_intensities_without_spot size s SpotWithBackground B d sample_intensities_without_spot s spot_intensiti es d pixel_intensities d variance double prob Vector lt 4 gt diff Matrix lt 4 gt hess tie prob diff hess forward_algorithm_hessian d A d pi B d O sum_hess_log hess Matrix lt 4 gt hess_log sum_hess_log d sample_intensities_without_spot size Add in the prior hess_log 0 0 hess_log_log_normal spot 0 d mu_brightness d sigma_brightness hess_log 1 1 hess_log_log_normal spot 1 d mu_blur d sigma_blur return hess_log 11 10 3 4 StateParameters generate_state_parameters_ye_olde const Basiclmage lt double gt amp log_ratios const vector lt Image lt float gt gt amp ims vector lt ImageRef gt pixels Se
102. Cross const Vector lt 2 gt amp p int size virtual void swap virtual void init ImageRef log_ratios_size e virtual GraphicsGL virtual void init CVD lmageRef size 0 virtual void draw_krap const std vector lt TooN Vector lt 4 gt gt amp spots const CVD lmage lt CVD byte gt amp im const BBox amp box int N TooN Vector lt 4 gt s TOON Ones 1e99 0 virtual void draw_pixels const std vector lt CVD lmageRef gt amp pix float r float g float b float a 1 0 virtual void gIDrawCross const TooN Vector lt 2 gt amp p int size 3 0 Private Member Functions e GraphicsGL const GraphicsGL amp e void glDrawCircle const Vector lt 2 gt amp p float r e void set_GL_zoom_size ImageRef size double scale Private Attributes std auto_ptr lt GLWindow gt win e int debug_window_zoom 10 14 1 Detailed Description Graphics class which draws information to the screen using OpenGL Definition at line 119 of file multispot5_gui cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 160 10 14 2 Constructor amp Destructor Documentation 10 14 2 1 GraphicsGL GraphicsGL const GraphicsGL amp private 10 14 2 2 GraphicsGL GraphicsGL inline Definition at line 172 of file multispot5_gui cc debug_window_zoom GV3 get lt int gt debug zoom 3 1 10 14 2 3 virtual GraphicsGL GraphicsGL inline virtual D
103. Data sigma_blur Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 8 const Matrix lt 3 gt SampledBackgroundData A Definition at line 491 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 9 const Vector lt 3 gt SampledBackgroundData pi Definition at line 492 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 10 double SampledBackgroundData variance Definition at line 493 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 26 3 11 const vector lt int gt SampledBackgroundData O0 Definition at line 495 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs The documentation for this struct was generated from the following file Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 27 FloatSliderWithBox SliderChanged Class Reference 198 multispot5 cc 10 27 FloatSliderWithBox SliderChanged Class Reference Public Member
104. Gaussian P i Ul 1 Uug aa image e 20 x pixels V 2m0 _ I x u x 9 N 2 InP image L T z n270 40 x pixels where is the image and N is the number of pixels See also log_probability_no_spot and u spot_shape The derivatives are ainP I 0d aE as mP a T GPL HOO a ag x 41 u x Q x X42 h I oa Parameters im Image variance spot_ parameters Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 60 Returns The log probability Definition at line 217 of file storm h References spot_shape_hess and sq using namespace TooN using namespace std trl 1 because if the image is 3x3 Tf it is 2x2 ie 0 1 then 5 5 is the centre Vector lt 2 gt centre makeVector im size x 1 2 0 double logprob_part 0 Vector lt 2 gt diff Zeros Matrix lt 2 gt hess Zeros for int y 0 y lt im size y ytt for int x 0 x lt im size x X Vector lt 2 gt d TooN makeVector x y centre double mu Vector lt 2 gt diff_mu Matrix lt 2 gt hess_mu tie mu diff_mu hess_mu spot_shape_hess d double e im y x mu logprob_part sq e diff diff_mu e hess e x hess_mu diff_mu as_col return make_tuple _PI variance 2 logprob_part 2 variance diff variance hess variance 8 5 1 15 template lt class Base
105. Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 43 UserlnterfaceCallback UserlssuedStop Struct Reference 251 10 42 3 4 virtual void UserlnterfaceCallback perhaps_stop pure virtual The user wishes to issue a stop instruction to the program perhaps done via an asyn chronus call to an instance of of UserlnterfaceCallback This function is called as often as possible and will throw UserlssuedStop when the condition is met Implemented in NullUICallback and JNIUserlnterface The documentation for this class was generated from the following files e multispot5 h e multispot5 cc 10 43 UserinterfaceCallback UserlssuedStop Struct Reference include lt multispot5 h gt 10 43 1 Detailed Description Definition at line 95 of file multispot5 h The documentation for this struct was generated from the following file e multispot5 h 10 44 Util Class Reference Utility calss to hold a number of handy static functions Static Package Functions e static String read Reader in e static SPair getFileName String t 10 44 1 Detailed Description Utility calss to hold a number of handy static functions Definition at line 45 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 File Documentation 252 10 44 2 Member Function Documentation 10 44 2 1 static String Util read Readerin inline static package Read a file into a string It simply sidcards
106. Integer toString nlast return ok 10 1 3 2 int AdvancedDialog parselnt Strings inline package Definition at line 373 of file three_B java Referenced by getFirstFrame and getLastFrame try return Integer parselInt s catch Exception e return 0 10 1 3 3 double AdvancedDialog parseDouble Strings inline Definition at line 385 of file three_B java Referenced by getPixelSize Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 1 AdvancedDialog Class Reference 78 try return Double parseDouble s catch Exception e return 0 10 1 3 4 TextField AdvancedDialog getPixelSizeField inline package Definition at line 397 of file three_B java Referenced by dialogltemChanged and getPixelSize return TextField getNumericFields get 0 10 1 3 5 TextField AdvancedDialog getFirstFrameField inline package Definition at line 402 of file three_B java Referenced by dialogltemChanged and getFirstFrame return TextField getNumericFields get 1 10 1 3 6 TextField AdvancedDialog getLastFrameField inline package Definition at line 408 of file three_B java Referenced by dialogltemChanged and getLastFrame return TextField getNumericFields get 2 10 1 3 7 double AdvancedDialog getPixelSize _ inline package Definition at line 413 of file three_B java References getPixelSi
107. Member Functions e void close InputStream i 10 40 1 Detailed Description Plugin class to load up an old 3B run Definition at line 27 of file ThreeBLoader java 10 40 2 Member Function Documentation 10 40 2 1 void ThreeBLoader close InputStreami inline private Definition at line 29 of file ThreeBLoader java Referenced by run Not sure what to do here if i null try i close catch IOException ioe Toolkit getDefaultToolkit beep ij IJ showStatus Error closing file ioe getMessage 10 40 2 2 void ThreeBLoader run String arg inline Definition at line 45 of file ThreeBLoader java References EControlPanel append close EControlPanel send_status_text_message EControlPanel send_update_canvas_event Spot x and Spot y InputStream in null String name double ps try if arg equals test name test_data txt try Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 40 ThreeBLoader Class Reference 238 in new GZIPInputStream getClass getClassLoader getResou rceAsStream test_data txt gz catch IOException ioe Toolkit getDefaultToolkit beep ij IJ showStatus Could not open test data ioe getMessag e return ps 100 else OpenDialog o new OpenDialog Open 3B run null name o getFileName try in new FileInputStream o getDirectory o getFileName
108. N Vector lt 2 gt gt spot_shape_diff const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi template lt class B gt double spot_shape const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 49 template lt class Base gt std tr1 tuple lt double TooN Vector lt 2 gt TOoN Matrix lt 2 gt gt log_probability_spot_hess const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_parameters template lt class Base gt std pair lt double TooN Vector lt 2 gt gt log_probability_spot_diff const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_ parameters e template lt class Base gt double log_probability_ spot const CVD Sublmage lt float gt amp im double vari ance const TooN Vector lt 4 double Base gt amp spot_parameters e double log_normal_std double mu double sigma e double log_normal_mode double mu double sigma double log_log_normal double x double mu double sigma e double diff_log_log_normal double x double mu double sigma e double hess_log_log_normal double x double mu double sigma 8 5 1 Function Documentation 8 5 1 1 auto_ptr lt UserlInterfaceCallback gt null_ui Factory function to generate an inst
109. Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 112 10 8 FitSpots Class Reference Mega class which actually does the meat of the spot fitting Public Member Functions e FitSpots const vector lt Image lt float gt gt amp ims_ FitSpotsGraphics amp graphics_ UserlnterfaceCallback amp ui_ StateParameters amp params ofstream amp save_spots_ void optimize_each_spot_in_turn_for_several_passes e void try_modifying_model void run Private Attributes const vector lt Image lt float gt gt amp ims FitSpotsGraphics amp graphics UserlnterfaceCallback amp ui const vector lt ImageRef gt pixels e vector lt Vector lt 4 gt gt spots const int start_iteration int start_pass e MT19937 amp rng const double variance const double intensity_mu const double intensity_sigma const double blur_mu const double blur_sigma const double area_extra_radius set lt ImageRef gt allowed_area const int use_position_prior const double position_prior const double max_motion const int sample_iterations const int main_cg_max_iterations const int main_samples const int main_passes e const int outer_loop_iterations const int add_remove_tries const int add_remove_opt_samples const int add_remove_opt_retries const int add_remove_opt_hess_inner_samples const int h_outer_samples const int h_inner_samples Generated on Wed Nov 28 2012 15 39 12 f
110. Only lt Size Precision gt init 10 4 4 14 template lt int Size 1 class Precision double gt Precision ConjugateGradientOnly lt Size Precision gt linesearch_epsilon Additive term in tolerance to prevent excessive iterations if xoptimal 0 Known as ZEPS in numerical recipies Defaults to 1e 20 Definition at line 27 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point and ConjugateGradientOnly lt Size Precision gt init 10 4 4 15 template lt int Size 1 class Precision double gt int ConjugateGradientOnly lt Size Precision gt iterations Number of iterations performed Definition at line 30 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt finished and ConjugateGradientOnly lt Size Precision gt init The documentation for this struct was generated from the following file conjugate_gradient_only h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 5 DataForMCMC Class Reference 93 10 5 DataForMCMC Class Reference Closure hoding the data required do use GibbsSampler2 See FitSpots for naming of variables Inheritance diagram for DataForMCMC DataFor MCMC FreeEnergy Hessian NegativeFreeEnergy Public Member Functions e MT19937 amp get_rng const e DataForMCMC const vec
111. P 262 Set initial partial log probabilities for int i 0 i lt states i delta 0 i ln pif i B log i O 0 Forward pass Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 38 Perform the recursion Eqn 20 P262 Note use T and T 1 Rather than T 1 and T for unsigned int t 1 t lt O size t for int j 0 j lt states j double Ztj HUGE_VAL This is Z_t j for int i 0 i lt states i Ztj max Ztj delta t 1 i In A il 3 double sum 0 for int i 0 i lt states i sum exp delta t 1 i ln A i j Ztj delta t j B log j O t Ztj 1n sum return delta 8 3 2 5 template lt int States class Btype class Otype gt void forward_algorithm_delta2 TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O std vector lt std tr1 array lt double States gt gt amp delta Run the forward algorithm and return the log partials delta Parameters A A State transition probabilities pi 7 initial state probabilities O O or I the observed data ie the images B B A function object giving the log probability of an observation given a state and derivatives with respect to the parameters delta the 6 values Definition at line 371 of file forward_algorithm h Refere
112. Reference 20 00004 174 10 18 1 Detailed Description o ee ee ee eee 174 10 18 2 Member Function Documentation 174 10 19LoadTestData Class Reference 2 20004 175 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS v 10 19 1 Detailed Description csa ccc acsirssna rewa 175 10 19 2 Member Function Documentation 175 10 20LogFileParseError Struct Reference 176 10 20 1 Detailed Description 2 2 0 176 10 20 2 Constructor amp Destructor Documentation 176 10 20 3 Member Data Documentation 177 10 21MT19937 Struct Reference aoaaa 177 10 21 1 Detailed Description 2 2 2 0 2 be ee ee ee 178 10 21 2 Constructor amp Destructor Documentation 178 10 21 3 Member Function Documentation 178 10 21 4 Member Data Documentation 181 10 22NegativeFreeEnergy Class Reference 182 10 22 1 Detailed Description oaoa oaa aa 182 10 22 2 Constructor amp Destructor Documentation 182 10 22 3 Member Function Documentation 183 10 22 4 Member Data Documentation 187 10 23NullGraphics Class Reference 2 2 005 189 10 23 1 Detailed Description 2 2 0 189 10 23 2 Constructor amp Destructor Documentation 189 10 23 3 Member Functio
113. SSD This is fixed regardless of sigma double err_sum 0 for unsigned int frame 0 frame lt nframes frame for unsigned int pixel 0 pixel lt npixels pixel t err_sum sq pixel_intensities frame pixel sampler sampl e_intensities frame pixel Compute the derivative using a five point stencil This could be done in a better but less clear way double el err_sum 2 varl npixels nframes log 2 M_PI varl 2 double e2 err_sum 2 var2 npixels nframes log 2 M_PIx var2 2 double e3 err_sum 2 var3 npixels nframes log 2 M_PI var3 2 double e4 err_sum 2x var4 npixels nframes log 2 M_PIx var4 2 sum el 8 e2 8 e3 e4 12 ksum add e1 12 ksum add 8 e2 12 ksum add 8 e3 12 ksum add e4 12 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 187 double log_final log variance_from_sample samples samples base_sigma scale_pow 2 M_PI 2 npixels nframes double priors 0 for unsigned int i 0 i lt nspots i priors log_log_normal spots i 4 0 mu_brightness sigma_brightness priors log_log_normal spots i 4 1 mu_blur sigma_blur xcout lt lt Thermo n cout lt lt sum lt lt sum log_final lt lt endl cout lt lt kah lt lt ksum sum log_final lt lt endl cout lt lt priors lt lt priors sum log_final lt lt endl cout lt
114. See also load_and_preprocess_image Parameters names List of filenames to load Returns preprocessed images Definition at line 172 of file storm_imagery cc Referenced by load_and_normalize_images vector lt Image lt float gt gt ims float wide GV3 get lt float gt preprocess lpf 0 1 bool p GV3 get lt bool gt preprocess skip 0 1 for unsigned int i 0 i lt names size i Image lt float gt im img_load names i ims push_back preprocess_image im if ims back size ims 0 size cerr lt lt Error with image lt lt names i lt lt all images must be the same size n exit 1 return ims 8 6 1 3 vector lt Image lt float gt gt load_and_normalize_images const vector lt string gt amp files Wrapper for load_and_preprocess_images to allow more flexible behaviour Parameters files List of filenames to load Returns preprocessed images Definition at line 252 of file storm_imagery cc References auto_fixed_scaling and load_and_preprocess_images Referenced by mmain Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 6 Storm imagery classes basic image processing 69 Load the raw data and then load the spot parameters vector lt Image lt float gt gt ims load_and_preprocess_images files double mean variance tie mean variance mean_and_varia
115. ThreeB 1 1 Generated by Doxygen 1 7 4 Wed Nov 28 2012 15 39 12 CONTENTS Contents 1 3B Microscopy Analysis del SIWORUCTION oe bow uag hoe a SB a ee a a ee oe 2 Getting stated so ecte oea te eee ee eee ee he 1 2 1 Dataset types and experimental parameters 1 2 2 Iterations and run time 2 2 0 4 1 3 Usingthe ImageJ Plugin o oa co co roeca reres esas rina 1 4 Using the commandline progam asao a 1 4 1 Example usage explained aaou aaa aaa 1 5 The configuration file and advanced settings Compiling the programs 2 1 Compiling the ImageJ plugin 2A Mangal secs ea be p Ae B pi ae 2 1 2 Automatic Build 2 2 sa esoo asana Module Index ST MIQUES ae eia a a a E pa ee Namespace Index 4 1 Namespace List aaao Class Index Sl Glass Hierarchy 26 225 ee bee e id aoei Class Index 61 CASS LEl 22 4 2 Bead Dak db eea Bee 2 bbs File Index Gel SIE ns x 5 ok hoa Ras Ow ae ee ee a Module Documentation 8 1 Useful debugging functions 8 1 1 Function Documentation 8 2 General utility functions 8 2 1 Typedef Documentation 12 12 12 13 14 14 14 14 14 14 16 16 18 18 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS 10 2 2 Function Documentation aose 086854 we ee bres 8 3 Generic hidden Markov model solver 2 000
116. ThreeB by Doxygen 11 13 multispot5_headless cc File Reference 276 11 12 3 Variable Documentation 11 12 3 1 map lt string string gt watch Definition at line 67 of file multispot5_gui cc Referenced by watch_update and watch_var 11 13 multispot5_headless cc File Reference FitSpots driver for entierly headless batch operation incl include include include include ude lt tag printf h gt lt trl tuple gt lt algorithm gt lt climits gt inc inc inc Functio include include include lude include include include lude include include include lude ns lt iomanip gt lt map gt lt cvd image_io h gt lt cvd image_convert h gt lt cvd morphology h gt lt cvd connected_components lt cvd draw h gt lt cvd vector_image_ref h gt lt gvars3 instances h gt storm_imagery h multispot5 h h gt multispot5_place_choice h utility h vector lt vector lt ImageRef gt gt get_regions const Sublmage lt double gt amp log_ ratios e void mmain int argc char argv e int main int argc char argv Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 13 multispot5 headless cc File Reference 277 11 13 1 Detailed Description FitSpots driver for entierly headless batch operation Definition in file multispot5_headless cc 11 13 2 Function Documentation 11 13 2 1 vector lt vector
117. UPPORTED Definition at line 122 of file randomc h 11 15 3 Typedef Documentation 11 15 3 1 typedef signed int int32_t Definition at line 118 of file randomc h 11 15 3 2 typedef unsigned int uint32_t Definition at line 119 of file randomc h 11 15 3 3 typedef long long int64_t Definition at line 120 of file randomc h 11 15 3 4 typedef unsigned long long uint64_t Definition at line 121 of file randomc h 11 15 4 Function Documentation 11 15 4 1 void EndOfProgram void Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 16 sampled_multispot h File Reference 282 11 15 4 2 void FatalError const char x ErrorText 11 16 sampled_multispot h File Reference include lt vector gt include lt cvd image_ref h gt include lt trl tuple gt include lt TooN TooN h gt include drift include spot_with_background hh Classes struct SampledMultispot SpotWithBackgroundMasked This class compute the log diff hess probability of a spot given an image patch and background due to existing spots struct SampledMultispot SpotWithBackgroundMasked This class compute the log diff hess probability of a spot given an image patch and background due to existing spots class SampledMultispot GibbsSampler Draw samples from the spot states given the spots positions and some data e class SampledMultispot GibbsSampler2 Gibbs sampling class which masks spots to reduce computat
118. VD Sublmage lt float gt amp im double variance inline Find the log probability of an image patch assuming zero mean and the given variance and no spot present See also log_probability_spot Parameters im Image variance variance Returns The log probability Definition at line 183 of file storm h double logprob_part 0 for int y 0 y lt im size y ytt for int x 0 x lt im size x x logprob_part im y x im y x Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 18 storm_imagery cc File Reference 286 return logprob_part 2 variance im size area log 2 M_PI variance 2 11 18 storm_imagery cc File Reference Code dealing with storm imagery low level include lt gvars3 instances h gt include lt cvd image_io h gt include lt cvd convolution h gt include lt TooN wls h gt include lt trl tuple gt include storm_imagery h include debug h include utility h Functions e vector lt Image lt float gt gt load_and_preprocess_images2 const vector lt string gt amp names e vector lt Image lt float gt gt load_and_preprocess_images const vector lt string gt amp names pair lt double double gt auto_fixed_scaling const vector lt Image lt float gt gt amp ims double frac e vector lt Image lt float gt gt load_and_normalize_images const vector lt string gt amp files
119. WithSampledBackground Struct Reference 204 10 31 2 1 SpotNegProbabilityDiffWithSampledBackground SpotNegProbabilityDiffWithSampledBackground const SampledBackgroundData amp d inline Parameters d Necessary data for construction Definition at line 570 of file multispot5 cc SampledBackgroundData d 10 31 3 Member Function Documentation 10 31 3 1 Vector lt 4 gt SpotNegProbabilityDiffWithSampledBackground operator const Vector lt 4 gt amp spot const inline Compute the probability of spot Parameters spot Spot position Definition at line 577 of file multispot5 cc References SampledMultispot compute_spot_intensity_derivatives diff_log_log_normal and forward_algorithm_deriv if spot 0 lt 0 spot 1 lt 0 return Ones std numeric_limits lt double gt quiet_NaN vector lt pair lt double Vector lt 4 gt gt gt spot_intensities compute_spot_intensity_derivatives pixels spot Vector lt 4 gt sum_diff_log Zeros for unsigned int s 0 s lt sample_intensities_without_spot size s SpotWithBackground B sample_intensities_without_spot s spot_intensi ties pixel_intensities variance pair lt double Vector lt 4 gt gt r forward_algorithm_deriv A pi B O sum_diff_log r second Vector lt 4 gt diff_log sum_diff_log sample_intensities_without_spot size i Compute the log probability of the prior
120. _B java Referenced by run and ThreeBRunner 10 41 4 2 float ThreeBRunner pixels package Definition at line 1286 of file three_B java Referenced by run and ThreeBRunner 10 41 4 3 volatile boolean ThreeBRunner stop false private Definition at line 1287 of file three_B java Referenced by should_stop and stop_thread Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 248 10 41 4 4 volatile boolean ThreeBRunner stopped false private Definition at line 1288 of file three_B java Referenced by has_stopped and run 10 41 4 5 boolean ThreeBRunner fatal false private Definition at line 1289 of file three_B java Referenced by die and run 10 41 46 EControlPanel ThreeBRunner cp package Definition at line 1290 of file three_B java Referenced by die register run send_message_string and send_new_points 10 41 4 7 String ThreeBRunner config package Definition at line 1291 of file three_B java Referenced by run and ThreeBRunner 10 41 4 8 String ThreeBRunner filename package Definition at line 1292 of file three_B java Referenced by run and ThreeBRunner 10 41 49 long ThreeBRunner start_time package Definition at line 1293 of file three_B java Referenced by run and send_new_points 10 41 4 10 int ThreeBRunner its package Definition at line 1294 of file three
121. _B java Referenced by run and send_new_points The documentation for this class was generated from the following file e three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 42 UserlnterfaceCallback Class Reference 249 10 42 UserlnterfaceCallback Class Reference Callback class used by FitSpots to provide enough hooks for a user interface include lt multispot5 h gt Inheritance diagram for UserInterfaceCallback UserInterfaceCallback JNIUserInterface NullUICallback Classes e struct UserlssuedStop Public Member Functions e virtual void per_spot int iteration int pass int soot_num int total_spots 0 e virtual void per_modification int iteration int spot_num int total_spots 0 e virtual void per_pass int iteration int pass const std vector lt TooN Vector lt 4 gt gt amp spots 0 e virtual void perhaps_stop 0 e virtual UserlnterfaceCallback 10 42 1 Detailed Description Callback class used by FitSpots to provide enough hooks for a user interface Definition at line 63 of file multispot5 h 10 42 2 Constructor amp Destructor Documentation 10 42 2 1 UserlnterfaceCallback UserInterfaceCallback virtual Empty destructor Definition at line 49 of file multispot5 cc 1a Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 42 UserlnterfaceCallback Class Reference 250 10 42 3 Member Function Documentation 10 42 3 1 vir
122. _hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 5 double SampledBackgroundData sigma_brightness inherited Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 31 SpotNegProbabilityDiffWithSampledBackground Struct Reference 206 10 31 4 6 double SampledBackgroundData mu_blur inherited Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 7 double SampledBackgroundData sigma_blur inherited Definition at line 490 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 8 const Matrix lt 3 gt SampledBackgroundData A inherited Definition at line 491 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs 10 31 4 9 const Vector lt 3 gt SampledBackgroundData pi inherited Definition at line 492 of file multispot5 cc Referenced by sampled_background_spot_hessian2 sampled_background_spot_hessian_ FAKE and sampled_background_spot_hessian_ffbs
123. a_blur sum_hessl hess deriv 0 diff_log_log_normal spots spot 0 mu_brightness sigma_brightness deriv 1 diff_log_log_normal spots spot 1 mu_blur sigma_blur sum_hess2 deriv as_col deriv as_row Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 11 FreeEnergyHessian Class Reference 144 sum_deriv sum_deriv deriv sum_hessl samples variance sum_hess2 samples variance sum_deriv samples variance cout lt lt sum_hessl lt lt endl cout lt lt sum_hess2 lt lt endl cout lt lt sum_deriv as_col sum_deriv as_row lt lt endl COUE AS nates lt lt sum deriv lt lt endl Put in the prior The derivative prior parts cancel out Rather sensibly this means that the second derivatives can be computed without reference to the prior and then the prior can be added in later i e P data parameters P data parameter P para meters The second derivatives have been constructed to be diagonal DiagonalMatrix lt 4 gt hess_prior Zeros spots size cout lt lt sum of parts n lt lt sum_hessl sum_hess2 sum_deriv as_col x sum_deriv as_row lt lt endl TOON cannot currently add DiagonalMatrix to Matrix sum_hess diagonal_slice hess_prior diagonal_slice cout lt lt Done Computing pure MCMC hessian n return sum_hessl sum_hess2 sum_deriv as_col sum_deriv as_row
124. allowed movement delta in any dimension Definition at line 36 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt init Size start size g size new_g size h size minus_h size old_g size old_h size x start old_x size delta_max d init start deriv 10 4 3 Member Function Documentation 10 4 3 1 template lt int Size 1 class Precision double gt template lt int S class P class B gt void ConjugateGradientOnly lt Size Precision gt init const TooN Vector lt Size gt amp start const TooN Vector lt S P B gt amp deriv inline Initialise given a starting point and the derivative at the starting point Parameters start starting point deriv derivative at starting point Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 84 Definition at line 46 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt g ConjugateGradientOnly lt Size Precision gt h ConjugateGradientOnly lt Size Precision gt iterations ConjugateGradientOnly lt Size Precision gt linesearch_epsilon ConjugateGradientOnly lt Size Precision gt linesearch_ tolerance ConjugateGradientOnly lt Size Precision gt max_iterations ConjugateGradientOnly lt Size Precision gt minus_
125. ame area with exactly the same parame ters but with a different random seed Note that the ImageJ plugin will automatically select a different seed each time in the standard interface but with the advanced inter face or commandline program the seed must be specified in the configuration file see The configuration file and advanced settings If the two results appear essentially the same then it is very likely that a sufficient number of iterations has been reached A good general rule is that 200 iterations is sufficient for convergence under almost all circumstances For the example usage given in this manual the required number of iterations for good convergence requires about 6 hours on a standard PC Core i7 at 3GHz Convergence may be achieved before 200 iterations but terminating the run before convergence can lead to artefacts As with any microscopy method the experiment and Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 2 Getting started 4 analysis should always be carried out appropriately to minimise the risk of artefacts There are a number of issues which can lead to artefacts e Early termination of the algorithm The algorithm builds up a reconstrutcion using a number of random sam ples If the algorithm is terminated too early then the reconstruction will be dominated by the randomness and there will not be enough samples for random fluctuations to average out MCMC algorithms ma
126. ame to save moderately safely SPair f Util getFileName window getTitle final String fname f a final String fullname f b if fname null Create the 3B runner and the control panel then execute the contro panel in the GUI thread final Rectangle roi ip getRoi final double pixel_size_in_nm_ pixel_size_in_nm final ThreeBRunner tbr new ThreeBRunner mask s cfg fullname fir stir lastf r SwingUtilities invokeLater new Runnable public void run new EControlPanel roi pixel_size_in_nm_ fna me tbr 10 36 3 Member Data Documentation 10 36 3 1 ImagePlus three_B window package Definition at line 134 of file three_B java Referenced by run and setup Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 227 10 36 3 2 ByteProcessor three_B mask package Definition at line 135 of file three_B java Referenced by run 10 36 3 3 Stringthree_B arg package Definition at line 136 of file three_B java Referenced by run and setup The documentation for this class was generated from the following file e three_B java 10 37 ThreeBDialog Class Reference Dialog box for starting 3B The dialog highlights bad things in red Public Member Functions e double parseDouble String s void textValueChanged TextEvent e Package Functions e ThreeBDialog int count int npix_ int nframes_ e int pa
127. amp im float lo float hi e void test_output_patch_variance const vector lt Image lt float gt gt amp ims 11 3 1 Detailed Description Debugging bits Definition in file debug cc 11 4 debug h File Reference Debugging bits include lt cassert gt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 5 documentation h File Reference 254 Functions e template lt class C gt void assert_same_size const C amp images 11 4 1 Detailed Description Debugging bits Definition in file debug h 11 5 documentation h File Reference Doxygen documentation bits 11 5 1 Detailed Description Doxygen documentation bits Definition in file documentation h 11 6 forward_algorithm h File Reference Contains an implementation fo the forward algorithm include lt trl tuple gt include lt trl array gt include lt TooN TooN h gt include lt vector gt include lt cmath gt Functions e double In double x template lt int States class Btype class Otype gt std tr1 tuple lt double TooN Vector lt Btype NumParameters gt TooN Matrix lt Btype NumParameters gt gt forward_algorithm_hessian TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O bool compute_deriv 1 bool compute_hessian 1 e template lt int States class Btype class Otype gt double forward_algorithm TooN Matrix lt Stat
128. ance of NullGraphics Definition at line 62 of file multispot5 cc Referenced by fit_spots_new return auto_ptr lt UserInterfaceCallback gt new NullUICallback 8 5 1 2 auto_ptr lt FitSpotsGraphics gt null_graphics _ Factory function to generate an instance of NullGraphics Definition at line 89 of file multispot5 cc Referenced by Java_ThreeBRunner_call and mmain return auto_ptr lt FitSpotsGraphics gt new NullGraphics Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 50 8 5 1 3 void get_spot_pixels const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp spot vector lt int gt amp out Which pixels belong to a given spot Find the indices of those pixels Definition at line 886 of file multispot5 cc Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_ modifying_model Go out to three sigma vector lt ImageRef gt pix getDisc spot 1 6 1 out resize 0 ImageRef offset ir_rounded spot slice lt 2 2 gt for unsigned int j 0 j lt pix size j int pos lower_bound pixels begin pixels end pix j offset pi xels begin if pos int pixels size amp amp pixels pos pix j offset out push_back pos if out size 0 COUE lt lt KKK KKK KKK KERR KKK RR KKK KKK KR RA LNMNS COUE lt lt kk RRR RRR RR RR RAL COUE lt lt Nk RRR RR RR RR RR
129. aphically according to the 2D po sitions of the spots 165 JNIUserlnterface 3B User interface for the Java plugin 167 Kahan Class implementing the Kahan summation algorithm to allow ac curate summation of very large numbers of doubles 172 LessSecond Comparator functor for the first element of a std pair 174 LoadTestData Plugin class to load the standard test data from the JAR file 175 LogFileParseError Null struct thrown if a parse error is encountered when trying to load a log file 176 MT19937 Useful wrapper for MT19937 random number generator class 177 NegativeFreeEnergy Class for computing the negitve free energy using thermodynamic integration 182 NullGraphics Graphics class which does absoloutely nothing 189 NullUICallback User interface callback class which does nothing 192 MT19937 ParseError Null struct thrown if attempting to load state from stream yields a parse error 194 SampledBackgroundDaita Closure holding image data generated using samples drawn from the model 194 FloatSliderWithBox SliderChanged 198 SomethingChanges Listener class which triggers a complete redraw 199 SPair Utility class to hold a pair of strings 200 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 7 File Index 18 Spot Basic spot class simply contains coordinates 201 SpotNegProbabilityDiffWithSampledBackground Compuie the derivative of the negative log probability with respect to the parameters of
130. ariance double v Update the noide variance Used for adding thermal noise Parameters inline v noise variance Definition at line 365 of file sampled_multispot h Referenced by NegativeFreeEnergy compute_with_mask variance v 10 13 3 2 void SampledMultispot GibbsSampler2 reset inline Reset the gibbs sampler oro the initial state all spots off Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2 Class Reference 154 Definition at line 372 of file sampled_multispot h vector lt State gt off num_frames 2 fill current_sample begin current_sample end off vector lt double gt black num_pixels fill current_sample_intensities begin current_sample_intensities end plack variance base_variance 10 13 3 3 template lt class T gt void SampledMultispot GibbsSampler2 next T amp rng inline Get the next sample Parameters rng Random number generator Definition at line 384 of file sampled_multispot h References SampledMultispot add_spot SampledMultispot remove_spot and spot_ intensities Referenced by NegativeFreeEnergy compute_with_mask FitSpots optimize_each_ spot_in_turn_for_several_passes and FitSpots try_modifying_model double remove 0 double cut 0 double swb 0 double ff_masked 0 double bs 0 double add 0 cvd_timer t
131. as the placing threshold so the plac ing threshold can be different from the region finding threshold Note that as a result of dliation regions of lt pixels gt may be below the thr eshold In the historic version this could affect new spot placement This feature is not supported in this version double threshold GV3 get lt double gt threshold 0 1 const double post_threshold GV3 get lt double gt post_dilate threshold 1 i if post_threshold 1 threshold post_threshold T dilation after region finding is to be performed then do it here const double post_dilate_radius GV3 get lt double gt post_dilate radius 0 1 if post_dilate_radius 0 Image lt byte gt pix ims 0 size pix F211 0 for unsigned int i 0 i lt pixels size i pix pixels i 255 Image lt byte gt dilated morphology pix getDisc post_dilate_radius Morpho logy BinaryDilate lt byte gt pixels clear ImageRef p 0 0 do if dilated p pixels push_back p while p next dilated size assert_same_size ims if log_ratios size ims 0 size cerr lt lt Bad log ratios size n exit 1 vector lt Vector lt 4 gt gt spots Spots can be either put down automatically or specified The auto initialization is very strange if GV3 get lt bool gt spots auto_initialise 1 1 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1
132. at line 146 of file sampled_multispot h vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt hessian pixels size 10 32 3 34 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked hess_log int state intobs const inline Definition at line 157 of file sampled_multispot h 10 32 4 Member Data Documentation 10 32 4 1 static const int SampledMultispot SpotWithBackgroundMasked NumParameters 4 static Definition at line 7 of file sampled_multispot h 10 32 4 2 vector lt pair lt double double gt gt SampledMultispot SpotWithBackgroundMasked log_prob Definition at line 9 of file sampled_multispot h 10 32 4 3 vector lt Vector lt 4 gt gt SampledMultispot SpotWithBackgroundMasked diff_ log_prob Definition at line 10 of file sampled_multispot h 10 32 4 4 vector lt Matrix lt 4 gt gt SampledMultispot SpotWithBackgroundMasked hess_ log_prob Definition at line 11 of file sampled_multispot h The documentation for this struct was generated from the following file Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 33 StateParameters Struct Reference 219 10 33 StateParameters Struct Reference Internal state excluding fixed settings which represents the entire internal state of spot fitting include lt multispot5 h gt Public Attributes e std tr1 shared_ptr lt MT19937 gt rng e std vector lt TooN Vector lt 4 gt gt spots e int pass
133. ata_for_t_mcmc spots_to_Vector model_2 double model_2_energy NegativeFreeEnergy data_for_t_mcmc compute_with_mask spots_to_Vector model_2 model2_spot_pixels cout lt lt Energy lt lt model_2_energy lt lt endl Combine the MLE energy and Hessian using Laplace s approxim ation double model_2_occam 0 5 x log det double model_2_prob model_2_energy model_2_occam positi on_log_prior_model2_minus_model1 cout lt lt Occam cout lt lt Position lt lt model_2_occam lt lt endl lt lt position_log_prior_model2_minus_model 1 lt lt endl cout lt lt Prob lt lt model_2_prob lt lt endl Integrate model_1 It has no parameters in this formulation double model_l_prob NegativeFreeEnergy data_for_t_mcmc spots_to_Vector model_1 Note that model_l always has one fewer spots and the last spot is always the one missing so we can make the correct mask very easily model2_spot_pixels pop_back double model_l_prob NegativeFreeEnergy data_for_t_mcmc compute_with_mask spots_to_Vector model_1l model2_spot_pixels cout lt lt Prob lt lt model_l_prob lt lt endl Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 125 model_l_prob NegativeFreeEnergy data_for_t_memc spots_t o_Vector model_1 if model_2_prob gt model_1_prob keep 2 else keep 1 cout lt l
134. cientific lt lt spots_to_Vector spots lt lt endl cout lt lt endl lt lt endl lt lt lt lt endl lt lt Optimizi ngri cout lt lt spots size lt lt endl optimize_each_spot_in_turn_for_several_passes spot_intensities is be correct here try_modifying_model save_spots lt lt FINAL lt lt setprecision 15 lt lt scientific lt lt spots_to_Vector spots lt lt endl 10 8 4 Member Data Documentation 10 8 4 1 const vector lt Image lt float gt gt amp FitSpots ims private Input data Definition at line 1350 of file multispot5 cc 10 8 4 2 FitSpotsGraphics amp FitSpots graphics private Graphics class Definition at line 1351 of file multispot5 cc 10 8 4 3 UserlnterfaceCallback amp FitSpots ui private Callbacks to provide user interface Definition at line 1352 of file multispot5 cc 10 8 4 4 const vector lt ImageRef gt FitSpots pixels private Area in which to perform model fitting Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 127 Definition at line 1353 of file multispot5 cc 10 8 4 5 vector lt Vector lt 4 gt gt FitSpots spots private State in terms of current spot positions Definition at line 1356 of file multispot5 cc 10 8 4 6 const int FitSpots start_iteration private Starting iteration number for restarting from checkpoint Definition at line
135. ck if iterations gt ThreeBGlobalConstants critical_iterations exportButton setBackground exportButtonColor else exportButton setBackground Color RED 10 6 3 10 void EControlPanel windowOpened WindowEvente inline Definition at line 1123 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 103 10 6 3 11 void EControlPanel windowClosed WindowEvente inline Definition at line 1124 of file three_B java 10 6 3 12 void EControlPanel windowDeactivated WindowEvente inline Definition at line 1125 of file three_B java 10 6 3 13 void EControlPanel windowActivated WindowEvente inline Definition at line 1126 of file three_B java 10 6 3 14 void EControlPanel windowDeiconified WindowEvente inline Definition at line 1127 of file three_B java 10 6 3 15 void EControlPanel windowlconified WindowEvente inline Definition at line 1128 of file three_B java 10 6 3 16 void EControlPanel windowClosing WindowEvente inline Send a stop message to the thread if the window is closed Definition at line 1131 of file three_B java References ThreeBRunner has_stopped ThreeBRunner stop_thread and tbr if tbr null amp amp tbr has_stopped Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 104 int confirmed JOptionPane showC
136. ckage Definition at line 491 of file three_B java Referenced by getSpots and textValueChanged return TextField getNumericFields get 2 10 37 3 6 TextField ThreeBDialog getFirstFrameField inline package Definition at line 495 of file three_B java Referenced by getFirstFrame and textValueChanged return TextField getNumericFields get 3 10 37 3 7 TextField ThreeBDialog getLastFrameField inline package Definition at line 499 of file three_B java Referenced by getLastFrame and textValueChanged return TextField getNumericFields get 4 10 37 3 8 double ThreeBDialog getFWHM inline package Definition at line 504 of file three_B java References getFWHMField and parseDouble Referenced by textValueChanged return parseDouble getFWHMField getText Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 231 10 37 3 9 double ThreeBDialog getPixelSize inline package Definition at line 509 of file three_B java References getPixelSizeField and parseDouble Referenced by textValueChanged return parseDouble getPixelSizeField getText 10 37 3 10 int ThreeBDialog getSpots inline package Definition at line 514 of file three_B java References getSpotsField and parselnt Referenced by textValueChanged return parseInt getSpotsField getText 10 37 3 11 int Thr
137. ckgroundMasked Struct Reference 217 10 32 3 27 template lt class C gt bool SampledMultispot SpotWithBackgroundMasked type_ has_hess constC amp inline Definition at line 25 of file sampled_multispot h 10 32 3 28 bool SampledMultispot SpotWithBackgroundMasked type_has_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp inline Definition at line 26 of file sampled_multispot h 10 32 3 29 template lt class C gt bool SampledMultispot SpotWithBackgroundMasked type_ has_diff constC amp inline Definition at line 28 of file sampled_multispot h 10 32 3 30 bool SampledMultispot SpotWithBackgroundMasked type_has_diff const pair lt double Vector lt 4 gt gt amp inline Definition at line 29 of file sampled_multispot h 10 32 3 31 bool SampledMultispot SpotWithBackgroundMasked type_has_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp inline Definition at line 30 of file sampled_multispot h 10 32 3 32 double SampledMultispot SpotWithBackgroundMasked log int state int obs const inline Definition at line 135 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 218 10 32 3 33 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked diff_log int state int obs const inline Definition
138. config JNIUserInterface ui env jthis ui send_message Initializing string filename get_string env file Attmpt to open the file ofstream save_spots save_spots open filename c_str j int err errno if save_spots good ui fatal failed to open filename strerror err return vector lt ImageRef gt maskir Image lt double gt maskd Image lt jbyte gt mask get_local_copy_of_image env mask_data rows cols maskd convert_image mask for ImageRef p 1 0 p next mask size if mask p maskir push_back p vector lt Image lt float gt gt ims for int i 0 i lt n_images i Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 4 Classes related to the ImageJ Plugin 46 jfloatArray f static_cast lt jfloatArray gt env gt GetObjectArrayElement image s 1 ims push_back preprocess_image get_local_copy_of_image env ID env gt DeleteLocalRef f double mean variance tie mean variance mean_and_variance ims for unsigned int i 0 i lt ims size i transform ims i begin ims i end ims i begin plies lt double gt 1 sqrt variance tie mean variance mean_and_variance ims A sanity check cerr lt lt Rescaled n cerr lt lt mean lt lt mean lt lt endl cerr lt lt Std lt lt sqrt variance lt lt endl cerr lt lt Version 1 1 lt lt endl a
139. copyOf paths paths length 1 newPaths newPaths length 1 pathToAdd usrPathsField set null newPaths 10 41 3 12 static String ThreeBRunner get_plugin_dir inline static package Definition at line 1489 of file three_B java Referenced by try_to_load_dlls try String img_url new SPair getClass getResource img getFile i URI jar_url null jar_url new URI img_url substring 0 img_url length 5 File jar new File jar_url System out printin File jar getCanonicalPath j String dir jar getParentFile getCanonicalPath File separator System out println Dir dir return dir catch Exception e return Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 247 10 41 3 13 static UnsatisfiedLinkError ThreeBRunner try_to_load_dlls String s inline static package Definition at line 1514 of file three_B java References get_plugin_dir String dir get_plugin_dir try for int i 0 i lt s length i System out println Loading dirts i System load dir s il return null catch UnsatisfiedLinkError e System out printin Link error e getMessage return e 10 41 3 14 ThreeBRunner static initializer inline static package 10 41 4 Member Data Documentation 10 41 4 1 ByteProcessor ThreeBRunner mask package Definition at line 1285 of file three
140. ctor spots spot_pixels A pi variance sample_iterations double sum 0 Kahan ksum for int sample 0 sample lt samples samplet Compute the positions of the surrounding steps double varl variance_from_sample sample 2 samples base_sigma sca le_pow double var2 variance_from_sample sample 1 samples base_sigma sca le_pow double var3 variance_from_sample samplet l samples base_sigma sca le_pow double var4 variance_from_sample sample 2 samples base_sigma sca le_pow Take a sample sampler set_variance var2 sampler next DataForMCMC get_rng Compute the SSD This is fixed regardless of sigma double err_sum 0 for unsigned int frame 0 frame lt nframes frame for unsigned int pixel 0 pixel lt npixels pixel err_sum sq pixel_intensities frame pixel sampler sampl e_intensities frame pixel Compute the derivative using a five point stencil This could be done in a better but less clear way double el err_sum 2 varl npixels nframes log 2 M_PI varl 2 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 185 double e2 err_sum 2 var2 npixels nframes log 2 M_PI var2 2 double e3 err_sum 2 var3 npixels nframes log 2 M_PI var3 2 i double e4 err_sum 2xvar4 npixels nframes log 2 M_PI var4 2 sum el 8xe2 8xe3 e4 12 ksum add e1 12
141. ctor Documentation 10 11 2 1 FreeEnergyHessian FreeEnergyHessian const DataForMCMC amp d inline Constructor Parameters d All data required Definition at line 614 of file multispot5 cc DataForMCMC d 10 11 3 Member Function Documentation 10 11 3 1 Matrix lt 4 gt FreeEnergyHessian hessian const vector lt Vector lt 4 gt gt amp spots int spot const inline Compute the Hessian Parameters spots All spot positions spot spot to compute hessian for Definition at line 622 of file multispot5 cc References SampledMultispot compute_spot_intensity SampledMultispot compute_ spot_intensity_hessian diff_log_log_normal hess_log_log_normal SampledMul tispot GibbsSampler next SampledMultispot GibbsSampler sample and SampledMultispot GibbsSampler samp intensities Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 11 FreeEnergyHessian Class Reference 143 Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes cout lt lt Computing pure MCMC hessian n const unsigned int nspots spots size const unsigned int nframes pixel_intensities size const unsigned int npixels pixels size cout lt lt spot lt lt lt lt nspots lt lt lt lt nframes lt lt lt lt npixels vector lt vector lt double gt gt spot_intensity spot pixel for unsigned i
142. ctor lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask Definition at line 88 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 9 1 SampledMultispot Namespace Reference 73 References intensity for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities mask p 9 1 1 7 template lt class T gt void SampledMultispot remove_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask Definition at line 99 of file sampled_multispot h References intensity and spot_intensities const int steps spot_intensities size const int frames current_sample_intensities size for int frame 0 frame lt frames framet t int s frame steps frames if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities s mask p 9 1 1 8 template lt class T gt void SampledMultispot add_spot vector lt vector lt double gt gt
143. d independently by varying Q2 The derivative is sS OU 1 34 09 PN 34 Ou Q s 1 2 35 0dr Vin s And the hessian is 3u A 0 36 OU a gt 7 1 T 2 37 A102 o2 m 5 i an 2 1 s 2 s 14 2 302 AT 1 5s 2s 38 Parameters XiX phi Returns u x Q Definition at line 124 of file storm h References spot_shape_s Referenced by log_probability_spot_hess double s spot_shape_s x phi double r_2_pi sqrt 2 M_PI double prob exp s phi 0 phi 1 r_2_pi TooN Vector lt 2 gt deriv exp s phi l r_2_pi TooN makeVector 1 phi Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 0 1 2 s phi l TooN Matrix lt 2 gt hess hess 0 0 0 hess 0 1 exp s 1 2 s phi 1 phi 1 r_2_pi hess 1 0 hess 0 1 hess 1 1 2 phi 0 exp s 1 5 s 2 s s pow phi l return std trl make_tuple prob deriv hess 8 5 1 12 template lt class B gt std pair lt double TooN Vector lt 2 gt gt spot_shape_diff const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi see spot_shape_hess Parameters x x phi Returns u x Definition at line 146 of file storm h References spot_shape_s Referenced by log_probability_spot_diff double s spot_shape_s x phi double r_2_pi sqr
144. data was obtained The file AVG_test_data bmp is a Z projection made using ImageJ The file markup1 bmp is a mask indicating which area of the image to analyse All perfectly black pixels are ignored ecerything else is analysed If you overlay markup1 bmp and AVG_test_data bmp you can see which area the markup corresponds to The markup file was created using the GIMP 1 4 1 2 Running the program The general form for running the program is multispot5_headless variablel valuel variable2 value 2 imag el image2 so the example sets ths variable save_spots totest_data results txt and the variable Log_ratios to test_data markup1l bmp The remaining argu ments is the list of files to be analysed The program gets the markup in the filename given in the log_ratios variable yes the choice of name is very strange and corresponds to a very old phase of develop ment The more sanely named variable save_spots is the filename in which the output is to be saved Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 5 The configuration file and advanced settings 7 The program actually has a large number of variables which must be set Most of them you probably don t want to change but some of them you will want to change The default values for these variables are stored in multispot5 cfg The format of this file should be mostly self explanatory Everything after a is a comment and is ignored See T
145. date to use the result of the optimization spots s cg x cout lt lt End lt lt cg x lt lt endl graphics draw_krap spots scale_to_bytes ave boundingbox pixels 1 graphics swap Recompute the new spot intensity since the spot has changed spot_intensities s compute_spot_intensity pixels spots s Recompute which are the useful pixels get_spot_pixels pixels spots s spot_pixels s Is the spot within the allowed area i e is it s prior 0 The prior is sero only if it we are using it and we re in an in valid area ImageRef quantized_spot_position ir_rounded spots s slice lt 2 2 gt O bool zero_prior use_position_prior amp amp allowed_area count quant ized_spot_position 0 Check to see if spot has been ejected If spot_pixels is empty then it has certainly been ejected if spot_pixels s empty zero_prior Spot has been ejected Erase it cout lt lt Erasing ejected spot lt lt spot_pixels s empty Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 119 lt lt lt lt zero_prior lt lt endl cout lt lt spots s lt lt endl GUI_Pause 1 spot_intensities erase spot_intensities begin s spot_pixels erase spot_pixels begin s spots erase spots begin s S j exit 0 cout lt lt timer get_time lt lt endl TIME time_cg timer reset cout l
146. e 0 0 10 addNumericField Last frame nframes 1 0 10 addDialogListener this dialogItemChanged null null showDialog 10 1 3 Member Function Documentation 10 1 3 1 boolean AdvancedDialog dialogltemChanged GenericDialog gd java awt AWTEvent e inline Definition at line 331 of file three_B java References getFirstFrame getFirstFrameField getLastFrame getLastFrameField getPixelSizeField nframes and ok Referenced by AdvancedDialog boolean v Checkbox getCheckboxes get 0 getState if v ok ok v if ok getTextAreal setEditable true Label getMessage setText Warning strange behaviour may res Le yy Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 1 AdvancedDialog Class Reference 77 getPixelSizeField setEditable true getFirstFrameField setEditable true getLastFrameField setEditable true else getTextAreal setEditable false Label getMessage setText i getPixelSizeField setEditable false getFirstFrameField setEditable false getLastFrameField setEditable false Clamp the frames int first getFirstFrame int last getLastFrame int nfirst Math max 0 Math min nframes 1 first int nlast Math max nfirst Math min nframes 1 last if first nfirst getFirstFrameField setText Integer toString nfirst if last nlast getLastFrameField setText
147. e std istream amp in 11 12 multispot5 gui cc File Reference FitSpots driver for interactive GUI operation and debugging include lt tag printf h gt include lt tril tuple gt Hinclude lt algorithm gt Hinclude lt climits gt include lt iomanip gt Hinclude lt map gt include lt cvd image_io h gt include lt cvd image_convert h gt include lt cvd glwindow h gt include lt cvd morphology h gt include lt cvd connected_components h gt include lt cvd draw h gt include lt cvd gl_helpers h gt include lt cvd vector_image_ref h gt include lt cvd videodisplay h gt include lt gvars3 instances h gt include lt gvars3 GStringUtil h gt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5_gui cc File Reference 269 include lt gvars3 GUI_readline h gt include storm_imagery h include multispot5 h include multispot5_place_choice h include utility h Classes e class GraphicsGL Graphics class which draws information to the screen using OpenGL Functions e double lim double x e Image lt byte gt scale const Sublmage lt double gt amp i double ctr double rng e void draw_bbox const BBox amp bbox e void watch_var void x string comm string d bool watch_update e void GUI_ Pause int n 0 vector lt vector lt ImageRef gt gt get_regions const Sublmage lt double gt amp log_ ra
148. e JDK If it is not in usr lib jvm java 6 openjdk include you will have to specify the path First configure the system configure with imagej path to ImageJ ij jar with jni path to jdk include Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 2 1 Compiling the ImageJ plugin 13 You will also need to make sure that the JDK programs javac havah etc are in your path The configure script will attempt to detect the location of the JNI headers If it fails you will need to specify with jni path to jdk include To build the JAVA part make three_B jar To build the plugin on Linux make libthreeB_jni so DYNAMIC_PLUGIN 1 Note that if you do not specify DYNAMIC_PLUGIN then the makefile will try to build a plugin with some dependencies statically linked in which will almost certainly fail unless you have set the system up to support such an operation On MinGW make threeB_jni dll Now copy three_B jar and libthreeB_jni so into your ImageJ plugins directory 2 1 2 Automatic Build The automatic build method is very slow and is designed to be able to repeatably build plugins for 32 and 64 bit Linux and Windows It is also designed to build the plugin with as many static dependencies as possible so that only a single DLL so needs to be shipped per system The script operates by building a temporary install of Ubuntu 10 04 LTS and using that to compile all variants of the plugin You will need a D
149. e via an asyn chronus call to an instance of of UserlnterfaceCallback This function is called as often as possible and will throw UserlssuedStop when the condition is met Implements UserlnterfaceCallback Definition at line 95 of file multispot5_jni cc bool stop env gt CallBooleanMethod ThreeBRunner_this should_stop if stop throw UserIssuedStop 10 16 3 5 void JNIUserinterface send_message const string amp s inline Definition at line 103 of file multispot5_jni cc Referenced by Java_ThreeBRunner_call jvalue message_string message_string 1 env gt NewStringUTF s c_str Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 16 JNiUserInterface Class Reference 171 env gt CallVoidMethod ThreeBRunner_this send_message_string message_s tring env gt DeleteLocalRef message_string 1 10 16 3 6 void JNIUserlnterface fatal const string amp s inline Definition at line 111 of file multispot5_jni cc Referenced by Java_ThreeBRunner_call jvalue message_string message_string l env gt NewStringUTF s c_str env gt CallVoidMethod ThreeBRunner_this die message_string env gt DeleteLocalRef message_string 1 10 16 4 Member Data Documentation 10 16 4 1 JNIEnvx JNIUserinterface env private Definition at line 36 of file multispot5_jni cc 10 16 4 2 jobject JNIUserInterface ThreeBRunner_this private Definition at line 37 of file multispot5_
150. eB by Doxygen 1 3B Microscopy Analysis 1 11 15 4 Function Documentation 2 2 281 11 16sampled_multispot h File Reference 282 11 16 1 Define Documentation 2 2 0 283 11 16 2 Typedef Documentation 284 11 17storm h File Reference 2 0000 eee eee 284 11 17 1 Detailed Description ee ee 285 11 17 2 Function Documentation lt a ci e rs escassi iros 285 11 18storm_imagery cc File Reference uaou aaa aa 286 11 18 1 Detailed Description a aoaaa 286 11 18 2 Function Documentation o gt sea a ratas ee ee ee 286 11 19storm_imagery h File Reference aoaaa aaa aa 288 11 19 1 Detailed Description o lt osa so ccp annta naa eea 288 11 20three_B java File Reference aoaaa 288 11 21ThreeBHelp java File Reference anaana aaa aaa 289 11 22ThreeBLoader java File Reference aoaaa aaa aaa aaa 289 11 23utility cc File Reference lt o oaao cacao 0 0002 saa rara 289 11 23 1 Detailed Description 2 2 22 0 4 289 11 24utility h File Reference naoa 020200 290 11 24 1 Detailed Description 2 2 0 290 11 24 2 Function Documentation lt lt s lt e sacos acna ena 290 1 3B Microscopy Analysis 1 1 Introduction This project contains the reference implementation of the 3B microscopy analysis method and an ImageJ plugin Please refer to the project website for more information on the method T
151. eGradientOnly lt Size Precision gt finished and ConjugateGradientOnly lt Size Precision gt init 10 4 4 11 template lt int Size 1 class Precision double gt int ConjugateGradientOnly lt Size Precision gt max_iterations Maximum number of iterations Defaults to si ze 100 Definition at line 22 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt finished ConjugateGradientOnly lt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 92 Size Precision gt init and FitSpots optimize_each_spot_in_turn_for_several_passes 10 4 4 12 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt delta_max Maximum distance to travel along all axes in line search Definition at line 24 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point 10 4 4 13 template lt int Size 1 class Precision double gt Precision ConjugateGradientOnly lt Size Precision gt linesearch_tolerance Tolerance used to determine if the linesearch is complete Defaults to square root of machine precision Definition at line 26 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point and ConjugateGradient
152. eRef gt gt get_regions const Sublmage lt double gt amp log_ratios Definition at line 260 of file multispot5_gui cc Referenced by mmain gvar3 lt double gt radius radius 0 1 Set the liklihood ratio threshold spot density prior same thing double threshold GV3 get lt double gt threshold 0 1 int edge GV3 get lt int gt edge 0 1 Threshold image Image lt byte gt thresholded log_ratios size 0 for int r 0 r lt thresholded size y r for int c 0 c lt min thresholded size x edge c thresholded r c 255 log_ratios r c gt threshold Dilate Image lt byte gt dilated morphology thresholded getDisc radius Morphology B inaryDilate lt byte gt transform dilated begin dilated end dilated begin bindlst multiplies lt int gt 255 Connected components of dilated image vector lt ImageRef gt fg for int r 0 r lt thresholded size y r for int c 0 c lt min thresholded size x edge c if dilated r c fg push_back ImageRef c r vector lt vector lt ImageRef gt gt regions connected_components fg regions return regions 11 12 2 8 void mmain int argc char xx argv Definition at line 295 of file multispot5_gui cc References boundingbox draw_bbox get_regions load_and_normalize_images scale watch_update and watch_var Referenced by main Generated on Wed Nov 28 2012 15 39 12
153. e_and_fit_spots ims regions cluster_to_show log_ratios GV3 get lt string gt save_spots graphics xstart_processing 0 if show_thresholded glDrawPixels reg else glDrawPixels scale log_ratios centre range if cbox second ImageRef_zero draw_bbox cbox Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5 gui cc File Reference 275 if win has_events vector lt GLWindow Event gt e win get_events e for unsigned int i 0 i lt e size i if e i type GLWindow Event RESIZE ImageRef newsize e i size ImageRef imsize log_ratios size ImageRef size imsize float old_r float imsize x imsize y float new_r float newsize x newsize y glViewport 0 0 newsize x newsize y glMat rixMode GL_PROJECTION glLoadIdentity double zoom if new_r gt old_r Then use the y axis zoom newsize y float size y else zoom newsize x float size x glOrtho 5 zoom newsize x 1 5 zoom newsize y 1 5 zoom 5 zoom 1 1 glPixelZoom zoom zoom glRasterPos2f 0 0 win swap_buffers usleep 100000 11 12 2 9 int main int argc char xx argv Definition at line 459 of file multispot5_gui cc References mmain try mmain argc argv catch Exceptions All e cerr lt lt Fatal error lt lt e what lt lt endl Generated on Wed Nov 28 2012 15 39 12 for
154. ebian based system or a system on which the command deboot strap works and root access Tha automatic build system makes use of cLAPACK rather than LAPACK as the LA PACK part is not speed critical and it is easier to build CLAPACK without additional external dependencies To build run the following commands First make a tar gz of the source code bash make_dist sh Now execute the automatic build process bash build_plugin sh The build takes a long time and you should probably edit build_plugin sh to point the installer at an Ubuntu mirror somewhere near to where you are At the end of the build the script will print out a directory name like dist 123908 A fresh copy of the plugin DLL and shared object will be present in that directory named Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 3 Module Index 14 3 Module Index 3 1 Modules Here is a list of all modules Useful debugging functions General utility functions Generic hidden Markov model solver Classes related to the ImageJ Plugin Storm classes Storm imagery classes basic image processing Storm classes specific to multispot processing 4 Namespace Index 4 1 Namespace List Here is a list of all namespaces with brief descriptions SampledMultispot 5 Class Index 5 1 Class Hierarchy This inheritance list is sorted roughly but not completely alphabetically AdvancedDialog ClassicGlow CloseButtonListener Conjuga
155. ecision gt iterate 10 4 4 4 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt h Conjugate vector to be searched along in the next call to iterate Definition at line 14 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt init and ConjugateGradientOnly lt Size Precision gt update_vectors_ PR 10 4 4 5 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt minus_h negative of h as this is required to be passed into a function which uses references so can t be temporary Definition at line 15 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt init and ConjugateGradientOnly lt Size Precision gt update_vectors_ PR 10 4 4 6 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt old_g Gradient vector used to compute h in the last call to iterate Definition at line 16 of file conjugate_gradient_only h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 91 Referenc
156. ed Definition at line 183 of file multispot5 cc 10 11 4 10 const Matrix lt 3 gt DataForMCMC A protected inherited Definition at line 184 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 12 SampledMultispot GibbsSampler Class Reference 146 10 11 4 11 const Vector lt 3 gt DataForMCMC pi protected inherited Definition at line 185 of file multispot5 cc 10 11 4112 MT19937 amp DataForMCMC rng protected inherited Definition at line 186 of file multispot5 cc The documentation for this class was generated from the following file e multispot5 cc 10 12 SampledMultispot GibbsSampler Class Reference Draw samples from the spot states given the spots positions and some data include lt sampled_multispot h gt Public Member Functions e GibbsSampler const vector lt vector lt double gt gt amp pixel_intensities_ const vector lt vector lt double gt gt amp spot_intensities_ const vector lt Vector lt 4 gt gt amp spots_ const Matrix lt 3 gt A_ const Vector lt 3 gt pi_ double variance_ int sample_iterations_ void set_variance double v e void reset template lt class T gt void next T amp rng const vector lt vector lt State gt gt amp sample const const vector lt vector lt double gt gt amp sample_intensities const Private Attributes e const vector lt vector lt double gt gt amp pixel_intens
157. ed by ConjugateGradientOnly lt Size Precision gt update_vectors_PR 10 4 4 7 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt old_h Conjugate vector searched along in the last call to iterate Definition at line 17 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt update_vectors_PR 10 4 4 8 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt x Current position best known point Definition at line 18 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt init FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_modifying_model 10 4 4 9 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt old_x Previous point not set at construction Definition at line 19 of file conjugate_gradient_only h 10 4 4 10 template lt int Size 1 class Precision double gt Precision ConjugateGradientOnly lt Size Precision gt tolerance Tolerance used to determine if the optimization is complete Defaults to square root of machine precision Definition at line 21 of file conjugate_gradient_only h Referenced by Conjugat
158. ee FitSpots for naming of variables Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 258 class Kahan Class implementing the Kahan summation algorithm to allow accurate summation of very large numbers of doubles class NegativeFreeEnergy Class for computing the negitve free energy using thermodynamic integration struct IndexLexicographicPosition lt Cmp First gt Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots struct SampledBackgroundData Closure holding image data generated using samples drawn from the model struct SpotNegProbabilityDiffWithSampledBackground Compute the derivative of the negative log probability with respect to the parameters of one spot given some samples of the other spots class FreeEnergyHessian Class for computing the Hessian of the negative free energy struct LessSecond Comparator functor for the first element of a std pair class FitSpots Mega class which actually does the meat of the spot fitting Defines define TIME X Functions auto_ptr lt UserlnterfaceCallback gt null_ui auto_ptr lt FitSpotsGraphics gt null_graphics Vector spots_to_Vector const vector lt Vector lt 4 gt gt amp s vector lt Vector lt 4 gt gt spots_to_vector const Vector lt gt amp s Image lt byte gt scale_to_bytes const Image lt float gt amp im float lo float hi I
159. ee add_remove optimizer hessian_inner_samples for an explanation of the meaning add_remove hessian outer_samples 100 add_remove hessian inner_samples 1000 Number of repeats of step 3 add_remove tries 10 TITTTTTTIAAATAAT TAT TT TTT TTA TATA TATA ATTA AAA AAT Image preprocessing See Modelling the image in supplementary methods The image is normalized to locally zero mean and globally unit standard deviation Skip the mean removal step if this is set to 1 This is really only for debugging Do not change preprocess skip 0 Low pass filter used for mean removal has has this sigma preprocess lpf 5 TILITITTTTTTSTTTTT TATA TAIT TTTI TT TTTATAT TT Initial spot placement Options are uniform place spots uniformly over the area of interest intensity_sampled place spots more densely in brighter regions intensity_sampled generally leads to slightly faster convergence placement intensity_sampled TILISTTTTTTIITILTTT TTA TTT TTT ATI TTT TATA TAT TTA ATT 44 Things after here do not do anything Things after here have no effect in the plugin but are required if this config file is to be used in the standalone program Instead of calculating the scaling of the initial image to set the standard deviation to 1 use a fixed scaling This is for debugging purposes and is very unlikely to be useful otherwise preprocess fixed_scaling 0 Threshold the log_
160. eeBDialog getFirstFrame inline package Definition at line 519 of file three_B java References getFirstFrameField and parselnt Referenced by textValueChanged return parseInt getFirstFrameField getText 10 37 3 12 int ThreeBDialog getLastFrame inline package Definition at line 524 of file three_B java References getLastFrameField and parselnt Referenced by textValueChanged return parseInt getLastFrameField getText Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 232 10 37 3 13 int ThreeBDialog getCount inline package Definition at line 529 of file three_B java References count_ Referenced by textValueChanged return count_ 10 37 3 14 void ThreeBDialog textValueChanged TextEvente inline Definition at line 534 of file three_B java References bg c getCount getFirstFrame getFirstFrameField getFWHM get FWHMField getLastFrame getLastFrameField getPixelSize getPixelSizeField getSpots getSpotsField nframes and npix Referenced by ThreeBDialog boolean long_run false String err 012345678901234567890123456789012345678901234567890 if getCount gt 1000 long_run true err err Warning large area selected n3B will run very slowly n if npix lt 2500 err err Warning image is very small Fitting may be bad because nimage
161. ee_B java Referenced by Util getFileName and three_B run 10 29 2 2 StringSPair b package Definition at line 40 of file three_B java Referenced by Util getFileName and three_B run The documentation for this class was generated from the following file e three_B java 10 30 Spot Class Reference Basic spot class simply contains coordinates Package Functions e Spot e Spot double xx double yy Package Attributes e double x e double y Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 30 Spot Class Reference 202 10 30 1 Detailed Description Basic spot class simply contains coordinates Definition at line 648 of file three_B java 10 30 2 Constructor amp Destructor Documentation 10 30 2 1 Spot Spot inline package Definition at line 651 of file three_B java 10 30 2 2 Spot Spot double xx double yy inline package Definition at line 655 of file three_B java References x and y X XX yyy 10 30 3 Member Data Documentation 10 30 3 1 double Spot x package Definition at line 650 of file three_B java Referenced by ThreeBLoader run ThreeBRunner send_new_points and Spot 10 30 3 2 double Spot y package Definition at line 650 of file three_B java Referenced by ThreeBLoader run ThreeBRunner send_new_points and Spot The documentation for this class was generated from the following file e three_B java G
162. efinition at line 254 of file multispot5_gui cc 10 14 3 Member Function Documentation 10 14 3 1 void GraphicsGL glDrawCircle const Vector lt 2 gt amp p floatr inline private Generate circle linesegments as pair of vertices for GL_LINES Parameters p circle centre circle radius Definition at line 129 of file multispot5_gui cc float theta 0 for 77 glVertex p r makeVector cos theta sin theta theta 0 01 if theta gt M_PI 2 break glVertex p r makeVector cos theta sin theta glVertex p r makeVector 1 0 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 161 10 14 3 2 void GraphicsGL set_ GL_zoom_size ImageRef size double scale private inline Set up a GL window so that glDrawPixels and glVertex line up and also so that glDraw Pixels is zoomed Parameters size Window size scale Zoom level Definition at line 147 of file multispot5_gui cc double right size x double bottom size y double my_scale scale 1MatrixMode GL_MODELVIEW glLoadIdentity Q glMatrixMode GL_PROJECTION glLoadidentity glOrtho 0 5 right 5 bottom 5 is the top left glRasterPos2f 5 5 glPixelZoom scale scale y Dy I 1 If the origin video is now the same way as upside down to graphics 10 14 3 3 v
163. efinition at line 29 of file sampled_multispot h 10 32 3 14 bool SampledMultispot SpotWithBackgroundMasked type_has_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp inline Definition at line 30 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 215 10 32 3 15 double SampledMultispot SpotWithBackgroundMasked log int state int obs const inline Definition at line 135 of file sampled_multispot h 10 32 3 16 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked diff_log int state int obs const inline Definition at line 146 of file sampled_multispot h vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt hessian pixels size 10 32 3 17 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked hess log int state intobs const inline Definition at line 157 of file sampled_multispot h 10 32 3 18 double SampledMultispot SpotWithBackgroundMasked get_val double d inline Definition at line 13 of file sampled_multispot h 10 32 3 19 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked get_diff double inline Definition at line 14 of file sampled_multispot h 10 32 3 20 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked get_hess double inline Definition at line 15 of file sampled_mult
164. efinition at line 918 of file three_B java References FloatSliderWithBox addChangeListener blur_fwhm blur_pos buttons buttons_pos canvas canvas_pos closeButton complete exportButton exportBut tonColor filename linear_reconstruction pixel_size_in_nm pixel_size_pos pts re construct reconstructed_pixel_size ThreeBRunner register roi set_status set_ time FloatSliderWithBox setFormat FloatSliderWithBox setUnits status status_ pos stopButton tbr time_msg and time_pos Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 98 Constract superclass super filename_ thr tbr_ filename filename_ roi roi_ pixel_size_in_nm ps_ pts new ArrayList lt Spot gt Now generate the dialog box complete new Panel new GridBagLayout Create the image viewer linear_reconstruction new ImagePlus linear_reconstruction setProcessor reconstruct canvas new ImageCanvas linear_reconstruction Make the image scrollable This seems to work if the correct cargo cul ting is performed with the gridbaglayout fill constraints I don t really un derstand why ScrollPane scroll new ScrollPane scroll add canvas complete add scroll canvas_pos Create the status message status new JLabel if tbr null set_status Running else set_status Using loaded data complete add stat
165. els pixels model_2 spot model2_spot_pixels spot cout lt lt Done optimizing for model selection n Which model to keep int keep original Compute position prior and we might be able to reject it really qu ickly here bool zero_prior use_position_prior amp amp allowed_area count ir_rounde d model_2 spot slice lt 2 2 gt 0 if zero_prior Model 2 went bad so we clearly keep model 1 keep 1 else The position prior is independent Compute the difference model2 modell This is only valid if model2 is in the valid region double position_log_prior_model2_minus_modell1 if use_position_prior position_log_prior_model2_minus_modell model_2 size mo del_l size In position_prior else position_log_prior_model2_minus_modell 0 Integrate model_2 First compute the Hessian since this might go wrong FreeEnergyHessian hesscomputer data_for_h_mcmc Matrix lt 4 gt hess hesscomputer hessian model_2 spot Use turbohess here since it is much faster as the backwards sa mpling step is fast We expect this hessian to be really quite different if the spo t has moved from a long way away since the sampling will have changed dramatica lly Get some samples with Gibbs sampling vector lt vector lt vector lt State gt gt gt sample_list N spot fram e list of samples drawn using Gibbs sampling vector lt vector lt vector lt double gt gt
166. elta A pi B O fft t reset SpotWithBackground B2 cutout_current_sample_intensities cutout_s pot_intensities cutout_pixel_intensities variance std vector lt array lt double 3 gt gt delta2 forward_algorithm_delta A pi B2 O ff_cutt t reset SpotWithBackgroundMasked B3 current_sample_intensities spot_intensities k pixel_intensities variance spot_pixels k swo t reset forward_algorithm_delta2 lt 3 gt A pi B3 O delta3 f _maskedt t reset xfor unsigned int i 0 i lt delta size i cout precision 20 cout setf cout scientific std cout lt lt delta i 0 lt lt lt lt delta i 1 lt lt lt lt delta i 2 lt lt std endl std cout lt lt delta2 i 0 lt lt lt lt delta2 i 1 lt lt lt lt del ta2 i 2 lt lt std endl cout lt lt endl std exit 1 x current_sample k backward_sampling lt 3 State T gt A delta3 rng r bs t reset Put the newly sampled spot in add_spot current_sample_intensities spot_intensities k current _sample k spot_pixels k add t reset cout lt lt remove lt lt remove lt lt cut lt lt cut lt lt swb lt lt swb lt lt ff_mas k lt lt ff_masked lt lt bs lt lt bs lt lt add lt lt add lt lt endl Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2
167. enced by EControlPanel export_reconstruction_as_ij and EControlPanel update_ canvas return value 10 10 3 6 double FloatSliderWithBox get_value_from_slider inline Definition at line 791 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 10 FloatSliderWithBox Class Reference 139 References max min reciprocal slider and steps Referenced by FloatSliderWithBox SliderChanged stateChanged if reciprocal return 1 slider getValue 1 0 steps max min min else return slider getValue 1 0 steps max min min 10 10 3 7 double FloatSliderWithBox get_value from_text inline Definition at line 798 of file three_B java References number Referenced by FloatSliderWithBox TextChanged actionPerformed return Double parseDouble number getText 10 10 4 Member Data Documentation 10 10 4 1 JSlider FloatSliderWithBox slider private Definition at line 687 of file three_B java Referenced by addChangeListener FloatSliderWithBox get_value_from_slider and setValue 10 10 4 2 JTextField FloatSliderWithBox number private Definition at line 688 of file three_B java Referenced by FloatSliderWithBox get_value_from_text and setValue 10 10 4 3 JLabel FloatSliderWithBox label private Definition at line 689 of file three_B java Referenced by FloatSliderWithBox and setValue Generated on
168. endl Precompute the intensities for all spot pixels Model 2 is always one longer than model 1 and differs only on the extra element vector lt vector lt double gt gt model2_spot_intensities spot pixel for unsigned int i 0 i lt model_2 size i model2_spot_intensities push_back compute_spot_intensity pixels model_2 i Which pixels does each spot have vector lt vector lt int gt gt model2_spot_pixels model_2 size spot pix el for unsigned int s 0 s lt model_2 size s Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 121 get_spot_pixels pixels model_2 s model2_spot_pixels s Optimize spot cout lt lt Optimizing spot for model selection n Get some samples with Gibbs sampling vector lt vector lt vector lt State gt gt gt sample_list N spot frame list of samples drawn using Gibbs sampling vector lt vector lt vector lt double gt gt gt sample_intensities sample f rame pixel GibbsSampler2 sampler pixel_intensities model2_spot_intensities model_2 model2_spot_pixels A pi variance sample_iterations for int i 0 i lt add_remove_opt_samples i sampler next rng sample_list push_back sampler sample sample_intensities push_back sampler sample_intensities ui perhaps_stop First remove the spot from all the samples for unsigned int i 0 i lt sample_l
169. enerated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 31 SpotNegProbabilityDiffWithSampledBackground Struct Reference 203 10 31 SpotNegProbabilityDiffWithSampledBackground Struct Reference Compute the derivative of the negative log probability with respect to the parameters of one spot given some samples of the other spots Inheritance diagram for SpotNegProbabilityDiffWithSampledBackground SampledBackgroundData SpotNegProbability DiffWithSampledBackground Public Member Functions SpotNegProbabilityDiffWithSampledBackground const SampledBackgroundData amp d e Vector lt 4 gt operator const Vector lt 4 gt amp spot const Public Attributes e const vector lt vector lt vector lt double gt gt gt amp sample_intensities_without_spot e const vector lt vector lt double gt gt amp pixel_intensities const vector lt ImageRef gt pixels e double mu_brightness double sigma_brightness e double mu_blur double sigma_blur e const Matrixx 3 gt A e const Vector lt 3 gt pi e double variance const vector lt int gt O 10 31 1 Detailed Description Compute the derivative of the negative log probability with respect to the parameters of one spot given some samples of the other spots Definition at line 567 of file multispot5 cc 10 31 2 Constructor amp Destructor Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 31 SpotNegProbabilityDiff
170. ent valid_pixels begin valid_pixels end LessSecond gt first spots push_back makeVector log_normal_mode intensity_mu intensity_si gma log_normal_mode blur_mu blur_sigma p x p y for unsigned int j 0 j lt disc size j valid_pixels erase p disc j Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 11 multispot5 h File Reference 266 This line allows extra spots to be placed down around each spot already put down This is a shocking hack and jenerally very unpleasant double extra_r GV3 get lt double gt extra_spots 0 1 vector lt ImageRef gt extra getDisc extra_r vector lt Vector lt 4 gt gt more_spots for unsigned int i 0 i lt extra size i if extra i ImageRef_zero for unsigned int j 0 j lt spots size j more_spots push_back spots j makeVector 0 0 extra i x extra i y 2xextra_r 1 copy more_spots begin more_spots end back_inserter spots else Vector lt gt loaded_spots GV3 get lt Vector lt gt gt spots manual_spots i if loaded_spots size 4 0 cerr lt lt Loaded spot size is not a multiple of 4 n exit 1 else spots spots_to_vector loaded_spots Initialize the MT19937 RNG from a seed shared_ptr lt MT19937 gt rng new MT19937 rng gt simple_seed GV3 get lt int gt seed 0 1 Load in a checkpoint precise RNG state iteration and pass int start_iterati
171. er class which triggers a complete redraw Since all redraws are pretty much equal there is no need to distinguish them Definition at line 666 of file three_B java 10 28 2 Constructor amp Destructor Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 29 SPair Class Reference 200 10 28 2 1 SomethingChanges SomethingChanges EControlPanelc_ inline Definition at line 669 of file three_B java References c 10 28 3 Member Function Documentation 10 28 3 1 void SomethingChanges stateChanged ChangeEvente inline Definition at line 675 of file three_B java References c and EControlPanel send_update_canvas_event c send_update_canvas_event 10 28 4 Member Data Documentation 10 28 4 1 EControlPanel SomethingChanges c private Definition at line 668 of file three_B java Referenced by SomethingChanges and stateChanged The documentation for this class was generated from the following file e three_B java 10 29 SPair Class Reference Utility class to hold a pair of strings Public Attributes e String a Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 30 Spot Class Reference 201 Package Attributes e String b 10 29 1 Detailed Description Utility class to hold a pair of strings Definition at line 38 of file three_B java 10 29 2 Member Data Documentation 10 29 2 1 String SPair a Definition at line 40 of file thr
172. errors because if the file is missing from the JAR archive then extreme badness has happened and have no idea how to recover Parameters in File to be read Returns file contents in a string Definition at line 53 of file three_B java Referenced by ThreeBHelp run and three_B run try final char buffer new char 100 StringBuilder out new StringBuilder int read do read in read buffer 0 buffer length if read gt 0 out append buffer 0 read while read gt 0 return out toString catch java io IOException err return What do we do here The documentation for this class was generated from the following file e three_B java 11 File Documentation 11 1 ClassicGlow java File Reference Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 2 conjugate_gradient_only h File Reference 253 Classes e class ClassicGlow Plugin implementing the classic glow hot LUT which seems to be missing from ImageJ 11 2 conjugate _gradient_only h File Reference include lt TooN TooN h gt include lt utility gt include lt cstdlib gt Classes struct ConjugateGradientOnly lt Size Precision gt Class for performing optimization with Conjugate Gradient where only the derivatives are available 11 3 debug cc File Reference Debugging bits Functions e Image lt byte gt scale_to_bytes const Image lt float gt
173. es class Btype class Otype gt std pair lt double TooN Vector lt Btype NumParameters gt gt forward_algorithm_deriv TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 30 e template lt int States class Btype class Otype gt std vector lt std tr1 array lt double States gt gt forward_algorithm_delta TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O e template lt int States class Btype class Otype gt void forward_algorithm_delta2 TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O std vector lt std tr1 array lt double States gt gt amp delta e template lt int States class Btype class Otype gt std pair lt std vector lt std tr1 array lt double States gt gt std vector lt std tr1 array lt double States gt gt gt forward_backward_algorithm TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O e template lt class A class Rng gt int select_random_element const A amp v const double scale Rng amp rng e template lt int N class Rng gt int sample_unscaled_log std tr1 arra
174. es gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 7 LoadTestData java File Reference 255 e template lt int States class Btype class Otype gt std pair lt double TooN Vector lt Btype NumParameters gt gt forward_algorithm_deriv TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O e template lt int States class Btype class Otype gt std vector lt std tr1 array lt double States gt gt forward_algorithm_delta TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O template lt int States class Btype class Otype gt void forward_algorithm_delta2 TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O std vector lt std tr1 array lt double States gt gt amp delta e template lt int States class Btype class Otype gt std pair lt std vector lt std tr1 array lt double States gt gt std vector lt std tr1 array lt double States gt gt gt forward_backward_algorithm TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O e template lt class A class Rng gt int select_random_element
175. es known to be OK string rngline passline iterationline bool state_ok 0 State lines read in with flags of goodness string new_rngline new_passline new_iterationline bool new_rngline_ok 0 new_passline_ok 0 new_iterationline_ok 0 unsigned int lineno 0 bool doing_gvars 0 vector lt ImageRef gt pixels while in eof getline in line Se in tail break linenot if line ENDGVARLIST if doing_gvars throw LogFileParseError Spurious end of GVars doing_gvars 0 else if doing_gvars GUI ParseLine line else if line BEGINGVARLIST doing_gvars 1 if line substr 0 11 Iteration new_iterationline line new_iterationline_ok true else if line substr 0 4 PASS new_passline line if new_passline_ok Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 52 throw LogFileParseError Duplicate PASS on line xtoa lineno new_passline_ok true else if line substr 0 8 MT19937 new_rngline line if new_rngline_ok throw LogFileParseError Duplicate MT19937 on line xtoa linen o new_rngline_ok true else if line ENDCHECKPOINT if new_passline_ok amp amp new_rngline_ok amp amp new_iterationline_ok iterationline new_iterationline rngline new_rngline passline new_passline else throw LogFileParseError Reached checkpoint with miss
176. etailed Description 3B plugin cclass to bring up a basic help window Definition at line 17 of file ThreeBHelp java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 40 ThreeBLoader Class Reference 236 10 39 2 Member Function Documentation 10 39 2 1 void ThreeBHelp run String arg inline Definition at line 19 of file ThreeBHelp java References Util read String path getClass getResource img toString Reader htmlstream new InputStreamReader getClass getClassLoader get ResourceAsStream instructions html String html Util read htmlstream html html replaceAll img path JFrame w new JFrame 3B help JEditorPane 1 new JEditorPane try 1 setPage getClass getResource instructions html toString catch IOException e l1 resize new java awt Dimension 800 600 JScrollPane s new JScrollPane l JScrollPane VERTICAL_SCROLLBAR_ALWAYS JScrollPane HORIZONTAL_SCROLLBAR_NEVER java awt Dimension d new java awt Dimension 600 600 add s pack setSize d setVisible true zeae The documentation for this class was generated from the following file e ThreeBHelp java 10 40 ThreeBLoader Class Reference Plugin class to load up an old 3B run Public Member Functions e void run String arg Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 40 ThreeBLoader Class Reference 237 Private
177. for ThreeB by Doxygen 10 23 NullGraphics Class Reference 191 10 23 3 4 virtual void NullGraphics draw_pixels const std vector lt CVD ImageRef gt amp pix float r float g float b floata inline virtual Draw the pixel mask in an r g b a tuple colour Parameters pix mask red green 7 g b blue a alpha Implements FitSpotsGraphics Definition at line 81 of file multispot5 cc 10 23 3 5 virtual void NullGraphics draw_bbox const BBox amp bbox inline virtual Draw a bounding box Parameters bbox Box corners Implements FitSpotsGraphics Definition at line 82 of file multispot5 cc 10 23 3 6 virtual void NullGraphics glDrawCross const TooN Vector lt 2 gt amp p int size inline virtual Draw a cross Parameters p Position of cross size Size to draw cross Implements FitSpotsGraphics Definition at line 83 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 24 NullUICallback Class Reference 192 The documentation for this class was generated from the following file e multispot5 cc 10 24 NullUICallback Class Reference User interface callback class which does nothing Inheritance diagram for NullUICallback UserInterfaceCallback NullUICallback Private Member Functions e void per_spot int int int int vo
178. for ThreeB by Doxygen 11 12 multispot5_gui cc File Reference 273 GUI RegisterCommand watch watch_var GUI LoadFile multispot5 cfg int lastarg GUI parseArguments argc argv if lastarg gt argc cerr lt lt Specify the images to load n exit 1 Load the log_ratios image We will use this as a starting point for searching for spots Image lt double gt log_ratios try log_ratios img_load GV3 get lt string gt log_ratios 1 catch Exceptions All e cerr lt lt Error loading lt lt GV3 get lt string gt log_ratios lt lt e what lt lt endl exit 1 Vector lt 2 gt log_ratios_zoom GV3 get lt Vector lt 2 gt gt log_ratios_zoom 1 Load the raw data and then load the spot parameters vector lt string gt files argv lastarg argv argc vector lt Image lt float gt gt ims load_and_normalize_images files How far away from eash spot to look double spot_sigmas GV3 get lt double gt sigmas 0 1 gvar3 lt int gt cluster_to_show cluster_to_show 0 1 gvar3 lt int gt use_largest use_largest 0 1 vector lt vector lt ImageRef gt gt regions GLWindow win log_ratios size glEnable GL_BLEND glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glEnable GL_LINE_SMOOTH readline_in_current_thread line gt gvar3 lt bool gt start_processing process 0 1 gvar3 lt int gt show_thresholded
179. for ThreeB by Doxygen 11 13 multispot5 headless cc File Reference 278 GUI LoadFile multispot5 cfg int lastarg GUI parseArguments argc argv if lastarg gt argc cerr lt lt Specify the images to load n exit 1 vector lt string gt files argv lastarg argv argc Save this now since the de checkpointing code will kl0bber it when it reloads the gvars string save_spots_file GV3 get lt string gt save_spots 1 string checkpoint_file GV3 get lt string gt load_checkpoint 1 if checkpoint_file Load and de checkpointing ifstream chk open_or_die chk checkpoint_file StateParameters p try p parse_log_file chk catch LogFileParseError e cerr lt lt SI TEH FUXOR110NEone oneleven lt lt e what lt lt endl exit 1 vector lt Image lt float gt gt ims load_and_normalize_images files Restore kl0bbered variable GV3 get lt string gt save_spots save_spots_file ofstream save_spots open_or_die save_spots save_spots_file fit_spots_new ims p save_spots null_graphics j vector lt Image lt float gt gt ims load_and_normalize_images files Load the log_ratios image We will use this as a starting point for searching for spots Image lt double gt log_ratios try log_ratios img_load GV3 get lt string gt log_ratios 1 catch Exceptions All e cerr lt lt Error loading
180. function updates nothing Definition at line 215 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt iterations ConjugateGradientOnly lt Size Precision gt max_iterations ConjugateGradientOnly lt Size Precision gt new_g and ConjugateGradientOnly lt Size Precision gt tolerance Referenced by ConjugateGradientOnly lt Size Precision gt iterate Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 88 using std abs return iterations gt max_iterations norm_inf new_g lt tolerance 10 4 3 5 template lt int Size 1 class Precision double gt void ConjugateGradientOnly lt Size Precision gt update_vectors_PR const TooN Vector lt Size gt amp grad inline After an iteration update the gradient and conjugate using the Polak Ribiere equations This function updates g e old g eh old_h Parameters grad The derivatives of the function at x Definition at line 229 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt g ConjugateGradientOnly lt Size Precision gt h ConjugateGradientOnly lt Size Precision gt minus_h ConjugateGradientOnly lt Size Precision gt old_g and ConjugateGradientOnly lt Size Precision gt old_h Referenced by ConjugateGradientOnly lt Size Precision g
181. getContentPane add complete This class knows how to handle window close events Don t close the window by default so we can try to bring up a confirmation dialog addWindowListener this setDefaultCloseOperation DO_NOTHING_ON_CLOSE Cargo culting pack setVisible true validate Start the 3B thread if we have one to run if tbr null tbr register this Thread t new Thread tbr Costaren 10 6 3 Member Function Documentation 10 6 3 1 GridBagConstraints EControlPanel canvas_pos inline private Definition at line 1022 of file three_B java Referenced by EControlPanel GridBagConstraints g new GridBagConstraints g gridx 0 g gridy 0 g fill GridBagConstraints BOTH Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 100 g weightx 100 g weighty 100 return g 10 6 3 2 GridBagConstraints EControlPanel status_pos _ inline private Definition at line 1033 of file three_B java Referenced by EControlPanel GridBagConstraints g new GridBagConstraints g gridx 0 g gridy 1 g anchor GridBagConstraints FIRST_LINE_START g fill GridBagConstraints BOTH return g 10 6 3 3 GridBagConstraints EControlPanel time_pos inline private Definition at line 1043 of file three_B java Referenced by EControlPanel GridBagConstraints g new GridBagConstraints g gridx
182. gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt T for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt spot_intensities size ptt current_sample_intensities frame p intensity spot_intensitie s p Add and remove a spot only over a mask template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities r lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask const vecto for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities mask p template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt mask size ptt current_sample_intensities fra
183. h ConjugateGradientOnly lt Size Precision gt size ConjugateGradientOnly lt Size Precision gt tolerance and ConjugateGradientOnly lt Size Precision gt x Referenced by ConjugateGradientOnly lt Size Precision gt ConjugateGradientOnly ConjugateGradientOnly lt Size Precision gt init and FitSpots try_modifying_model using std numeric_limits x start Start with the conjugate direction aligned with the gradient g deriv h g minus_h h tolerance sqrt numeric_limits lt Precision gt epsilon max_iterations size 100 linesearch_tolerance sqrt numeric_limits lt Precision gt epsilon linesearch_epsilon le 20 iterations 0 10 4 3 2 template lt int Size 1 class Precision double gt template lt class Deriv gt void ConjugateGradientOnly lt Size Precision gt init const TooN Vector lt Size gt amp start const Deriv amp deriv inline Initialise given a starting point and a functor for computing derivatives Parameters start starting point deriv derivative computing functor Definition at line 71 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt init init start deriv start Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 85 10 4 3 3 template lt int Size 1 class Precision
184. h File Reference Utility bits include lt cvd image h gt include lt vector gt include lt string gt include lt cstring gt include lt cerrno gt include lt cstdlib gt include lt utility gt Typedefs e typedef std pair lt CVD lmageRef CVD lmageRef gt BBox Functions e double sign double x e float sq float f e double sq double f const std vector lt CVD Sublmage lt float gt gt sub_images const std vector lt CVD lmage lt float gt gt amp im CVD ImageRef pos CVD lmageRef size e std pair lt CVD lmageRef CVD lmageRef gt boundingbox const std vector lt CVD ImageRef gt amp all_spots e template lt class Stream gt void open_or_die Stream amp save_spots const std string amp save_spots_file 11 24 1 Detailed Description Utility bits Definition in file utility h 11 24 2 Function Documentation 11 24 2 1 double sq double f inline This is an overloaded member function provided for convenience It differs from the above function only in what argument s it accepts Definition at line 34 of file utility h return fxf Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen
185. haps jbyte pix env gt GetByteArrayElements data NULL BasicImage lt jbyte gt pix_im pix ImageRef cols rows j Image lt jbyte gt im im copy_from pix_im This frees the pixels if copied or releases a reference env gt ReleaseByteArrayElements data pix JNI_ABORT return im 8 4 1 3 Image lt float gt get_local_copy_of_image JNIEnv env jfloatArray data int rows int cols Get a local C copy of an image from a jfloatArray coming from the guts of Imageu Definition at line 156 of file multispot5_jni cc This takes a copy of the pixels perhaps Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 4 Classes related to the ImageJ Plugin 45 float pix env gt GetFloatArrayElements data NULL BasicImage lt float gt pix_im pix ImageRef cols rows Image lt float gt im im copy_from pix_im This frees the pixels if copied or releases a reference env gt ReleaseFloatArrayElements data pix JNI_ABORT return im 8 4 1 4 JNIEXPORT void JNICALL Java_ThreeBRunner_call JNIEnv env jobject jthis jstring cfg jobjectArray images jbyteArray mask_data jint n_images jint rows jint cols jstring file Run the 3B code Definition at line 176 of file multispot5_jni cc References JNIUserInterface fatal get_local_copy_of_image get_string null_graphics and JNlUserInterface send_message istringstream config get_string env cfg GUI ParseStream
186. he configuration file and advanced settings for further details You will probably want to change e blur mu This is the prior over spot size which is how the pixel size and microscope FWHM are represented Some example values for a FWHM of 300nm pix at 160 and 100 nm pix and for a FWHM of 270nm at 79nm per pixel If you have significantly largre or smaller pixels the performance may be de graded e placement uniform num_spots This is the initial number of spots to be placed down Eventually the algorithm will converge to a reasonable number of spots even if this value is far off The default value 15 is appropriate given the small area and dimness of the sample data You will want to increase this number for larger areas of markup and relatively brighter regions If this number is more than 1000 then the algorithm will run very slowly and may take several days Note that variables specified on the commandline override all variables in the configu ration file The program can read FITS BMP PPM and PGM images Depending on how it has been compiled it can also read TIFF PNG and JPEG images The program cannot work on multi image TIFF files ImageJ can be used to split a multi image TIFF into a collection of single image files All the images loaded must be the same size 1 4 1 3 Extracting and visualising the data The output file in this case test _data results txt containing the results is in a format unsuitable for
187. i 0 i lt l size 1 4 i cout lt lt l ix4 1 0 lt lt endl cout lt lt 1 ix4 1 1 lt lt endl cout lt lt 1 ix4 1 2 lt lt endl cout lt lt l ix4 1 3 lt lt endl p spots push_back makeVector atox lt double gt 1 ix4 1 0 spot atox lt double gt 1 ix4 1 1 spot atox lt double gt 1 i x4 1 2 spot atox lt double gt 1 i 4 1 3 spot else throw LogFileParseError Wrong number of elements in PASS line Set up the pixels oh god the pixels p pixels pixels return p 8 5 1 5 double brightness_motion_limit double mu double sigma bool not_one How far should steps in brightness be limited to Definition at line 1334 of file multispot5 cc References log_normal_std if not_one return log_normal_std mu sigma Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 54 else return 1 8 5 1 6 void fit_spots_new const vector lt Image lt float gt gt amp ims StateParameters amp p ofstream amp save_spots FitSpotsGraphics amp gr Wrapper function for using FitSpots Definition at line 2081 of file multispot5 cc References null_ui and FitSpots run Referenced by mmain auto_ptr lt UserInterfaceCallback gt ui null_ui FitSpots fit ims gr ui p save_spots fit run 8 5 1 7 void fit_spots_new const vector lt Image lt float gt gt amp ims StateParameters amp p ofstream
188. id per_modification int int int void per_pass int int const std vector lt TooN Vector lt 4 gt gt amp void perhaps_stop 10 24 1 Detailed Description User interface callback class which does nothing Definition at line 52 of file multispot5 cc 10 24 2 Member Function Documentation 10 24 2 1 void NullUICallback per_spot int iteration int pass int spot_num int total_spots inline private virtual This function is called once per spot in each pass The idea is to provide a display along the lines of Iteration 1 optimizing 2 complete Parameters iteration Iteration number Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 24 NullUICallback Class Reference 193 pass Pass number spot_num Spot currently being optimized total_spots Total number of spots to be optimized Implements UserlnterfaceCallback Definition at line 54 of file multispot5 cc 10 24 2 2 void NullUICallback per_modification int iteration int spot_num int total_spots inline private virtual This function is called once per spot in the modification phase The idea is to provide a display along the lines of Iteration 1 modifying 2 complete Parameters iteration Iteration number spot_num Spot currently being optimized total_spots Total number of spots to be optimized Implements UserlnterfaceCallback
189. iled Description Plugin implementing the classic glow hot LUT which seems to be missing from Imageu Definition at line 12 of file ClassicGlow java 10 2 2 Member Data Documentation 10 2 2 1 byte ClassicGlow red static package Definition at line 14 of file ClassicGlow java 10 2 2 2 byte ClassicGlow green static package Definition at line 15 of file ClassicGlow java 10 2 2 3 byte ClassicGlow blue static package Definition at line 16 of file ClassicGlow java The documentation for this class was generated from the following file e ClassicGlow java 10 3 CloseButtonListener Class Reference Close button issues a window close event Public Member Functions e CloseButtonListener JFrame fr e void actionPerformed ActionEvent e Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 3 CloseButtonListener Class Reference 81 Private Attributes JFrame f 10 3 1 Detailed Description Close button issues a window close event Actual closing logic is then done in the close event handler Definition at line 837 of file three_B java 10 3 2 Constructor amp Destructor Documentation 10 3 2 1 CloseButtonListener CloseButtonListener JFrame fr inline Definition at line 840 of file three_B java References f 10 3 3 Member Function Documentation 10 3 3 1 void CloseButtonListener actionPerformed ActionEvente inline Definition at line 846 of file three_B java
190. ims StateParameters amp p ofstream amp save_spots FitSpotsGraphics amp gr void fit_spots_new const vector lt Image lt float gt gt amp ims StateParameters amp p ofstream amp save_spots FitSpotsGraphics amp gr UserlnterfaceCallback amp ui 11 10 1 Detailed Description Fit spots to the data Definition in file multispot5 cc 11 10 2 Define Documentation 11 10 21 define TIME X Definition at line 39 of file multispot5 cc Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes 11 10 3 Function Documentation 11 10 3 1 Matrix lt 4 gt sampled_background_spot_hessian_ffbs const Vector lt 4 gt amp spot const SampledBackgroundData amp d int bs_iterations MT19937 amp rng Compute the Hessian of the log probability The background is sampled rather sparsely and the spot in question is sampled much more densely using FFBS Parameters spot Spot parameters d Background brightness from other spots bs_iterations Exter backward sampling iterations rng Random number generator Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 260 Returns the Hessian of the log probability around the spot Definition at line 742 of file multispot5 cc References SampledBackgroundData A SampledMultispot compute_spot_intensity SampledMultispot compute_spot_intensity_hessian diff_log_log_no
191. ing data it xtoa new_iterationline_ok pa xtoa new_passline_ok rg xtoa new_rngline_ok on line xtoa lineno Don t reset iteration since it only appears once for each entire set of passes new_rngline_ok 0 new_passline_ok 0 state_ok true else if line substr 0 7 PIXELS vector lt string gt 1 split line if l size 1 2 0 int n l size 1 2 pixels resize n j for int i 0 i lt n i pixels i x atox lt int gt l i 2 1 0 pixels pixels i y atox lt int gt l i 2 1 1 pixels else throw LogFileParseError Bad PIXELS line if state_ok throw LogFileParseError No state found if pixels size 0 throw LogFileParseError No pixels or pixels is empty Now parse the lines StateParameters p Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 53 vector lt string gt 1 Parse the iterations l split iterationline p iteration atox lt int gt 1 1 iteration Parse the random number generator p rng shared_ptr lt MT19937 gt new MT19937 istringstream rng_s rngline try p rng gt read rng_s catch MT19937 ParseError p throw LogFileParseError Error parsing MT19937 Parse PASS and the listing of spots l split passline if l size 1 4 0 p pass atox lt int gt 1 0 substr 4 pass for unsigned int
192. ing different sets of a few hun dred frames for the same area separately Even with parallelisation the large number of frames will make it time consuming to run If you simply want to know what the structure is like we would suggest using a method such as QuickPALM which are very fast in comparison 1 2 1 2 High density fixed cell datasets These datasets are of fixed cells but have multiple fluorophores overlapping in each frame You may acquire this type of dataset if the system you use has a fluorophore which cannot be photoswitched or the blinking properties of which cannot be tuned over a wide enough range using the embedding medium or if your light source is not powerful enough to drive most of the fluorophores into the non emitting state In fixed samples labelled with fluorescent proteins there will in our experience be almost no blinking present and 3B will therefore pick up bleaching While this can produce sat isfactory results the localisation is on single event on a high background and therefore the performance will be significantly degraded Some users choose to acquire this type of dense data if they have severe problems with drift particularly in the z direction as it drastically cuts the drift over the acquisition time However in the long term it is worth trying to improve the stability of such systems since z drift will impact the accuracy of all types of localisation measurement If you are unsure how badly your system
193. inition at line 66 of file multispot5_jni cc send_message sPrintf Iteration i modifying 4i1 iteration passestpasses 1 100 spot_num total_spots 10 16 3 3 virtual void JNIUserInterface per_pass int iteration int pass const std vector lt TooN Vector lt 4 gt gt amp spots inline virtual This function is called once each time PASS data is outputted It will allow the GUI to build up a reconstruction Parameters iteration Iteration number pass Pass number spots Data to be reconstructed Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 16 JNIUserInterface Class Reference 170 Implements UserlnterfaceCallback Definition at line 71 of file multispot5_jni cc Copy data into the correct format vector lt jfloat gt pts_data for unsigned int i 0 i lt spots size i pts_data push_back spots i 2 pts_data push_back spots i 3 Allocate a java array and copy data into it jfloatArray pts env gt NewFloatArray pts_data size j env gt SetFloatArrayRegion pts 0 pts_data size pts_data data Make the call jvalue pts_obj pts_obj 1 pts env gt CallVoidMethod ThreeBRunner_this send_new_points pts_obj Free the object env gt DeleteLocalRef pts 10 16 3 4 virtual void JNIUserInterface perhaps_stop inline virtual The user wishes to issue a stop instruction to the program perhaps don
194. ion 2 2 ee 152 10 13 2 Constructor amp Destructor Documentation 152 10 13 3 Member Function Documentation 153 10 13 4 Member Data Documentation 156 10 14GraphicsGL Class Reference 20 00004 158 10 14 1 Detailed Description 2 2 0 159 10 14 2 Constructor amp Destructor Documentation 160 10 14 3 Member Function Documentation 160 10 14 4 Member Data Documentation 165 10 15IndexLexicographicPosition lt Cmp First gt Struct Template Reference 165 10 15 1 Detailed Description 2 22 0 166 10 15 2 Constructor amp Destructor Documentation 166 10 15 3 Member Function Documentation 166 10 15 4 Member Data Documentation 167 10 16JNliUserlnterface Class Reference 0 4 167 10 16 1 Detailed Description 2 ee ee ee eee ee 168 10 16 2 Constructor amp Destructor Documentation 168 10 16 3 Member Function Documentation 168 10 16 4 Member Data Documentation 171 10 17Kahan Class Reference 0 000 ee eens 172 10 17 1 Detailed Description 2 2 0 172 10 17 2 Constructor amp Destructor Documentation 172 10 17 3 Member Function Documentation 173 10 17 4 Member Data Documentation 173 10 18LessSecond Struct
195. ion Namespaces namespace SampledMultispot Defines e define SWBG_NAME SpotWithBackground e define SWBG_NAME SpotWithBackgroundMasked define SWBG_HAVE_MASK Typedefs e typedef char State Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 16 sampled_multispot h File Reference 283 Functions 11 16 1 double SampledMultispot intensity double i double SampledMultispot intensity const pair lt double Vector lt 4 gt gt amp i template lt class T gt void SampledMultispot remove_spot vector lt vector lt double gt gt amp current_ sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample template lt class T gt void SampledMultispot add_spot vector lt vector lt double gt gt amp current_sample_ intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_ sample template lt class T gt void SampledMultispot remove_spot vector lt vector lt double gt gt amp current_ sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask template lt class T gt void SampledMultispot add_spot vector lt vector lt double gt gt amp current_sample_ intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_ sample const vector lt int gt amp mask
196. irtual void GraphicsGL draw_pixels const vector lt ImageRef gt amp pix float r float g float b float a inline virtual Definition at line 177 of file multispot5_gui cc glColor4f r g b a glPointSize 1 5 glBegin GL_POINTS glVertex pix glEnd Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 162 10 14 3 4 virtual void GraphicsGL draw_bbox const BBox amp bbox inline virtual Draw a bounding box Parameters bbox Box corners Implements FitSpotsGraphics Definition at line 186 of file multispot5_gui cc References draw_bbox draw_bbox bbox 10 14 3 5 virtual void GraphicsGL draw_krap const vector lt Vector lt 4 gt gt amp spots const Image lt byte gt amp im const BBox amp box int N Vector lt 4 gt s inline virtual Definition at line 192 of file multispot5_gui cc References draw_bbox glDrawPixels im glColor3f 1 0 0 draw_bbox box glLineWidth 0 3 glBegin GL_LINES for unsigned int i 0 i lt spots size i glColor4f 0 1 0 3 if int i N amp amp s 0 1e99 glDrawCircle s slice lt 2 2 gt s 1 else glDrawCircle spots i slice lt 2 2 gt spots i 1 glEnd glLineWidth 1 0 glBegin GL_LINES for unsigned int i 0 i lt spots size i glColorst ly 0y 0 if int i N glColor3f 1 1
197. ispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 216 10 32 3 21 double SampledMultispot SpotWithBackgroundMasked get_val const pair lt double Vector lt 4 gt gt amp d inline Definition at line 17 of file sampled_multispot h 10 32 3 22 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked get_diff const pair lt double Vector lt 4 gt gt amp d inline Definition at line 18 of file sampled_multispot h 10 32 3 23 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked get_hess const pair lt double Vector lt 4 gt gt amp inline Definition at line 19 of file sampled_multispot h 10 32 3 24 double SampledMultispot SpotWithBackgroundMasked get_val const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d inline Definition at line 21 of file sampled_multispot h 10 32 3 25 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked get_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d inline Definition at line 22 of file sampled_multispot h 10 32 3 26 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked get_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d inline Definition at line 23 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBa
198. ist size i remove_spot sample_intensities i model2_spot_intensities sp ot sample_list i spot Package up all the data SampledBackgroundData data sample_intensities pixel_intensities pixels intensity_mu intensity_sigma blur_mu blur_sigma A pi variance Derivative computer SpotNegProbabilityDiffWithSampledBackground compute_deriv data graphics draw_krap model_2 scale_to_bytes ave boundingbox pixels spot graphics swap Optimize spot s Optimize with the derivatives only since the actual probability is much harder to compute ConjugateGradientOnly lt 4 gt cg model_2 spot compute_deriv limit for int attempt 0 attempt lt add_remove_opt_retries attempt cout lt lt Attempt lt lt attempt lt lt of lt lt add_remove_opt_ret ries lt lt endl ui perhaps_stop Optimize with conjugate gradient while cg iterate compute_deriv ui perhaps_stop graphics draw_krap model_2 scale_to_bytes ave boundingbox pixels spot cg x Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 122 graphics swap Check for being at a saddle point no point checking on the last try All eigenvectors should be negative at a maximum WIF is this a bug WTF It was this if attempt lt add_remove_tries 1 if attempt lt add_remove_opt_retries 1 Matrix lt 4 gt hessian sampled_backgro
199. ities e const vector lt vector lt double gt gt amp spot_intensities const vector lt Vector lt 4 gt gt spots e const Matrix lt 3 gt A e const Vector lt 3 gt pi const double base_variance e double variance const int sample_iterations const int num_frames const int num_pixels const vector lt int gt O vector lt vector lt State gt gt current_sample e vector lt vector lt double gt gt current_sample_intensities Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 12 SampledMultispot GibbsSampler Class Reference 147 10 12 1 Detailed Description Draw samples from the spot states given the spots positions and some data Variable naming matches that in FitSpots Definition at line 188 of file sampled_multispot h 10 12 2 Constructor amp Destructor Documentation 10 12 2 1 SampledMultispot GibbsSampler GibbsSampler const vector lt vector lt double gt gt amp pixel_intensities_ const vector lt vector lt double gt gt amp spot_intensities_ const vector lt Vector lt 4 gt gt amp spots_ const Matrix lt 3 gt A const Vector lt 3 gt pi double variance_ int sample_iterations inline Definition at line 207 of file sampled_multispot h References assert_same_size and spot_intensities pixel_intensities pixel_intensities_ pixel_intensities frame pixels spot_intensities spot_intensities_ spot_intensities spot pixel
200. ixels spot Matrix lt 4 gt sum_hess_log Zeros Matrix lt 4 gt sum_diff2_log Zeros for unsigned int s 0 s lt d sample_intensities_without_spot size s SpotWithBackground B d sample_intensities_without_spot s spot_intensiti es d pixel_intensities d variance double prob Vector lt 4 gt diff Matrix lt 4 gt hess tie prob diff hess forward_algorithm_hessian d A d pi B d O sum_hess_log hess diff makeVector diff_log_log_normal spot 0 d mu_brightness d sigma_brightness diff_log_log_normal spot 1 d mu_blur d sigma_blur 0 0 sum_diff2_log diff as_col diff as_row Matrix lt 4 gt hess_log sum_hess_log d sample_intensities_without_spot size Matrix lt 4 gt diff2_log sum_diff2_log d sample_intensities_without_spot size i Add in the prior hess_log 0 0 hess_log_log_normal spot 0 d mu_brightness d sigma_brightness hess_log 1 1 hess_log_log_normal spot 1 d mu_blur d sigma_blur return hess_log diff2_log 11 10 3 3 Matrix lt 4 gt sampled_background_spot_hessian_FAKE const Vector lt 4 gt amp spot const SampledBackgroundData amp d Debugging function Not mathematically correct Do not use Definition at line 854 of file multispot5 cc References SampledBackgroundData A SampledMultispot compute_spot_intensity_ hessian forward_algorithm_hessian hess_log_log_normal SampledBackgroundData mu_ blur Sampled
201. j 10 11 3 2 MT19937 amp DataForMCMC get_rng const inline inherited Definition at line 189 of file multispot5 cc Referenced by NegativeFreeEnergy compute_with_mask and NegativeFreeEnergy operator return rng 10 11 4 Member Data Documentation 10 11 4 1 const vector lt ImageRef gt amp DataForMCMC pixels protected inherited Definition at line 179 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 11 FreeEnergyHessian Class Reference 145 10 11 4 2 const vector lt vector lt double gt gt amp DataForMCMC pixel_intensities protected inherited Definition at line 180 of file multispot5 cc 10 11 4 3 const double DataForMCMC mu_brightness protected inherited Definition at line 181 of file multispot5 cc 10 11 4 4 const double DataForMCMC sigma_brightness protected inherited Definition at line 181 of file multispot5 cc 10 11 4 5 const double DataForMCMC mu_blur protected inherited Definition at line 181 of file multispot5 cc 10 11 4 6 const double DataForMCMC sigma_blur protected inherited Definition at line 181 of file multispot5 cc 10 11 4 7 const double DataForMCMC variance protected inherited Definition at line 182 of file multispot5 cc 10 11 4 8 constint DataForMCMC samples protected inherited Definition at line 183 of file multispot5 cc 10 11 4 9 const int DataForMCMC sample_iterations protected inherit
202. jni cc 10 16 4 3 jmethodID JNIUserInterface send_message_string private Definition at line 38 of file multispot5_jni cc 10 16 4 4 jmethodiID JNIUserlInterface die private Definition at line 39 of file multispot5_jni cc 10 16 4 5 jmethodID JNIUserInterface should_stop private Definition at line 40 of file multispot5_jni cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 17 Kahan Class Reference 172 10 16 4 6 jmethodID JNIUserInterface send_new_points private Definition at line 41 of file multispot5_jni cc 10 16 4 7 int JNIUserInterface passes private Definition at line 42 of file multispot5_jni cc The documentation for this class was generated from the following file e multispot5_jni cc 10 17 Kahan Class Reference Class implementing the Kahan summation algorithm to allow accurate summation of very large numbers of doubles Public Member Functions e Kahan e void add double i Public Attributes double sum Private Attributes e double y double c double t 10 17 1 Detailed Description Class implementing the Kahan summation algorithm to allow accurate summation of very large numbers of doubles Definition at line 226 of file multispot5 cc 10 17 2 Constructor amp Destructor Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 17 Kahan Class Reference 173 10 17 2 1 Kahan Kahan inline Definition at line
203. lags o lt lt MT19937 lt lt hex lt lt setfill 0 lt lt setw 3 lt lt rng get_index for int i 0 i lt MERS_N i o lt lt lt lt hex lt lt setw 8 lt lt rng get_state i o lt lt setfill f lt lt setiosflags fl 10 21 3 7 void MT19937 read std istream amp is inline De serialise state param is Stream to de serialise from Definition at line 84 of file mt19937 h References rng using namespace std string 1s getline is ls if ls size 5627 cerr lt lt MT19937 Expected string of length 5627 Got lt lt ls siz e lt lt endl throw ParseError Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 21 MT19937 Struct Reference 181 istringstream l ls string s uint32_t i L gt gt s if s MT19937 cerr lt lt MT19937 Expected MT19937 Got lt lt s lt lt endl throw ParseError for int n 0 n lt MERS_N 1 n 1 gt gt hex gt gt i if 1 bad cerr lt lt MT19937 Expected hex number Got if l eof cerr lt lt EOF lt lt endl else cerr lt lt l get lt lt endl throw ParseError if n 0 rng get_index i else rng get_state n 1 i 10 21 4 Member Data Documentation 10 21 4 1 CRandomMersenne MT19937 rng Underlying RNG Definition at line 20 of file mt19937 h Referenced by copy_state operator rand_i
204. ledMultispot SpotWithBackgroundMasked get_val const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d inline Definition at line 21 of file sampled_multispot h 10 32 3 8 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked get_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d inline Definition at line 22 of file sampled_multispot h 10 32 3 9 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked get_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d inline Definition at line 23 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 214 10 32 3 10 template lt class C gt bool SampledMultispot SpotWithBackgroundMasked type_ has_hess constC amp inline Definition at line 25 of file sampled_multispot h 10 32 3 11 bool SampledMultispot SpotWithBackgroundMasked type_has_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp inline Definition at line 26 of file sampled_multispot h 10 32 3 12 template lt class C gt bool SampledMultispot SpotWithBackgroundMasked type_ has_diff constC amp inline Definition at line 28 of file sampled_multispot h 10 32 3 13 bool SampledMultispot SpotWithBackgroundMasked type_has_diff const pair lt double Vector lt 4 gt gt amp inline D
205. lgorithm h Contains an implementation fo the forward algo rithm 254 LoadTestData java 255 mersenne cpp Agner Fogg s Mersenne Twister implementation 255 mt19937 h Mersenne twister interface code 256 multispot5 cc Fit spots to the data 256 multispot5 h 266 multispot5_gui cc FitSpots driver for interactive GUI operation and de bugging 268 multispot5 headless cc FitSpots driver for entierly headless batch op eration 276 multispot5_jni cc 279 randomc h 280 sampled_multispot h 282 storm h Code dealing with storm imagery high level 284 storm_imagery cc Code dealing with storm imagery low level 286 storm_imagery h Code dealing with storm imagery low level 288 three_B java 288 ThreeBHelp java 289 ThreeBLoader java 289 utility cc Utility bits 289 utility h Utility bits 290 8 Module Documentation 8 1 Useful debugging functions Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 1 Useful debugging functions 20 Functions e Image lt byte gt scale_to_bytes const Image lt float gt amp im float lo float hi e void test_output_patch_variance const vector lt Image lt float gt gt amp ims template lt class C gt void assert_same_size const C amp images 8 1 1 Function Documentation 8 1 1 1 Image lt byte gt scale_to_bytes const Image lt float gt amp im float lo float hi Scales an image in to the correct range for bytes Parameters
206. ll break else break SPair r new SPair r a fname r b fullname return r 8 5 Storm classes Classes struct ConjugateGradientOnly lt Size Precision gt Class for performing optimization with Conjugate Gradient where only the derivatives are available class NullGraphics Graphics class which does absoloutely nothing class DataFor MCMC Closure hoding the data required do use GibbsSampler2 See FitSpots for naming of variables struct SampledBackgroundData Closure holding image data generated using samples drawn from the model struct SpotNegProbabilityDiffWithSampledBackground Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen Continue 8 5 Storm classes 48 Compute the derivative of the negative log probability with respect to the parameters of one spot given some samples of the other spots class FreeEnergyHessian Class for computing the Hessian of the negative free energy class FitSpots Mega class which actually does the meat of the spot fitting class FitSpotsGraphics Graphics class for FittingSpots class UserlnterfaceCallback Callback class used by FitSpots to provide enough hooks for a user interface class SampledMultispot GibbsSampler Draw samples from the spot states given the spots positions and some data class SampledMultispot GibbsSampler2 Gibbs sampling class which masks spots to reduce computation Functions auto_ptr lt UserlnterfaceCallback
207. log count mask getWidth xmask getHei ght s getSize gd showDialog if gd wasOKed return xfinal double fwhm gd getFWHM pixel_size_in_nm gd getPixelSize final int initial_spots gd getSpots firstfr gd getFirstFrame lastfr gd getLastFrame We have to use getNextNumber otherwise macro recording does not wo rk final double fwhm gd getNextNumber pixel_size_in_nm gd getNextNumber final int initial_spots int gd getNextNumber firstfr int gd getNextNumber lastfr int gd getNextNumber Compute the parameters of the log normal prior such that the mode matches the size of the spots final double sigma fwhm pixel_size_in_nm 2 Math sqrt 2 Math log 2 final double blur_sigma 0 1 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 36 three_B Class Reference 226 s exp mu sig 2 ln s mu sig 2 mu 1n s sig 2 final double blur_mu Math log sigma blur_sigmaxblur_sigma Initialized from the current time Random rng new Random Append stuff to the config file now This will be parsed later in C cfg cfg placement uniform num_spots Integer toString initial _spots n 1 blur mu Double toString blur_mu n blur sigma Double toString blur_sigma n seed Integer toString rng nextInt 16777216 n Acquire a filen
208. ls pixels length mask getHei ght mask getWidth filename System out printin Finished if fatal cp send_status_text_message Finished n ij IJ showStatus 3B run terminated stopped true 10 41 3 10 static String ThreeBRunner decodePercent String str inline static private Definition at line 1420 of file three_B java StringBuffer sb new StringBuffer for int i 0 i lt str length i char c str charAt i if c sb append else if c sb append char Integer parseInt str substring i 1 i 3 16 i 2 else sb append c return sb toString 10 41 3 11 static void ThreeBRunner addLibraryPath String pathToAdd throws Exception inline static Adds the specified path to the java library path Parameters pathToAdd the path to add Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 246 Exceptions Exception Definition at line 1445 of file three_B java final Field usrPathsField ClassLoader class getDeclaredField usr_paths wya usrPathsField setAccessible true get array of paths final String paths String usrPathsField get null check if the path to add is already present for String path paths if path equals pathToAdd return add the new path final String newPaths Arrays
209. ls boolean rec_ e FloatSliderWithBox setUnits String s e FloatSliderWithBox setFormat String s e void addChangeListener ChangeListener changeListener e double get_value_from_slider double get_value_from_text Package Functions e void setValue double v double getValue Package Attributes double max Private Attributes e JSlider slider e JTextField number e JLabel label GridBagConstraints completePanelConstraints_ e int steps 1000000 e double min e String text Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 10 FloatSliderWithBox Class Reference 136 e String units e String format 8 3f e double value e boolean reciprocal 10 10 1 Detailed Description This class makes a floating point slider bar with an edit box next to it for more precision Also has a reciprocal option for inverse reciprocal scaling Definition at line 685 of file three_B java 10 10 2 Constructor amp Destructor Documentation 10 10 2 1 FloatSliderWithBox FloatSliderWithBox String text double min_ double max_ double value_ int cols boolean rec inline Definition at line 701 of file three_B java References completePanelConstraints_ label max min number reciprocal setValue slider steps text and value super new GridBagLayout reciprocal rec_ min min_ max max_j text text_ value value_ if reciprocal min 1 max_ max 1 min_
210. lt a secaos sua tendet ee ee 255 11 7 LoadTestData java File Reference 255 11 8 mersenne cpp File Reference 2 2 0 4 255 11 8 1 Detailed Description 2 2 256 11 9 mt19937 h File Referente s cc occ caccara neniaro naen 256 11 9 1 Detailed Description ooo soco ca cc resies ua risu 256 11 10multispot5 cc File Reference noaaraa 256 11 10 1 Detailed Description 259 11 10 2 Define Documentation 2 259 11 70 3 Function Documentation lt lt lt lt so e ee a ena 259 11 11multispot5 h File Reference aoaaa 266 11 111 Function Documematgn 6 6046 aoea es dee ea ii 267 11 12multispot5_gui cc File Reference 2 0 268 11 12 1 Detailed Description 2 0 269 11 12 2 Function Docuimeniation lt s 0 224 bbe deb eee eden 269 11 12 3 Variable Documentation 2 2 4 276 11 13multispot5_headless cc File Reference 276 11 43 1 Detailed Description 2 se ee ee eee ee eee 277 11 13 2 Function Documenmation 2 6 4 68 eee eee eee 277 11 14multispot5_jni cc File Reference 2 0 279 11 15randomc h File Reference 2 2 20202 ee 280 11 15 1 Detailed Descriptions c ec ee ee a a 281 11 15 2 Define Documentation ee eee aey ee 281 11 15 3 Typedef Documentation 281 Generated on Wed Nov 28 2012 15 39 12 for Thre
211. lt mean lt lt endl cerr lt lt Std lt lt sqrt variance lt lt endl return ims Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 7 Storm classes specific to multispot processing 70 8 7 Storm classes specific to multispot processing Classes struct IndexLexicographicPosition lt Cmp First gt Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots 9 Namespace Documentation 9 1 SampledMultispot Namespace Reference Classes e struct SpotWithBackgroundMasked This class compute the log diff hess probability of a spot given an image patch and background due to existing spots class GibbsSampler Draw samples from the spot states given the spots positions and some data e class GibbsSampler2 Gibbs sampling class which masks spots to reduce computation Functions double intensity double i double intensity const pair lt double Vector lt 4 gt gt amp i template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample template lt class T gt void remove_spot vecto
212. lta epsilon 8 3 2 7 template lt class A class Rng gt int select_random_element const A amp v const double scale Rng amp rng Select an element from the container v assuming that v is a probability distribution over elements up to some scale Parameters v Uscaled probability distribution scale Scale of v rng Random number generator to use Definition at line 479 of file forward_algorithm h References scale Referenced by sample_unscaled_log Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 41 double total 0 choice rng scale for int i 0 i lt int v size i total v i if choice lt total return i return v size 1 8 3 2 8 template lt int N class Rng gt int sample_unscaled_log std tr1 array lt double N gt a Rng amp rng Select an element from the a assuming that a stores unscaled log probabilities of the elements Parameters a Uscaled probability distribution stored as logarithms rng Random number generator to use Definition at line 497 of file forward_algorithm h References select_random_element double hi max_element a begin a end double sum 0 for unsigned int i 0 i lt a size i a i exp a i hi sum a i return select_random_element a sum rng 8 3 2 9 template lt int States
213. ly to be affected Typically this is around 3 pixels e Insufficient background regions The 3B algorithm needs to be able to estimate the babkground noise level in order to model the image correctly If there is an insufficient amount of background for instances if the images are too small then the estimation of the noise level may be poor which could lead to artefacts The sample data provided is an example of data for which the background can be estimated effectively e Image drift or motion The 3B algorithm does not model image motion If there is significant motion for example due to drift or a live cell moving then artefacts may result The artefacts take the form of streaking or smearing in Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 3 Using the ImageJ Plugin 5 the direction of drift or structure bunching randomly at one end of the drift or the other Ideally the experiment should be run to minimize drift but if this is not pos sible then drift correction software for example based on tracking beads should be used to correct the drift For live cell analysis a tradeoff can be made between spatial and temporal resolution If fewer frames are anal ysed the temporal resolution is higher but the spatial resolution will be degraded Varying the number of frames analysed can also be used to investigate the impact of sample movement in live cells if this is a concern e Incorrect parameters
214. m h File Reference 284 11 16 1 3 define SWBG_HAVE_ MASK Definition at line 30 of file sampled_multispot h 11 16 2 Typedef Documentation 11 16 2 1 typedef char State Definition at line 11 of file sampled_multispot h 11 17 storm h File Reference Code dealing with storm imagery high level include lt TooN TooN h gt include lt cvd image h gt include lt utility gt include lt trl tuple gt include utility h Functions e template lt class B gt double spot_shape_s const TooN Vector lt 2 gt amp x const TooN Vector lt 4 dou ble B gt amp phi e template lt class B gt std pair lt double TooN Vector lt 4 gt gt spot_shape_diff_position const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi e template lt class B gt std tr1 tuple lt double TooN Vector lt 4 gt TooN Matrix lt 4 gt gt spot_shape_hess_position const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi template lt class B gt std tr1 tuple lt double TooN Vector lt 2 gt TooN Matrix lt 2 gt gt spot_shape_hess const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi e template lt class B gt std pair lt double TooN Vector lt 2 gt gt spot_shape_diff const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi e template lt class B gt double spot_shape c
215. ma 1 exp 2 mu sq sigma 8 5 1 18 double log_normal_mode double mu double sigma inline Compute the mode of a log normal distribution See log_normal Mode P x efu 0 44 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 63 Parameters sigma mu u Returns The mode Definition at line 340 of file storm h Referenced by generate_state_parameters_ye_olde and FitSpots try_modifying_model return exp mu sigma sigma 8 5 1 19 double log_log_normal double x double mu double sigma inline Log normal distribution This is given by P x ee 45 x e so XOV2T Inx p InP x 52 Inx Inov2z 46 S Parameters x x mu u sigma Definition at line 355 of file storm h References In and sq Referenced by NegativeFreeEnergy compute_with_mask and NegativeFreeEnergy operator return sq ln x mu 2x sq sigma ln x In sigma sqrt 2 M_PI 8 5 1 20 double diff_log_log_normal double x double mu double sigma inline Derivative of the log of the log normal distribution dn P x eo Ox x o Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 6 Storm imagery classes basic image processing 64 Parameters X X mu u sigma Definition at line 369 of file storm h Refe
216. mage lt byte gt scale_to_bytes const Image lt float gt amp im Image lt float gt average_image const vector lt Image lt float gt gt amp ims Matrix lt 4 gt sampled_background_spot_hessian_ffbs const Vector lt 4 gt amp spot const SampledBackgroundData amp d int bs_iterations MT19937 amp rng Matrix lt 4 gt sampled_background_spot_hessian2 const Vector lt 4 gt amp spot const SampledBackgroundData amp d Matrix lt 4 gt sampled_background_spot_hessian_FAKE const Vector lt 4 gt amp spot const SampledBackgroundData amp d void get_spot_pixels const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp spot vector lt int gt amp out vector lt string gt split const string amp line template lt class C gt string xtoa const C amp x Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 259 template lt class C gt C atox const string amp s const string amp msg StateParameters parse_log_file istream amp in StateParameters generate_state_parameters_ye_olde const Basiclmage lt dou ble gt amp log_ratios const vector lt Image lt float gt gt amp ims vector lt ImageRef gt pixels e set lt ImageRef gt dilate_mask const vector lt ImageRef gt amp v double r double brightness_motion_limit double mu double sigma bool not_one void fit_spots_new const vector lt Image lt float gt gt amp
217. maintain the number of photons from each flurophore per frame the illumination intensity would have to be increased which is likely to bleach the sample rapidly and change the blinking properties of the fluorophore to some extent The acquisition of live cell datasets allows dynamics to be observed It should be noted however that if the structures move over the timescale of the acquisition then that move ment will cause blurring in the reconstructed image 1 2 1 4 Live cell datasets The 3B algorithm must be able to pick up the changes in intensity which occur when a fluorophore switches between an emitting and a non emitting state The accuracy with which localisation can occur depends as for other localisation techniques on the number of photons from the fluorophore and the background level Since 3B is generally used with a widefield setup if the sample has a lot of fluorescent structure out of the plane of focus the background will be higher and it will be more difficult to localise For thick samples the background can be reduced by using TIRF or high angle illumination 1 2 2 Iterations and run time In general determining the number of iterations required for MCMC algorithms is an unsolved problem A good general rule is that once the reconstruction stops chang ing significantly with increasing iterations then it is likely that the reconstruction has converged to a reasonable point If you are unsure then rerun exactly the s
218. me mask p intensity spot_inte nsities mask p Add and remove a drifty spot only over a mask template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities r lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vecto const vector lt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 210 int gt amp mask const int steps spot_intensities size const int frames current_sample_intensities size for int frame 0 frame lt frames framet t int s frame steps frames if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities s mask p template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt v ector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask const int steps spot_intensities size const int frames current_sample_intensities size for int frame 0 frame lt frames framet t int s frame steps frames if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask
219. ms Average the input image stack for display purposes Definition at line 151 of file multispot5 cc References assert_same_size assert_same_size ims Image lt float gt r ims 0 size 0 for unsigned int i 0 i lt ims size i transform r begin r end ims i begin r begin plus lt float gt transform r begin r end r begin bind2nd multiplies lt float gt size return r 8 2 2 7 vector lt string gt split const string amp line Tokenize a line Definition at line 915 of file multispot5 cc Referenced by parse_log_file vector lt string gt v istringstream i line string Ss while i eof i gt gt s LE i fail break v push_back s return v 8 2 2 8 template lt class C gt string xtoa constC amp x inline Generic version of itoa How many times has this been reimplemented Parameters x Value to convert to string Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 26 Definition at line 935 of file multispot5 cc Referenced by parse_log_file ostringstream os os lt lt x return os str 8 2 2 9 template lt class C gt C atox const string amp s const string amp msg inline Inverse of xtoa How many times has this been reimplemented Parameters s String to convert msg Mesage to print on error Definition at line 94
220. n Documentation 190 10 24NullUlCallback Class Reference 20004 192 10 24 1 Detailed Description 2 2 0 192 10 24 2 Member Function Documentation 192 10 25MT19937 ParseError Struct Reference 194 10 25 1 Detailed Description c sa osgordd eee eee 194 10 26SampledBackgroundData Struct Reference 194 10 26 1 Detailed Description 2 2 0 195 10 26 2 Constructor amp Destructor Documentation 195 10 26 3 Member Data Documentation 196 10 27 FloatSliderWithBox SliderChanged Class Reference 198 10 27 1 Detailed Description 22 2 0 198 10 27 2 Constructor amp Destructor Documentation 198 10 27 3 Member Function Documentation 198 10 27 4 Member Data Documentation 199 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS vi 10 28SomethingChanges Class Reference 199 10 28 1 Detailed Description 2 2 2 0 199 10 28 2 Constructor amp Destructor Documentation 199 10 28 3 Member Function Documentation 200 10 28 4 Member Data Documentation 200 10 29SPair Class Reference 00000 eee eee 200 10 29 1 Detailed Description 2 2 0 4 201 10 29 2 Member Data Documentation 201 10 30S
221. n Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 244 System out println time_per_it time_per_it long time_remaining_s its_remaining time_per_it 1000 long s time_remaining_s 60 long m time_remaining_s 60 60 long h time_remaining_s 3600 cp send_time_text_message h h m m for target i terations Increment after since it outputs the initial spots as well itst 10 41 3 6 void ThreeBRunner die Stringerr inline package Definition at line 1385 of file three_B java References cp EControlPanel die and fatal cp die err fatal true 10 41 3 7 boolean ThreeBRunner should_stop inline package Definition at line 1391 of file three_B java References stop return stop 10 41 3 8 native void ThreeBRunner call String cfg float images J byte mask int n_images int rows int cols String file package Referenced by run 10 41 3 9 void ThreeBRunner run inline Definition at line 1398 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 245 References call config cp fatal filename its mask pixels EControlPanel send_ status_text_message start_time and stopped System out printin About to call start_time new java util Date getTime j its 0 call config pixels byte mask getPixe
222. nce ims if GV3 get lt bool gt preprocess fixed_scaling 0 FATAL_IF_NOT_DEFINED bool skip GV3 get lt bool gt preprocess skip if skip cerr lt lt WARNING WARNING WARNING WARNING IIIIIIILII n cerr lt lt preprocessing and fixed scaling selected n exit 1 double sub div if GV3 get lt bool gt preprocess fixed_scaling auto 0 FATAL_IF_NOT_DEFINE D double frac GV3 get lt double gt preprocess fixed_scaling auto proport ion 0 FATAL_IF_NOT_DEFINED tie sub div auto_fixed_scaling ims frac else sub GV3 get lt double gt preprocess fixed_scaling subtract 0 FATAL_ IF_NOT_DEFINED div GV3 get lt double gt preprocess fixed_scaling divide 0 FATAL_IF _NOT_DEFINED for unsigned int i 0 i lt ims size i for Image lt float gt iterator j ims i begin j ims i end j xj xj sub div else A sanity check cerr lt lt The mean should be small compared to std n cerr lt lt mean lt lt mean lt lt endl cerr lt lt std lt lt sqrt variance lt lt endl Scale by the variance for unsigned int i 0 i lt ims size i transform ims i begin ims i end ims i begin bindist m ultiplies lt double gt 1 sqrt variance tie mean variance mean_and_variance ims A sanity check cerr lt lt Rescaled n cerr lt lt mean lt
223. nces In using namespace TooN using namespace std using namespace std trl int states pi size delta j i delta_t i delta resize O size Initialization Eqn 19 P 262 Set initial partial log probabilities for int i 0 i lt states i delta 0 i ln pifi B log i O 0 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 39 Matrix lt States gt 1A for int r 0 r lt States r for int c 0 c lt States c 1A r c 1n A r c Forward pass Perform the recursion Eqn 20 P262 Note use T and T 1 Rather than T 1 and T for unsigned int t 1 t lt O size t for int j 0 j lt states j double Ztj HUGE_VAL This is Z_t j for int i 0 i lt states i Ztj max Ztj delta t 1 i l1A i j double sum 0 for int i 0 i lt states i sum exp delta t 1 i lA i 3 2tj delta t j B log j O t Ztj 1ln sum 8 3 2 6 template lt int States class Btype class Otype gt std pair lt std vector lt std tr1 array lt double States gt gt std vector lt std tr1 array lt double States gt gt gt forward_backward_algorithm TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O Run the forward backwards algorithm and return the log partials delta and epsilon Parameters A
224. nframes framet Matrix lt 4 gt hess Zeros Vector lt 4 gt deriv Zeros for unsigned int pixel 0 pixel lt npixels pixel double e d pixel_intensities frame pixel d sample_intensities_without_spot s frame pixel spot_intensities pixel Build up the derivative hess e get lt 2 gt spot_hess_etc pixel get lt 1l gt spot_hess_etc p ixel as_col get lt l gt spot_hess_etc pixel as_row deriv e get lt 1 gt spot_hess_etc pixel hess_and_deriv_part frame make_pair hess deriv Forward filtering Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 261 std vector lt array lt double 3 gt gt delta forward_algorithm_delta d A d pi B d 0 for int i 0 i lt bs_iterations i current_sample backward_sampling lt 3 State gt d A delta rng Matrix lt 4 gt hess Zeros Vector lt 4 gt deriv Zeros for unsigned int frame 0 frame lt nframes frame if current_sample frame 0 hess hess_and_deriv_part frame first deriv hess_and_deriv_part frame second sum_hess hess deriv as_col deriv as_row sum_deriv deriv sum_hess bs_iterations d sample_intensities_without_spot size d variance sum_deriv bs_iterations d sample_intensities_without_spot size d variance sum_hess sum_deriv as_col sum_deriv as_row sum_hess 0
225. ns 1e100 instead of inf for an input of 0 This prevents trapping of FPU exceptions Parameters X X Returns In x Definition at line 15 of file forward_algorithm h Referenced by backward_sampling diff_log_log_normal forward_algorithm forward_ algorithm_delta forward_algorithm_delta2 forward_algorithm_hessian forward_ backward_algorithm hess_log_log_normal log_log_normal and FitSpots try_modifying_ model if x 0 return 1e100 else return std log x 8 2 2 2 Vector spots_to_Vector const vector lt Vector lt 4 gt gt amp s There are two sensible ways of storing the state vector of spot positions This function converts between them See also spots_to_vector Parameters S list of spots to convert Definition at line 99 of file multispot5 cc Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes FitSpots run and FitSpots try_modifying_model Vector lt gt r s size 4 for unsigned int i 0 i lt s size i r ix4 0 s i 0 r ix4 1 s i 1 r ix4 2 s i 2 r ix4 3 sfil 3 return ry Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 24 8 2 2 3 vector lt Vector lt 4 gt gt spots_to_vector const Vector lt gt amp s There are two sensible ways of storing the state vector of spot positions This function conve
226. nsity spot_inte nsities s mask p Compute the spot intensity for a given spot at each pixel inline vector lt double gt compute_spot_intensity const vector lt ImageRef gt amp pixels cons t Vector lt 4 gt amp params 10 32 3 Member Function Documentation 10 32 3 1 double SampledMultispot SpotWithBackgroundMasked get_val double d inline Definition at line 13 of file sampled_multispot h 10 32 3 2 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked get_diff double inline Definition at line 14 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 213 10 32 3 3 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked get_hess double inline Definition at line 15 of file sampled_multispot h 10 32 3 4 double SampledMultispot SpotWithBackgroundMasked get_val const pair lt double Vector lt 4 gt gt amp d inline Definition at line 17 of file sampled_multispot h 10 32 3 5 Vector lt 4 gt SampledMultispot SpotWithBackgroundMasked get_diff const pair lt double Vector lt 4 gt gt amp d inline Definition at line 18 of file sampled_multispot h 10 32 3 6 Matrix lt 4 gt SampledMultispot SpotWithBackgroundMasked get_hess const pair lt double Vector lt 4 gt gt amp inline Definition at line 19 of file sampled_multispot h 10 32 3 7 double Samp
227. nt read simple_seed and write The documentation for this struct was generated from the following file e mt19937 h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 182 10 22 NegativeFreeEnergy Class Reference Class for computing the negitve free energy using thermodynamic integration Inheritance diagram for NegativeFreeEnergy DataForMCMC NegativeFreeEnergy Public Member Functions e NegativeFreeEnergy const DataForMCMC amp d e double variance_from_sample double sample double samples double base_ sigma double scale_pow const e double compute_with_mask const Vector lt gt amp spots const vector lt vector lt int gt gt amp spot_pixels const e double operator const Vector lt gt amp spots const MT19937 amp get_rng const Protected Attributes e const vector lt ImageRef gt amp pixels e const vector lt vector lt double gt gt amp pixel_intensities const double mu_brightness e const double sigma_brightness e const double mu_blur e const double sigma_blur const double variance const int samples const int sample_iterations e const Matrixx 3 gt A e const Vector lt 3 gt pi e MT19937 amp rng 10 22 1 Detailed Description Class for computing the negitve free energy using thermodynamic integration Definition at line 261 of file multispot5 cc 10 22 2 Constructor amp Destructor Doc
228. nt deriv if finished update_vectors_PR new_g return 1 else return 0 10 4 4 Member Data Documentation 10 4 4 1 template lt int Size 1 class Precision double gt const int ConjugateGradientOnly lt Size Precision gt size Dimensionality of the space Definition at line 11 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt init Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 90 10 4 4 2 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt g Gradient vector used by the next call to iterate Definition at line 12 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt init and ConjugateGradientOnly lt Size Precision gt update_vectors_ PR 10 4 4 3 template lt int Size 1 class Precision double gt TooN Vector lt Size gt ConjugateGradientOnly lt Size Precision gt new_g The new gradient set at the end of iterate Definition at line 13 of file conjugate_gradient_only h Referenced by ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt finished and ConjugateGradientOnly lt Size Pr
229. nt gt gt amp spot_pixels e const Matrix lt 3 gt A e const Vector lt 3 gt pi const double base_variance e double variance const int sample_iterations const int num_frames const int num_pixels const vector lt int gt O vector lt vector lt State gt gt current_sample e vector lt vector lt double gt gt current_sample_intensities e vector lt double gt cutout_spot_intensities vector lt vector lt double gt gt cutout_pixel_intensities e vector lt vector lt double gt gt cutout_current_sample_intensities 10 13 1 Detailed Description Gibbs sampling class which masks spots to reduce computation This draws samples from the spot states given the spots positions and some data It is very similar to GibbsSampler except that it only computes probabilities in a mask around each spot to save on computation Variable naming matches that in FitSpots Definition at line 304 of file sampled_multispot h 10 13 2 Constructor amp Destructor Documentation 10 13 2 1 SampledMultispot GibbsSampler2 GibbsSampler2 const vector lt vector lt double gt gt amp pixel_intensities_ const vector lt vector lt double gt gt amp spot_intensities_ const vector lt Vector lt 4 gt gt amp spots_ const vector lt vector lt int gt gt amp spot_pixels_ const Matrix lt 3 gt A const Vector lt 3 gt pi double variance_ int sample_iterations_ inline Definition at line 3
230. nt s begin s end float lo min_element s begin s end cerr lt lt hi lt lt lt lt lo lt lt endl img_save scale_to_bytes stds lo hi test_variance png 8 1 1 3 template lt class C gt void assert_same_size const C amp images Determines that all images in the incoming container are the same size and that the container is not empty Parameters images Container to check Definition at line 11 of file debug h Referenced by auto_fixed_scaling average_image FitSpots FitSpots generate_ state_parameters_ye_olde SampledMultispot GibbsSampler GibbsSampler Sam pledMultispot GibbsSampler2 GibbsSampler2 and test_output_patch_variance assert images empty for typename C const_iterator i images begin i images end i assert i gt size images front size 8 2 General utility functions Classes struct MT19937 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 22 Useful wrapper for MT19937 random number generator class class Kahan Class implementing the Kahan summation algorithm to allow accurate summation of very large numbers of doubles Typedefs e typedef std pair lt CVD lmageRef CVD lmageRef gt BBox Functions 8 2 1 8 2 1 1 double In double x Vector spots_to_ Vector const vector lt Vector lt 4 gt gt amp s vector lt Vector lt 4 gt
231. nt i 0 i lt nspots i lt lt endl spot_intensity push_back compute_spot_intensity pixels spots i vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt spot_hess_etc compute_spot_intensity_hessian pixels spots spot GibbsSampler sampler pixel_intensities spot_intensity spots A variance sample_iterations Compute derivative of log probability summed ie integrated Matrix lt 4 gt sum_hessl Zeros spots size Matrix lt 4 gt sum_hess2 Zeros spots size Vector lt 4 gt sum deriv Zeros spots size for int sample 0 sample lt samples samplet sampler next rng pi Compute d log P data x model d model for a given sample And the hessian Matrix lt 4 gt hess Zeros spots size Vector lt 4 gt deriv Zeros spots size for unsigned int frame 0 frame lt nframes frame for unsigned int pixel 0 pixel lt npixels pixel t double e pixel_intensities frame pixel sampler sample_i ntensities frame pixel Build up the derivative if sampler sample spot frame 0 hess e get lt 2 gt spot_hess_etc pixel get lt 1 gt spot_he ss_etc pixel as_col get lt 1 gt spot_hess_etc pixel as_row deriv e x get lt 1l gt spot_hess_etc pixel hess 0 0 hess_log_log_normal spots spot 0 mu_brightness sigma_brightness hess 1 1 hess_log_log_normal spots spot 1 mu_blur sigm
232. o get started with analysing data the ImageJ plugin is the most suitable piece of software This can be obtained from the the project website For more advanced analysis such as running on a cluster the the program multispot5_ headless should be used This program needs to be run from the commandline This project contains the source code for the commandline program and the ImageJ plugin Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 2 Getting started 2 1 2 Getting started 1 2 1 Dataset types and experimental parameters Bayesian analysis of blinking and bleaching allows data to be extracted from datasets in which multiple fluorophores are overlapping in each frame It can of course also be used to analyse standard localisation PALM STORM data but it must be borne in mind that the low density and high frame number of such datasets can lead to long runtimes Here we briefly discuss the different types of dataset related to different applications that you may wish to analyse using 3B 1 2 1 1 Low density PALM STORM datasets These datasets have few fluorophores overlapping in each image and are at least 10 000 frames long As discussed above they can be analysed with 3B but their run time makes this a large time investment If you wish to use this approach for perfor mance verification we would suggest selecting a small spatial area around 1 5 3 um square The algorithm can also be parallelised by runn
233. ocessor mask_ ImageStack s String cfg_ String filename_ int firstfr int lastfr e void stop_thread boolean has_stopped e void send_message_string String s void send_new_points float points e void die String err boolean should_stop e native void call String cfg float images byte mask int n_images int rows int cols String file Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 241 Static Package Functions e static String get_plugin_dir e static UnsatisfiedLinkError try_to_load_dlls String s e static initializer Package Attributes e ByteProcessor mask e float pixels e EControlPanel cp e String config e String filename long start_time e int its Static Private Member Functions e static String decodePercent String str Private Attributes e volatile boolean stop false e volatile boolean stopped false e boolean fatal false 10 41 1 Detailed Description This class deals with running the actual 3B code It should be run in a separate thread It will make calls back to a viewer and accepts termination calls as well Definition at line 1283 of file three_B java 10 41 2 Constructor amp Destructor Documentation 10 41 2 1 ThreeBRunner ThreeBRunner ByteProcessor mask_ ImageStack s String cfg_ String filename_ int firstfr int lastfr inline package Definition at line 1296 of file three_
234. on 0 int start_pass 0 if GV3 get lt bool gt checkpoint 0 1 string rng_state GV3 get lt string gt checkpoint rng state 1 istringstream rs rng_state rng gt read rs start_iteration GV3 get lt int gt checkpoint iteration 0 1 start_pass GV3 get lt int gt checkpoint pass 0 1 StateParameters p spots spots rng rng pass start_pass iteration start_iteration pixels pixels To SO U U return p 11 11 multispot5 h File Reference include lt vector gt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 11 multispot5 h File Reference 267 include lt string gt include lt fstream gt include lt iostream gt include lt tr1 memory gt include lt cvd image h gt include lt cvd byte h gt include lt TooN TooN h gt include lt TooN so2 h gt include utility h include mt19937 h Classes e class FitSpotsGraphics Graphics class for FittingSpots e class UserlnterfaceCallback Callback class used by FitSpots to provide enough hooks for a user interface e struct UserlnterfaceCallback UserlssuedStop e struct LogFileParseError Null struct thrown if a parse error is encountered when trying to load a log file e struct StateParameters Internal state excluding fixed settings which represents the entire internal state of spot fitting Functions std auto_ptr lt FitSpotsGraphics gt null_graphics e std auto_
235. on_prior private Should a proper prior over position be uesd A clue yes Definition at line 1379 of file multispot5 cc 10 8 4 17 const double FitSpots position_prior private Value for the posision prior i e reciprocal of area Definition at line 1380 of file multispot5 cc 10 8 4 18 const double FitSpots max_motion private Maximum motion on any axes for optimization See ConjugateGradientOnly Definition at line 1383 of file multispot5 cc 10 8 4 19 const int FitSpots sample_iterations private Number of mixing samples to use in Gibbs sampling Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 129 Definition at line 1384 of file multispot5 cc 10 8 4 20 const int FitSpots main_cg_max_iterations private Maximum iterations allowed for ConjugateGradientOnly in main optimization loop Definition at line 1389 of file multispot5 cc 10 8 4 21 const int FitSpots main_samples private Number of samples to use in main loop Definition at line 1390 of file multispot5 cc 10 8 4 22 constint FitSpots main_passes private Number of passes to perform per iteration in main loop Definition at line 1391 of file multispot5 cc 10 8 4 23 const int FitSpots outer_loop iterations private Total number of iterations to perform Definition at line 1392 of file multispot5 cc 10 8 4 24 const int FitSpots add_remove_tries private Number of attemts
236. onfiguration file and advanced settings 9 blur mu 0 218 blur sigma 0 1 Corresponds to 270nm at 79nm per pixel blur mu 0 37261 olur sigma 0 1 Number of spots CHANGE THIS 15 is suitable for a small image patch such as the example in the nelp menu T you set this too high the system will run very slowly placement uniform num_spots 15 TILISTTTTTTI ITALIA TTT TTA TAIT ATTA dbh TATA TTT TATA TTT TTA You probably do not want to change anything below here Transition matrix and initial probabilities Following the notation in 24 A represents the transition probabilities of the HMM and pi the initial state A corresponds to Supplementary Figure 4 as A P1 P2 0 P3 P4 P5 0 0 1 These are used in the inner integral of eq 7 A 0 16 0 84 0 0 495 0 495 0 01 0 0 1 pi 5 5 0 TITTLITTELTTLTTLTAST TTT TTT TATA TATA TTT ATT TTT ATT General parameters All MCMC systems can use mixing samples 28 which are drawn by by the sampler but do not take part in further computations For every mixing_iterations samples drawn 1 is uses so mixing_iterations 1 corresponds to no mixing Number of mixing iterations used by all Gibbs samplers in this algorithm gibbs mixing_iterations 1 TITTLITLLTTLTTLTTST TTT TTT TTT ATTA TTT TTT ATTA TT Specific subsystem parameters TITISITTTTTSSTTTT TATA TTS TAIT TIT TT Main optimization step 2 of
237. onfirmDialog null 3B still running Closing will terminate the run Really close User Confirmation JOptionPan e YES_NO_OPTION if confirmed JOptionPane YES_OPTION dispose tbr stop_thread else OK to close dispose 10 6 3 17 void EControlPanel export_reconstruction_as_ij inline package Generate a fresh ImageJ image in a standard imageJ window so that ti can be manip ulated using the usual ImageJ commands The image is size calibrated so scalebars are easy to add Definition at line 1154 of file three_B java References filename FloatSliderWithBox getValue linear_reconstruction and reconstructed_ pixel_size Referenced by ExportButtonListener actionPerformed ImageProcessor export linear_reconstruction getProcessor duplicate ImagePlus export_win new ImagePlus filename reconstruction export i export_win getCalibration pixelWidth reconstructed_pixel_size getValue export_win getCalibration pixelHeight reconstructed_pixel_size getValue export_win getCalibration setXUnit nm export_win getCalibration setYUnit nm export_win show export_win updateAndDraw 10 6 3 18 synchronized FloatProcessor EControlPanel reconstruct inline private Compute a brand new reconstruction Definition at line 1167 of file three_B java References pixel_size_in_nm pts reconstruction_blur_fwhm roi and zoom Generated on Wed
238. onst TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi e double log_probability_no_spot const CVD Sublmage lt float gt amp im double vari ance Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 17 storm h File Reference 285 template lt class Base gt std tr1 tuple lt double TooN Vector lt 2 gt TOoN Matrix lt 2 gt gt log_probability_spot_hess const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_parameters e template lt class Base gt std pair lt double TooN Vector lt 2 gt gt log_probability_spot_diff const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_ parameters e template lt class Base gt double log_probability_spot const CVD Sublmage lt float gt amp im double vari ance const TooN Vector lt 4 double Base gt amp spot_parameters e double log_normal_std double mu double sigma e double log_normal_mode double mu double sigma double log_log_normal double x double mu double sigma e double diff_log_log_normal double x double mu double sigma e double hess_log_log_normal double x double mu double sigma 11 17 1 Detailed Description Code dealing with storm imagery high level Definition in file storm h 11 17 2 Function Documentation 11 17 2 1 double log_probability_no_spot const C
239. onst std vector lt std vector lt int gt gt amp SampledMultispot GibbsSampler2 spot_pixels private Definition at line 309 of file sampled_multispot h 10 13 4 5 const Matrix lt 3 gt SampledMultispot GibbsSampler2 A private Definition at line 310 of file sampled_multispot h 10 13 4 6 const Vector lt 3 gt SampledMultispot GibbsSampler2 pi private Definition at line 311 of file sampled_multispot h 10 13 4 7 const double SampledMultispot GibbsSampler2 base_variance private Definition at line 312 of file sampled_multispot h 10 13 4 8 double SampledMultispot GibbsSampler2 variance private Definition at line 313 of file sampled_multispot h 10 13 4 9 const int SampledMultispot GibbsSampler2 sample_iterations private Definition at line 315 of file sampled_multispot h 10 13 4 10 const int SampledMultispot GibbsSampler2 num_frames private Definition at line 316 of file sampled_multispot h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 158 10 13 4 11 const int SampledMultispot GibbsSampler2 num_pixels private Definition at line 316 of file sampled_multispot h 10 13 4 12 const vector lt int gt SampledMultispot GibbsSampler2 0 private Definition at line 317 of file sampled_multispot h 10 13 4 13 vector lt vector lt State gt gt SampledMultispot GibbsSampler2 current_ sample private Definition at line 319 of file
240. op Zeros for int i 0 i lt states i sum_top diff_delta t 1 i exp delta t 1 i ln A i j Z2t3 3 diff_delta t j B diff_log j O t sum_top sum if compute_hessian Matrix lt M gt sum_top2 Zeros for int i 0 i lt states i sum_top2 exp delta t 1 i lIn A i j Zt j he ss_delta t 1 i diff_delta t 1 i as_col diff_delta t 1 i as_row hess_delta t j B hess_log j O t sum_top2 sum sum _top as_col sum_top as_row sum sum Compute the log prob using normalization double Z HUGE_VAL for int i 0 i lt states i Z max Z delta back i double sum 0 for int i 0 i lt states i Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 35 sum exp delta back i Z double log_prob Z I1n sum Compute the differential of the log Vector lt M gt diff_log Zeros Compute the differential of the log using normalization The convenient normalizer is ln P O lambda which makes the bottom 1 for int i 0 compute_deriv amp amp i lt states i diff_log exp delta back i log_prob diff_delta back i Matrix lt M gt hess_log Zeros Compute the hessian of the log using normalization The convenient normalizer is ln P O lambda which makes the bottom 1 for int i 0 compute_hessian amp amp i lt states i hess_log exp del
241. or ThreeB by Doxygen 10 8 FitSpots Class Reference 113 const int tsamples e const Image lt float gt ave e ofstream amp save_spots double time_gibbs double time_cg const bool scale_brightness_limit e const Vector lt 4 gt limit e const Matrixx 3 gt A e const Vector lt 3 gt pi e vector lt vector lt double gt gt pixel_intensities DataForMCMC data_for_t_mcmc DataForMCMC data_for_h_mcmc e int iteration 10 8 1 Detailed Description Mega class which actually does the meat of the spot fitting probably could be refactored a bit Definition at line 1348 of file multispot5 cc 10 8 2 Constructor amp Destructor Documentation 10 8 2 1 FitSpots FitSpots const vector lt Image lt float gt gt amp ims_ FitSpotsGraphics amp graphics_ UserlnterfaceCallback amp ui_ StateParameters amp params ofstream amp save_spots _ inline Definition at line 1488 of file multispot5 cc References assert_same_size ims ims_ graphics graphics_ ui ui_ Set up the main parameters pixels params pixels spots params spots start_iteration params iteration start_pass params pass rng params rng Set up all the system parameters variance 1 it should be To scale the X axis of a log normal distribution only the mu parameter needs to be changed intensity_mu GV3 get lt double gt intensity rel_mu 0 1 log sqrt variance intensity_sigma
242. ot5 cc pixels pixels_ pixel_intensities pixel_intensities_ mu_brightness mu_brightness_ sigma_brightness sigma_brightness_ mu_blur mu_blur_ sigma_blur sigma_blur_ variance variance_ samples samples_ sample_iterations sample_iterations_ A A_ pi pi_ rng rng_ 10 5 3 Member Function Documentation 10 5 3 1 MT19937 amp DataForMCMC get_rng const inline Definition at line 189 of file multispot5 cc Referenced by NegativeFreeEnergy compute_with_mask and NegativeFreeEnergy operator return rng 10 5 4 Member Data Documentation 10 5 4 1 const vector lt ImageRef gt amp DataForMCMC pixels protected Definition at line 179 of file multispot5 cc 10 5 4 2 const vector lt vector lt double gt gt amp DataForMCMC pixel_intensities protected Definition at line 180 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 5 DataForMCMC Class Reference 95 10 5 4 3 const double DataForMCMC mu_brightness protected Definition at line 181 of file multispot5 cc 10 5 4 4 const double DataForMCMC sigma_brightness protected Definition at line 181 of file multispot5 cc 10 5 4 5 const double DataForMCMC mu_blur protected Definition at line 181 of file multispot5 cc 10 5 4 6 const double DataForMCMC sigma_blur protected Definition at line 181 of file multispot5 cc 10 5 4 7 const double DataForMCMC variance protec
243. p intensity spot_inte nsities s mask p Compute the spot intensity for a given spot at each pixel inline vector lt double gt compute_spot_intensity const vector lt ImageRef gt amp pixels cons t Vector lt 4 gt amp params 10 32 2 2 template lt class Input gt SampledMul tispot SpotWithBackgroundMasked SpotWithBackgroundMasked const vector lt vector lt double gt gt amp sample_intensities const SWBG_SPOT_INTENSITIES amp spot_intensities const vector lt vector lt double gt gt amp pixel_intensities const double variance const vector lt int gt amp mask inline Definition at line 40 of file sampled_multispot h return i inline double intensity const pair lt double Vector lt 4 gt gt amp i return i first Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 211 Add and remove a spot over the entire region template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities r lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vecto for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt spot_intensities size ptt current_sample_intensities frame p intensity spot_intensitie s p template lt class T g
244. p env gt GetMethodID cls should_stop Z send_new_points env gt GetMethodID cls send_new_points F V passes GV3 get lt int gt main passes 10 16 3 Member Function Documentation 10 16 3 1 virtual void JNIUserinterface per_spot int iteration int pass int spot_num int totalspots inline virtual This function is called once per spot in each pass The idea is to provide a display along the lines of Iteration 1 optimizing 2 complete Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 16 JNiUserInterface Class Reference 169 Parameters iteration Iteration number pass Pass number spot_num Spot currently being optimized total_spots Total number of spots to be optimized Implements UserlnterfaceCallback Definition at line 61 of file multispot5_jni cc send_message sPrintf Iteration i optimizing 4i1 iteration passestpass 100 spot_num total_spots 10 16 3 2 virtual void JNIUserinterface per_modification int iteration int spot_num int total spots inline virtual This function is called once per spot in the modification phase The idea is to provide a display along the lines of Iteration 1 modifying 2 complete Parameters iteration Iteration number spot_num Spot currently being optimized total_spots Total number of spots to be optimized Implements UserlnterfaceCallback Def
245. per distribution If this is set to 0 then no position prior is used Do not set to 0 except for debugging position use_prior 1 Number of samples used to compute the gradient usint the nybrid method as applied to step 3c add_remove optimizer samples 20 The optimizer can get stuck on saddle points If a saddle point is found the the optimizer will restart in the direction corresponding to the worst eigen value Up to this many restarts will be attempted before gving up Step 3c add_remove optimizer attempts 10 There is no efficient algorithm for evaluating the Hessian equivalent to the inner integral in Eq 6 but for second derivatives The integral is approximated using Monte Carlo integration note not MCMC with this many samples drawn from the Markov chain using FFBS The outer summation uses add_remove optimizer samples samples add_remove optimizer hessian_inner_samples 1000 Number of cycles of thermodynamic integration step 3a and 3c and eq 2 Note that the equation 1 25 i 10 only applies if this number is set to 1000 as it was for all experiemnts in the paper The actual equation is 1 25 100 i add_remove thermo samples Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 1 5 The configuration file and advanced settings 11 add_remove thermo samples 1000 Outer and inner samples for computing the Hessian using the hybrid method in step 3e S
246. pot Class Reference 2 0000022 nee 201 10 30 1 Detailed Description 2 2 0 202 10 30 2 Constructor amp Destructor Documentation 202 10 30 3 Member Data Documentation 202 10 31 SpotNegProbabilityDiffWithSampledBackground Struct Reference 203 10 31 1 Detailed Description 2 2 0 203 10 31 2 Constructor amp Destructor Documentation 203 10 31 3 Member Function Documentation 204 10 31 4 Member Data Documentation 205 10 32SampledMultispot SpotWithBackgroundMasked Struct Reference 207 10 32 1 Detailed Description 2 2 2 0 208 10 32 2 Constructor amp Destructor Documentation 208 10 32 3 Member Function Documentation 212 10 32 4 Member Data Documentation 218 10 33StateParameters Struct Reference 2 44 219 10 33 1 Detailed Description 2 2 0 219 10 33 2 Member Data Documentation 219 10 34StopButtonListener Class Reference 220 10 34 1 Detailed Description 2 2 0 220 10 34 2 Constructor amp Destructor Documentation 220 10 34 3 Member Function Documentation 221 10 34 4 Member Data Documentation 221 10 35FloatSliderWithBox TextChanged Class Reference 221 10 35 1 Detailed Description 2
247. pot5 cc 10 22 4 8 constint DataForMCMC samples protected inherited Definition at line 183 of file multispot5 cc 10 22 4 9 const int DataForMCMC sample_iterations protected inherited Definition at line 183 of file multispot5 cc 10 22 4 10 const Matrix lt 3 gt DataForMCMC A protected inherited Definition at line 184 of file multispot5 cc 10 22 4 11 const Vector lt 3 gt DataForMCMC pi protected inherited Definition at line 185 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 23 NullGraphics Class Reference 189 10 22 412 MT19937 amp DataForMCMC rng protected inherited Definition at line 186 of file multispot5 cc The documentation for this class was generated from the following file e multispot5 cc 10 23 NullGraphics Class Reference Graphics class which does absoloutely nothing Inheritance diagram for NullGraphics FitSpotsGraphics NullGraphics Public Member Functions e virtual void init CVD ImageRef e virtual void draw_krap const std vector lt TooN Vector lt 4 gt gt amp const CVD lmage lt CVD byte gt amp const BBox amp int TooN Vector lt 4 gt e virtual void swap e virtual void draw_pixels const std vector lt CVD lmageRef gt amp float float float float e virtual void draw_bbox const BBox amp e virtual void gIDrawCross const TooN Vector lt 2 gt amp int e virtual N
248. ptr lt UserlnterfaceCallback gt null_ui e StateParameters generate_state_parameters_ye_olde const CVD Basiclmage lt double gt amp log_ratios const std vector lt CVD lmage lt float gt gt amp ims std vector lt CVD ImageRef gt pixels e void fit_spots_new const std vector lt CVD lmage lt float gt gt amp ims StateParameters amp p std ofstream amp save_spots FitSpotsGraphics amp e void fit_spots_new const std vector lt CVD lmage lt float gt gt amp ims StateParameters amp p std ofstream amp save_spots FitSpotsGraphics amp UserlnterfaceCallback amp e StateParameters parse_log_file std istream amp in 11 11 1 Function Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5_gui cc File Reference 268 11 11 1 1 StateParameters generate_state_parameters_ye_olde const CVD Basiclmage lt double gt amp Jog_ratios const std vector lt CVD lmage lt float gt gt amp ims std vector lt CVD lmageRef gt pixels 11 11 1 2 void fit_spots_new const std vector lt CVD lmage lt float gt gt amp ims StateParameters amp p std ofstream amp save_spots FitSpotsGraphics amp 11 11 1 3 void fit_spots_new const std vector lt CVD lmage lt float gt gt amp ims StateParameters amp p std ofstream amp save_spots FitSpotsGraphics amp UserlnterfaceCallback amp 11 11 1 4 StateParameters parse_log_fil
249. r lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_ sample const vector lt int gt amp mask Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 9 1 SampledMultispot Namespace Reference 71 e template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask e vector lt double gt compute_spot_intensity const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params e vector lt pair lt double Vector lt 4 gt gt gt compute_spot_intensity_derivatives const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params e vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt compute_spo
250. ratios image at this level in order to find cegions for analysis threshold 0 Dilate regions found by thresholding by this radius Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 2 Compiling the programs 12 radius 0 Analyse marked region number 19 cluster_to_show 19 Tf this is set to 1 cluster_to_show is ignored and the largest cegion is used instead use_largest 1 2 Compiling the programs In order to compile the project you will need to download and install the following libraries TOON http www edwardrosten com cvd toon html e libcvd http www edwardrosten com cvd gvars3 http www edwardrosten com cvd gvars3 html The program is portable and is well tested under Linux and OSX It will also compile under Windows using cygwin or MinGW The program can be built using the usual method for compiling under Linux configure amp amp make 2 1 Compiling the ImageJ plugin The plugin is provided pre compiled from the project website There are two ways of building the plugin manual and automatic If you want to make changes to the plugin then use manual building If you want to automatically build the plugin for several platforms then use automatic building 2 1 1 Manual The basic build instructions are the same as for the commandline program You will also need the JDK Java Development Kit and ImageJ installed You will have to locate where your system has installed th
251. rence 280 inc Classes incl incl incl incl incl incl lude ude ude ud lt algorithm gt lt cvd image h gt lt cvd image_convert h gt ThreeBRunner h include include ude ude include include ude storm_imagery h multispot5 h multispot5_place_choice h utility h lt gvars3 instances h gt lt tag printf h gt lt trl tuple gt class JNlUserInterface 3B User interface for the Java plugin Functions string get_string JNIEnv env jstring js Image lt jbyte gt get_local_copy_of_image JNIEnv xenv joyteArray data int rows int cols e Image lt float gt get_local_copy_of_image JNIEnv env jfloatArray data int rows int cols JNIEXPORT void JNICALL Java_ThreeBRunner_call JNIEnv xenv jobject jthis jstring cfg jobjectArray images jbyteArray mask_data jint n_images jint rows jint cols jstring file 11 15 Defines randomc h File Reference e define INT64_SUPPORTED Typedefs e typedef signed int int32_t e typedef unsigned int uint32_t e typedef long long int64_t e typedef unsigned long long uint64_t Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 15 randomc h File Reference 281 Functions e void EndOfProgram void e void FatalError const char ErrorText 11 15 1 Detailed Description Definition in file randomc h 11 15 2 Define Documentation 11 15 2 1 define INT6 4_S
252. rences In and sq Referenced by FreeEnergyHessian hessian SpotNegProbability DiffWithSampledBack ground operator sampled_background_spot_hessian2 and sampled_background_ spot_hessian_ffbs return 1 ln x mu sq sigma x 8 5 1 21 double hess_log_log_normal double x double mu double sigma inline Second derivative of the log of the log normal distribution d7InP x 1 1 _Inx y L o o Parameters X X mu u sigma Definition at line 384 of file storm h References In and sq Referenced by FreeEnergyHessian hessian sampled_background_spot_hessian2 sampled_background_spot_hessian_FAKE and sampled_background_spot_hessian_ ffbs return 1 ln x mu 1 sq sigma sq x 8 6 Storm imagery classes basic image processing Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 6 Storm imagery classes basic image processing 65 Functions e vector lt Image lt float gt gt load_and_preprocess_images2 const vector lt string gt amp names e vector lt Image lt float gt gt load_and_preprocess_images const vector lt string gt amp names e vector lt Image lt float gt gt load_and_normalize_images const vector lt string gt amp files 8 6 1 Function Documentation 8 6 1 1 vector lt Image lt float gt gt load_and_preprocess_images2 const vector lt string gt amp names
253. ription This class compute the log diff hess probability of a spot given an image patch and background due to existing spots Definition at line 5 of file sampled_multispot h 10 32 2 Constructor amp Destructor Documentation 10 32 2 1 template lt class Input gt SampledMul tispot SpotWithBackgroundMasked SpotWithBackgroundMasked const vector lt vector lt double gt gt amp sample_intensities const SWBG_SPOT_INTENSITIES amp spot intensities const vector lt vector lt double gt gt amp pixel_intensities const double variance const vector lt int gt amp mask inline Definition at line 40 of file sampled_multispot h return i inline double intensity const pair lt double Vector lt 4 gt gt amp i Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 209 return i first Add and remove a spot over the entire region template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities r lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vecto for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt spot_intensities size ptt current_sample_intensities frame p intensity spot_intensitie s p template lt class T
254. rmal forward_ algorithm_delta hess_log_log_normal SampledBackgroundData mu_blur SampledBackgroundData mu_ brightness SampledBackgroundData O SampledBackgroundData pi SampledBackgroundData pixel_ intensities SampledBackgroundData pixels SampledBackgroundData sample_intensities_ without_spot SampledBackgroundData sigma_blur SampledBackgroundData sigma_ brightness and SampledBackgroundData variance Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_ modifying_model vector lt tuple lt double Vector lt 4 gt Matrix lt 4 gt gt gt spot_hess_etc compute_spot_intensity_hessian d pixels spot vector lt double gt spot_intensities compute_spot_intensity d pixels spot Matrix lt 4 gt sum_hess_log Zeros Matrix lt 4 gt sum_diff2_log Zeros vector lt State gt current_sample const unsigned int nframes d pixel_intensities size const unsigned int npixels d pixels size Matrix lt 4 gt sum_hess Zeros Vector lt 4 gt sum_deriv Zeros vector lt pair lt Matrix lt 4 gt Vector lt 4 gt gt gt hess_and_deriv_part nframes for unsigned int s 0 s lt d sample_intensities_without_spot size s SpotWithBackground B d sample_intensities_without_spot s spot_intensiti es d pixel_intensities d variance Compute what the per frame hess and deriv parts are if the spot is on in a frame for unsigned int frame 0 frame lt
255. rolPanel Rectangle roi_ double ps_ String filename_ ThreeBRunner tbr _ e void export_reconstruction_as_ ij Package Attributes e JButton exportButton e JButton closeButton e JLabel time_msg Private Member Functions e GridBagConstraints canvas_pos e GridBagConstraints status_pos GridBagConstraints time_pos e GridBagConstraints buttons_pos Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 97 GridBagConstraints pixel_size_pos e GridBagConstraints blur_pos void set_status String s void set_time String s synchronized void update_canvas synchronized FloatProcessor reconstruct Private Attributes ImagePlus linear_reconstruction e ImageCanvas canvas JButton stopButton e Color exportButtonColor JLabel status FloatSliderWithBox blur_fwhm FloatSliderWithBox reconstructed_pixel_size Panel complete JPanel buttons e ThreeBRunner tbr ArrayList lt Spot gt pts Rectangle roi double zoom 0 01 e double reconstruction_blur_fwhm 5 e double pixel_size_in_nm String filename int iterations 0 10 6 1 Detailed Description Control panel for running 3B plugin and providing interactive update Definition at line 888 of file three_B java 10 6 2 Constructor amp Destructor Documentation 10 6 2 1 EControlPanel EControlPanel Rectangle roi_ double ps_ String filename_ ThreeBRunner tbr inline package D
256. ror n JOptionPane showMessageDialog null Error s Fatal e rror JOptionPane ERROR_MESSAGE dispose Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 107 10 6 3 23 void EControlPanel send_status_text_message final Strings inline Callback to update the status message safely Definition at line 1249 of file three_B java References set_status Referenced by ThreeBLoader run ThreeBRunner run and ThreeBRunner send_ message_string SwingUtilities invokeLater new Runnable final public void run set_status s 10 6 3 24 void EControlPanel send_time_text_message final Strings inline Callback to update the status message safely Definition at line 1262 of file three_B java References set_time Referenced by ThreeBRunner send_new_points SwingUtilities invokeLater new Runnable final public void run set_time s 10 6 4 Member Data Documentation 10 6 4 1 ImagePlus EControlPanel linear_reconstruction private Definition at line 890 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 108 Referenced by EControlPanel export_reconstruction_as_ij and update_canvas 10 6 4 2 ImageCanvas EControlPanel canvas private Definition at line 891 of file three_B java Referenced by EControlPanel and update_canva
257. rselnt String s e TextField getFWHMField e TextField getPixelSizeField e TextField getSpotsField e TextField getFirstFrameField e TextField getLastFrameField e double getFWHM e double getPixelSize int getSpots e int getFirstFrame int getLastFrame int getCount Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 228 Package Attributes e int count_ e int npix e int nframes e Color c Color bg 10 37 1 Detailed Description Dialog box for starting 3B The dialog highlights bad things in red Definition at line 432 of file three_B java 10 37 2 Constructor amp Destructor Documentation 10 37 2 1 ThreeBDialog ThreeBDialog int count int npix int nframes_ inline package Definition at line 437 of file three_B java References bg c count_ getFWHMField nframes npix and textValueChanged super 3B Analysis count_ count npix npix_ nframes nframes_ addNumericField Microscope FWHM 250 0 1 10 nm addNumericField Pixel size 100 1 10 nm addNumericField Initial number of spots Math round count 10 spots addNumericField First frame 0 0 10 addNumericField Last frame nframes 1 0 10 addTextAreas null 8 30 getTextAreal setEditable false c getFWHMField getBackground Get the default background colour bg getBackground
258. rstFrameField setBackground Color RED getLastFrameField setBackground Color RED err err Warning large number of frames specified n3B will run very slowly and may be inaccurate nFewer than 500 frames is strongly recommended n200 300 is generally most suitable n long_run true if last first 1 lt 150 getFirstFrameField setBackground Color RED getLastFrameField setBackground Color RED err err Warning small number of frames specified n3B may be in accurate nAt least 150 frames is recommended n else getFirstFrameField setBackground c getLastFrameField setBackground c if long_run amp amp last first 1 getCount gt 200000 err err Warning large amount of data specified n 3B will run very slowly n Reduce the area and or number of frames n We recommend n Number of frames xarea in pixels lt 200 000 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 37 ThreeBDialog Class Reference 234 getFirstFrameField setBackground Color RED getLastFrameField setBackground Color RED if err equals getTextAreal setBackground Color RED else getTextAreal setBackground bg getTextAreal setText err repaint 10 37 4 Member Data Documentation 10 37 4 1 int ThreeBDialog count_ package Definition at line 434 of file three_B java Referenced by getCount and ThreeBDialog 10
259. rt_pass 0 This is only nonzero first time since we might chek point midway through an iteration save_spots lt lt PASS lt lt pass lt lt lt lt setprecision 20 lt lt scientifi c lt lt spots_to_Vector spots lt lt endl save_spots lt lt ENDCHECKPOINT lt lt endl lt lt flush ui per_pass iteration pass spots Sort spots according to pass 4 Sort the spots so that the optimization runs in sweeps This heiristic seems to increase the rate of propagation of informa tion about spot positions Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 116 Create a list of indices vector lt int gt index sequence spots size int passs pass iteration Sort the indices according to the position of the spot that they in dex if passs 4 0 sort index begin index end IndexLexicographicPosition lt less lt double gt 2 gt spots j Index Index Index else if passs 4 1 sort index begin index end LexicographicPosition lt greater lt double gt 2 gt spots else if passs 4 1 sort index begin index end LexicographicPosition lt less lt double gt 3 gt spots else sort index begin index end LexicographicPosition lt greater lt double gt 3 gt spots Reorder the spots and their intensities and their pixel lists vector lt Vector lt 4 gt gt tmp_spot index size
260. rts between them See also spots_to_ Vector Parameters s list of spots to convert Definition at line 116 of file multispot5 cc Referenced by NegativeFreeEnergy compute_with_mask generate_state_parameters_ ye_olde and NegativeFreeEnergy operator vector lt Vector lt 4 gt gt r s size 4 for unsigned int i 0 i lt r size i r i s slice lt Dynamic 4 gt i 4 4 return ri 8 2 2 4 Image lt byte gt scale_to_bytes const Image lt float gt amp im float lo float hi Normalize an image for display purposes Definition at line 126 of file multispot5 cc Image lt byte gt out im size for int r 0 r lt out size y 0 r for int c 0 c lt out size x 0O c out r c int floor im r c lo 255 hi lo return out 8 2 2 5 Image lt byte gt scale_to_bytes const Image lt float gt amp im Normalize an image for display purposes Definition at line 137 of file multispot5 cc float lo min_element im begin im end float hi max_element im begin im end Image lt byte gt out im size for int r 0 r lt out size y 0 r for int c 0 c lt out size x 0O ctt out r c int floor im r c lo 255 hi lo return out Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 2 General utility functions 25 8 2 2 6 Image lt float gt average_image const vector lt Image lt float gt gt amp i
261. ruct Template Reference 10 41 Detailed Description ecca eae ee ee 10 4 2 Constructor amp Destructor Documentation 10 4 3 Member Function Documentation 10 4 4 Member Data Documentation 22 29 30 30 42 43 47 49 64 65 70 70 70 71 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen CONTENTS iii 10 5 DataForMCMC Class Reference 20005 93 10 5 1 Detailed Description 2 22 2 0 4 93 10 5 2 Constructor amp Destructor Documentation 93 10 5 3 Member Function Documentation 94 10 5 4 Member Data Documentation 94 10 6 EControlPanel Class Reference 02004 96 10 6 1 Detailed Description 2 ee 97 10 6 2 Constructor amp Destructor Documentation 97 10 6 3 Member Function Documentation 99 10 6 4 Member Data Documentation 107 10 7 ExportButtonListener Class Reference 110 10 7 1 Detailed Description lt o sa boed du aana aa e 111 10 7 2 Constructor amp Destructor Documentation 111 10 7 3 Member Function Documentation 111 10 7 4 Member Data Documentation 111 10 8 FitSpots Class Reference o oo a a 112 10 8 1 Detailed Description lt o s s neca naad anacan i 113 10 8 2 Constructor amp Destructor Documentation 113
262. s 10 6 4 3 JButton EControlPanel stopButton private Definition at line 892 of file three_B java Referenced by EControlPanel and issue_stop 10 6 4 4 JButton EControlPanel exportButton package Definition at line 892 of file three_B java Referenced by EControlPanel and update_canvas 10 6 4 5 JButton EControlPanel closeButton package Definition at line 892 of file three_B java Referenced by EControlPanel 10 6 4 6 Color EConitrolPanel exportButtonColor private Definition at line 893 of file three_B java Referenced by EControlPanel and update_canvas 10 6 4 7 JLabel EConirolPanel status private Definition at line 894 of file three_B java Referenced by EControlPanel and set_status 10 6 4 8 JLabel EControlPanel time_msg package Definition at line 894 of file three_B java Referenced by EControlPanel and set_time Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 109 10 6 4 9 FloatSliderWithBox EConirolPanel blur_fwhm private Definition at line 895 of file three_B java Referenced by EControlPanel and update_canvas 10 6 4 10 FloatSliderWithBox EConirolPanel reconstructed_pixel_size private Definition at line 896 of file three_B java Referenced by EControlPanel export_reconstruction_as_ij and update_canvas 10 6 4 11 Panel EControlPanel complete private Definition at line
263. s Spot Basic spot class simply contains coordinates e class SomethingChanges Listener class which triggers a complete redraw e class FloatSliderWithBox This class makes a floating point slider bar with an edit box next to it for more precision e class FloatSliderWithBox SliderChanged class FloatSliderWithBox TextChanged e class CloseButtonListener Close button issues a window close event e class StopButtonListener Stop 3B thread Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 21 ThreeBHelp java File Reference 289 e class ExportButtonListener Listener for the export button class EControlPanel Control panel for running 3B plugin and providing interactive update e class ThreeBRunner This class deals with running the actual 3B code It should be run in a separate thread It will make calls back to a viewer and accepts termination calls as well 11 21 ThreeBHelp java File Reference Classes e class ThreeBHelp 3B plugin cclass to bring up a basic help window 11 22 ThreeBLoader java File Reference Classes class ThreeBLoader Plugin class to load up an old 3B run 11 23 utility cc File Reference Utility bits include utility h include debug h include lt climits gt 11 23 1 Detailed Description Utility bits Definition in file utility cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 24 utility h File Reference 290 11 24 utility
264. s in the file test_data results txt The pro gram will run indefinitely in the default setup but you may view the results at any stage There is no well defined stopping point for this type of algorithm so it is advisable con tinuously monitor the resultant image and stop the algorithm when the output image is no longer changing with time After 30 minutes on a fast PC e g Core i7 975 the ring structure which is not resolved in the widefield image should be clearly visible After about 75 mins the finer details of the structure begin to approach those seen in Fig 2e in the associated paper The ImageJ plugin can load a results file and perform a reconstruction Alternatively you can process the results file further in order to view the results Run the following command awk PASS for i 2 i lt NF i 4 print i 2 i 3 test_data results txt gt test_data coordinates txt The file test_data coordinates txt contains a long list of x y coordinates representing possible spots positions In order to view the results load the data into a graph plotting program and create a scatter plot NOTE the axes are in pixel coordi nates so you will have to multiple any distances by the number of nm pixel in order to get distances in nm 1 4 1 Example usage explained 1 4 1 1 Test Data The 300 TIFF files in the test directory correspond to the data used for Fig 2 in the paper Please refer to the paper for details on how the
265. sampled_multispot h 10 13 4 14 vector lt vector lt double gt gt SampledMultispot GibbsSampler2 current_ sample _intensities private Definition at line 320 of file sampled_multispot h 10 13 4 15 vector lt double gt SampledMultispot GibbsSampler2 cutout_spot_ intensities private Definition at line 322 of file sampled_multispot h 10 13 4 16 vector lt vector lt double gt gt SampledMultispot GibbsSampler2 cutout_ pixel_intensities private Definition at line 323 of file sampled_multispot h 10 13 4 17 vector lt vector lt double gt gt SampledMultispot GibbsSampler2 cutout_ current_sample_intensities private Definition at line 324 of file sampled_multispot h The documentation for this class was generated from the following file sampled_multispot h 10 14 GraphicsGL Class Reference Graphics class which draws information to the screen using OpenGL Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 14 GraphicsGL Class Reference 159 Inheritance diagram for GraphicsGL FitSpotsGraphics GraphicsGL Public Member Functions GraphicsGL virtual void draw_pixels const vector lt ImageRef gt amp pix float r float g float b float a virtual void draw_bbox const BBox amp bbox virtual void draw_krap const vector lt Vector lt 4 gt gt amp spots const Image lt byte gt amp im const BBox amp box int N Vector lt 4 gt s virtual void gIDraw
266. sary things frame range and pixel size 75 ClassicGlow Plugin implementing the classic glow hot LUT which seems to be missing from ImageJ 79 CloseButionListener Close button issues a window close event 80 ConjugateGradientOnly lt Size Precision gt Class for performing opti mization with Conjugate Gradient where only the derivatives are avail able 82 DataForMCMC Closure hoding the data required do use GibbsSampler2 See FitSpots for naming of variables 93 EConirolPanel Control panel for running 3B plugin and providing inter active update 96 ExportButtonListener Listener for the export button 110 FitSpots Mega class which actually does the meat of the spot fitting 112 FitSpotsGraphics Graphics class for FittingSpots 132 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 6 1 Class List 17 FloatSliderWithBox This class makes a floating point slider bar with an edit box next to it for more precision 135 FreeEnergyHessian Class for computing the Hessian of the negative free energy 141 SampledMultispot GibbsSampler Draw samples from the spot states given the spots positions and some data 146 SampledMultispot GibbsSampler2 Gibbs sampling class which masks spots to reduce computation 151 GraphicsGL Graphics class which draws information to the screen us ing OpenGL 158 IndexLexicographicPosition lt Cmp First gt Class for sorting a list of in dexes to an array of spots lexicogr
267. show_thresholded 0 1 Image lt Rgb lt byte gt gt reg log_ratios size Rgb lt byte gt 0 0 0 bool first true BBox cbox make_pair ImageRef_zero ImageRef_zero for double centre GV3 get lt double gt centre 0 1 double range GV3 get lt double gt range 0 1 line poll Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5 gui cc File Reference 274 win make_current GUI_Widgets process_in_crnt_thread if watch_update first first 0 regions get_regions log_ratios Colourize regions reg fill Rgb lt byte gt 0 0 0 for unsigned int i 0 i lt regions size i Rgb lt byte gt c do c red rand 255 c green rand 255 c blue rand 255 while min c red min c green c blue lt 128 amp amp min abs c red c green min abs c red c blue abs c green c blue lt 64 for unsigned int j 0 j lt regions i size j reg regions i j c if use_largest amp amp regions empty xcluster_to_show 0 for unsigned int i l i lt regions size i if regions i size gt regions xcluster_to_show size xcluster_to_show i else xcluster_to_show max min cluster_to_show int regions size 1 0 f E if regions empty cbox boundingbox regions cluster_to_show if regions empty amp amp start_processing GraphicsGL graphics plac
268. sian2 and sampled_background_spot_hessian_FAKE using namespace TooN using namespace std using namespace std trl if compute_hessian 1 compute_deriv 1 static const int M Btype NumParameters int states pi size delta j i delta_t i vector lt array lt double States gt gt delta O size diff_delta t j n d de_n delta_t j vector lt array lt Vector lt M gt States gt gt diff_delta O size Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 34 ness_delta t j m n d2 de_n de_m delta_t j vector lt array lt Matrix lt M gt States gt gt hess_delta O size Initialization Eqn 19 P 262 Set initial partial log probabilities for int i 0 i lt states i delta 0 i In pifi B log i O 0 if compute_deriv diff_delta 0 i B diff_log i O 0 if compute_hessian hess_delta 0 i B hess_log i O 0 Perform the recursion Eqn 20 P262 Note use T and T 1 Rather than T 1 and T for unsigned int t 1 t lt O size t for int j 0 j lt states j double Ztj HUGE_VAL This is Z_t j for int i 0 i lt states i Ztj max Ztj delta t 1 i ln A i jl double sum 0 for int i 0 i lt states i sum exp delta t 1 i ln A i j Ztj delta t j B log j O t Ztj 1n sum if compute_deriv Vector lt M gt sum_t
269. size for int yy 0 yy lt size y yytt for int xx 0 xx lt size x XX double x xx 2 size x 1 double x2 xxx double y yy 2 size y 1 double y2 yy monomials yy xx makeVector l x Y X2 x y for int i 0 i lt 100 i for int yy 0 yy lt size y yytt for int xx 0 xx lt size x xx polynomial yy xx monomials yy xx WLS lt 10 gt wls for unsigned int i 0 i lt ims size i for int yy 0 yy lt size y yytt for int xx 0 xx lt size x XX double t double func p 7 i x1 ims size polynomial yy xx 9 t Vector lt 10 gt md exp p 6 t y2 p slice lt 0 6 gt p 8 exp pI t t p 8 mJ slice lt 0 6 gt exp p 6 t monomials yy xx mJ slice lt 3 3 gt Zeros mJ 6 polynomial yy xx exp p 6 t mI 6 func t mJ 7 1 mJ 8 polynomiall yy xx exp p 9 t mJ 9 polynomiall yy xx exp p 9 t double err ims i yy xx func double w if err gt 0 w 01 abs err 01 else w 1 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 6 Storm imagery classes basic image processing 67 wls add_mJ func ims i yy xx mJ w wls add_prior 10 wls compute p wls get_mu cout lt lt p lt lt endl lt lt endl for unsigned int i 0 i lt ims size i for int yy 0 yy l
270. sk p intensity spot_inte nsities mask p Add and remove a drifty spot only over a mask template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities const vecto r lt vector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask const int steps spot_intensities size const int frames current_sample_intensities size Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 32 SampledMultispot SpotWithBackgroundMasked Struct Reference 212 for int frame 0 frame lt frames framet t int s frame steps frames if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities s mask p template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt v ector lt T gt gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask const int steps spot_intensities size const int frames current_sample_intensities size for int frame 0 frame lt frames framet t int s frame steps frames if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p inte
271. ssary things frame range and pixel size Public Member Functions boolean dialogltemChanged GenericDialog gd java awt AWTEvent e double parseDouble String s Package Functions AdvancedDialog String cfg int nframes_ int parselnt String s TextField getPixelSizeField TextField getFirstFrameField TextField getLastFrameField double getPixelSize int getFirstFrame int getLastFrame Package Attributes boolean ok true int nframes 10 1 1 Detailed Description Control panel which basically presents the cfg file in a large edit box along with addi tional necessary things frame range and pixel size Also make the user acknowledge that they might be getting into trouble This is uglier than would like Definition at line 307 of file three_B java Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 1 AdvancedDialog Class Reference 76 10 1 2 Constructor amp Destructor Documentation 10 1 2 1 AdvancedDialog AdvancedDialog String cfg int nframes_ inline package Definition at line 311 of file three_B java References dialogltemChanged and nframes super 3B Analysis nframes nframes_j addMessage Advanced configuration addMessage addCheckbox I understand 3B enough to be editing the text below false addTextAreas cfg null 40 100 addNumericField Pixel size nm pixel 100 1 10 nm addNumericField First fram
272. st pair lt A B gt amp b const 10 18 1 Detailed Description Comparator functor for the first element of a std pair Definition at line 707 of file multispot5 cc 10 18 2 Member Function Documentation 10 18 2 1 template lt class A class B gt bool LessSecond operator const pair lt A B gt amp a const pair lt A B gt amp b const inline Comparison function Parameters a b Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 19 LoadTestData Class Reference 175 Definition at line 712 of file multispot5 cc return a second lt b second The documentation for this struct was generated from the following file e multispot5 cc 10 19 LoadTestData Class Reference Plugin class to load the standard test data from the JAR file Public Member Functions e void run String arg 10 19 1 Detailed Description Plugin class to load the standard test data from the JAR file Definition at line 27 of file LoadTestData java 10 19 2 Member Function Documentation 10 19 2 1 void LoadTestData run String arg inline Definition at line 29 of file LoadTestData java Opener o new Opener InputStream s getClass getClassLoader getResourceAsStream test_dat a tit ImagePlus im o openTiff s test_data tiff try s close catch IOException close_err Toolkit getDefaultToolkit beep ij IJ showStatus Error reading image re
273. t Models evaluated n else cout lt lt Determinant has bad eigenvalues n keep original cout lt lt hess_decomp get_evalues lt lt endl if keep 2 spots model_2 cout lt lt Keeping model 2 n else spots model_l cout lt lt Keeping model 1 n if original keep cout lt lt Model changed n oreak 10 8 3 3 void FitSpots run inline Run the complete optimization algorithm Definition at line 2043 of file multispot5 cc References spots_to_Vector Referenced by fit_spots_new graphics init ims 0 size save_spots lt lt LOGVERSION 2 lt lt endl save_spots lt lt PIXELS for unsigned int i 0 i lt pixels size i save_spots lt lt T lt lt pixels i x lt lt lt lt pixels il y save_spots lt lt endl save_spots lt lt BEGINGVARLIST lt lt endl GV3 print_var_list save_spots 1 save_spots lt lt ENDGVARLIST lt lt endl Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 126 TODO all GVARS are set so dump out gvars cout lt lt Limit vector lt lt limit lt lt endl for iteration start_iteration iteration lt outer_loop_iterations iteration t save_spots lt lt Iteration lt lt iteration lt lt lt lt iteration main_passes lt lt lt lt endl save_spots lt lt MAIN lt lt setprecision 20 lt lt s
274. t iterate Update the position gradient and conjugate directions old_g g old_h h g grad Precision gamma g g oldgx g oldg oldg Precision gamma g g old_g g old_g old_g h g gamma old_h minus_h h 10 4 3 6 template lt int Size 1 class Precision double gt template lt class Deriv gt bool ConjugateGradientOnly lt Size Precision gt iterate const Deriv amp deriv inline Use this function to iterate over the optimization Note that after iterate returns false g h old_g and old_h will not have been updated This function updates Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 89 e X old_c iterations gx e old_g e hx e old_hx d variables not updated on the last iteration Parameters deriv Functor to compute derivatives at the specified point Returns Whether to continue Definition at line 256 of file conjugate_gradient_only h References ConjugateGradientOnly lt Size Precision gt find_next_point ConjugateGradientOnly lt Size Precision gt finished ConjugateGradientOnly lt Size Precision gt new_g and ConjugateGradientOnly lt Size Precision gt update_vectors_PR Referenced by FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_ modifying_model find_next_poi
275. t void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt spot_intensities size ptt current_sample_intensities frame p intensity spot_intensitie s p Add and remove a spot only over a mask template lt class T gt void remove_spot vector lt vector lt double gt gt amp current_sample_intensities r lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask const vecto for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame mask p intensity spot_inte nsities mask p template lt class T gt void add_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample const vector lt int gt amp mask for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so add it for unsigned int p 0 p lt mask size ptt current_sample_intensities frame ma
276. t 2 M_PI double prob exp s phi 0 phi 1l r_2_pi TooN Vector lt 2 gt deriv exp s phif l r_2_pi TooN makeVector 1 0 1 2 s phi l return std make_pair prob deriv 8 5 1 13 template lt class B gt double spot_shape const TooN Vector lt 2 gt amp x const TooN Vector lt 4 double B gt amp phi see spot_shape_hess Parameters X X phi Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen r2 pij phi 8 5 Storm classes 59 Returns L x Definition at line 162 of file storm h References spot_shape_s Referenced by log_probability_spot double s spot_shape_s x phi double r_2_pi sqrt 2 M_PI FIXME FIXME FIXME and don t forget to fix the HESSIAN AND DERIVATIVE Should be 1 2 pi s 2 for two dimensions ie VVVVVVVVVVVVV http lol i trollyou com double prob exp s phi 0 phi 1 r_2_pi return prob 8 5 1 14 template lt class Base gt std tr1 tuple lt double TooN Vector lt 2 gt TooN Matrix lt 2 gt gt log_probability_spot_hess const CVD Sublmage lt float gt amp im double variance const TooN Vector lt 4 double Base gt amp spot_parameters Find the log probability of an image patch assuming zero base line mean and the given variance This function makes use of the spot shape It is assumed that the centre pixel of the image is at 0 0 Since the noise is
277. t lt Times lt lt time_gibbs lt lt lt lt time_cg lt lt endl save_spots lt lt INTERMEDIATE lt lt setprecision 15 lt lt scientifi c lt lt spots_to_Vector spots lt lt endl 10 8 3 2 void FitSpots try_modifying model inline Perform a complete iteration of the model size modification stage of the spot fitting algorithm Definition at line 1729 of file multispot5 cc References SampledMultispot add_spot boundingbox SampledMultispot compute_ spot_intensity NegativeFreeEnergy compute_with_mask get_spot_pixels ConjugateGradientOnly lt Size Precision gt init ConjugateGradientOnly lt Size Precision gt iterate In log_ normal_mode SampledMultispot GibbsSampler next SampledMultispot GibbsSampler2 next SampledMultispot remove_spot SampledMultispot GibbsSampler sample Sampled Multispot GibbsSampler2 sample SampledMultispot GibbsSampler sample_intensities SampledMultispot GibbsSampler2 sample_intensities sampled_background_spot_ hessian_ffbs scale_to_bytes spots_to_Vector and ConjugateGradientOnly lt Size Precision gt x for int i 0 i lt add_remove_tries i ui per_modification iteration i add_remove_tries ui perhaps_stop cout lt lt endl lt lt endl lt lt Modifying the model lt lt endl lt lt N cout lt lt Hello n bool add_spot rng gt
278. t size y yytt for int xx 0 xx lt size x xx double x xx 2 size x 1l double x2 xxx double y yy 2 size y 1 double y2 yy double t i 1 ims size Vector lt 6 gt f makeVector 1l x Y X2 X Y y2 double func f p slice lt 0 6 gt exp p 6 t p 8 exp p 9 t p T ims i yy xx func tie mean variance mean_and_variance ims A sanity check cerr lt lt The mean should be small compared to std n cerr lt lt mean lt lt mean lt lt endl cerr lt lt std lt lt sqrt variance lt lt endl Scale by the variance for unsigned int i 0 i lt ims size i transform ims i begin ims i end ims i begin bindlst multi plies lt double gt 1 sqrt variance tie mean variance mean_and_variance ims cerr lt lt Rescaled n cerr lt lt mean lt lt mean lt lt endl cerr lt lt Std lt lt sqrt variance lt lt endl return ims 8 6 1 2 vector lt Image lt float gt gt load_and_preprocess_images const vector lt string gt amp names Load all images from disk and do the initial preprocessing Currently this is a high pass filter to make the resultimg images zero mean The filter is controlled with the preprocess l1pf and preprocess skip Gvars Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 6 Storm imagery classes basic image processing 68
279. t pixels Mask around each spot to use to save on computation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 184 Definition at line 290 of file multispot5 cc References Kahan add SampledMultispot compute_spot_intensity DataForMCMC get_ rng log_log_normal SampledMultispot GibbsSampler2 next SampledMultispot GibbsSampler2 sample_ intensities SampledMultispot GibbsSampler2 set_variance spots_to_vector and sq Referenced by FitSpots try_modifying_model Estimate free energy using the Slow Growth Thermodynamic Integration me thod given in Probalistic Inference Using Markov Chain Monte Carlo Methods Radford M Neal 1993 Except using a 5 point stencil instead of forward differenceing in Eq 6 30 double base_sigma sqrt variance should be 1 double scale_pow 100 0 const unsigned int nspots spots size 4 const unsigned int nframes pixel_intensities size const unsigned int npixels pixels size assert spots size 4 0 assert spot_pixels size nspots Compute the intensities and derivatives for all spot vector lt vector lt double gt gt spot_intensity spot pixel for unsigned int i 0 i lt nspots i spot_intensity push_back compute_spot_intensity pixels spots slice lt D ynamic 4 gt ix4 4 GibbsSampler2 sampler pixel_intensities spot_intensity spots_to_ve
280. t_intensity_hessian const vector lt ImageRef gt amp pixels const Vector lt 4 gt amp params e vector lt int gt sequence int n 9 1 1 Function Documentation 9 1 1 1 double SampledMultispot intensity doublei inline Definition at line 46 of file sampled_multispot h Referenced by add_spot and remove_spot return i 9 1 1 2 double SampledMultispot intensity const pair lt double Vector lt 4 gt gt amp i inline Definition at line 51 of file sampled_multispot h return i first 9 1 1 3 template lt class T gt void SampledMultispot remove_spot vector lt vector lt double gt gt amp current_sample_intensities const vector lt T gt amp spot_intensities const vector lt State gt amp spot_sample Definition at line 59 of file sampled_multispot h References intensity Referenced by SampledMultispot GibbsSampler2 next SampledMultispot GibbsSampler next FitSpots optimize_each_spot_in_turn_for_several_passes and FitSpots try_modifying_ model Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 9 1 SampledMultispot Namespace Reference 72 for unsigned int frame 0 frame lt current_sample_intensities size frame if spot_sample frame 0 Spot is on so remove it for unsigned int p 0 p lt spot_intensities size ptt current_sample_intensities frame p intensity spot_intensitie s p 9 1 1 4 template lt class T gt
281. ta back i log_prob hess_delta back i dif f_delta back i as_col diff_delta back i as_row hess_log diff_log as_col diff_log as_row Compute the differential of the Hessian return make_tuple log_prob diff_log hess_log 8 3 2 2 template lt int States class Btype class Otype gt double forward_algorithm TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O Run the forward algorithm and return the log probability Parameters A A State transition probabilities pi 7 initial state probabilities O O or I the observed data ie the images B B A function object giving the log probability of an observation given a state Returns the log probability of observing all the data Definition at line 244 of file forward_algorithm h References In using namespace TooN using namespace std using namespace std trl int states pi size delta j i delta_t i vector lt array lt double States gt gt delta O size Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 36 Initialization Eqn 19 P 262 Set initial partial log probabilities for int i 0 i lt states i delta 0 i ln pifi B log i O 0 Perform the recursion Eqn 20 P262 Note use T and T 1 Rather than T 1 and
282. teGradientOnly lt Size Precision gt DataForMCMC FreeEnergyHessian NegativeFreeEnergy 19 21 29 42 47 64 70 70 75 79 80 82 93 141 182 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 5 1 Class Hierarchy 15 EControlPanel 96 ExportButtonListener 110 FitSpots 112 FitSpotsGraphics 132 GraphicsGL 158 NullGraphics 189 FloatSliderWithBox 135 SampledMultispot GibbsSampler 146 SampledMultispot GibbsSampler2 151 IndexLexicographicPosition lt Cmp First gt 165 Kahan 172 LessSecond 174 LoadTestData 175 LogFileParseError 176 MT19937 177 MT19937 ParseError 194 SampledBackgroundData 194 SpotNegProbabilityDiffWithSampledBackground 203 FloatSliderWithBox SliderChanged 198 SomethingChanges 199 SPair 200 Spot 201 SampledMultispot SpotWithBackgroundMasked 207 StateParameters 219 StopButtonListener 220 FloatSliderWithBox TextChanged 221 three_B 223 Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 6 Class Index 16 ThreeBDialog 227 ThreeBGlobalConstants 235 ThreeBHelp 235 ThreeBLoader 236 ThreeBRunner 240 UserlInterfaceCallback 249 JNIUserInterface 167 NullUICallback 192 UserlInterfaceCallback UserlssuedStop 251 Util 251 6 Class Index 6 1 Class List Here are the classes structs unions and interfaces with brief descriptions AdvancedDialog Control panel which basically presents the cfg file in a large edit box along with additional neces
283. ted Definition at line 182 of file multispot5 cc 10 5 4 8 constint DataForMCMC samples protected Definition at line 183 of file multispot5 cc 10 5 4 9 constint DataForMCMC sample_ iterations protected Definition at line 183 of file multispot5 cc 10 5 4 10 const Matrix lt 3 gt DataForMCMC A protected Definition at line 184 of file multispot5 cc 10 5 4 11 const Vector lt 3 gt DataForMCMC pi protected Definition at line 185 of file multispot5 cc 10 5 4 12 MT19937 amp DataForMCMC rng protected Definition at line 186 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 96 The documentation for this class was generated from the following file multispot5 cc 10 6 EConirolPanel Class Reference Control panel for running 3B plugin and providing interactive update Public Member Functions void windowOpened WindowEvent e void windowClosed WindowEvent e e void windowDeactivated WindowEvent e e void windowActivated WindowEvent e e void windowDeiconified WindowEvent e e void windowlconified WindowEvent e void windowClosing WindowEvent e void issue_stop synchronized void append final ArrayList lt Spot gt p int its void send_update_canvas_event void die final String s void send_status_text_message final String s void send_time_text_message final String s Package Functions ECont
284. tensities private Pixel intensities for all images frame pixel Definition at line 1427 of file multispot5 cc 10 8 4 40 DataForMCMC FitSpots data_for t_meme private Aggergated data for thermodynamic integration Definition at line 1429 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 9 FitSpotsGraphics Class Reference 132 10 8 4 41 DataForMCMC FitSpots data_for_h_mecmec private Aggergated data for finding hessian Definition at line 1480 of file multispot5 cc 10 8 4 42 int FitSpots iteration private Iteration number Definition at line 1482 of file multispot5 cc The documentation for this class was generated from the following file multispot5 cc 10 9 FitSpotsGraphics Class Reference Graphics class for FittingSpots include lt multispot5 h gt Inheritance diagram for FitSpotsGraphics FitSpotsGraphics GraphicsGL NullGraphics Public Member Functions e virtual void init CVD ImageRef size 0 e virtual void draw_krap const std vector lt TooN Vector lt 4 gt gt amp spots const CVD Image lt CVD byte gt amp im const BBox amp box int N TooN Vector lt 4 gt s TOON Ones 1e99 0 e virtual void swap 0 e virtual void draw_pixels const std vector lt CVD lmageRef gt amp pix float r float g float b float a 1 0 e virtual void draw_bbox const BBox amp bbox 0 e virtual void gIDrawCross const TooN Vector lt
285. tios e void mmain int argc char argv e int main int argc char argv Variables map lt string string gt watch 11 12 1 Detailed Description FitSpots driver for interactive GUI operation and debugging Definition in file multispot5_gui cc 11 12 2 Function Documentation 11 12 2 1 double lim double x Definition at line 34 of file multispot5_gui cc Referenced by scale Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 12 multispot5_gui cc File Reference 270 return min max x 0 1 11 12 2 2 Image lt byte gt scale const Sublmage lt double gt amp i double cir double rng Definition at line 40 of file multispot5_gui cc References lim Referenced by mmain select_random_element and NegativeFreeEnergy variance_ from_sample Image lt byte gt s i size for int r 0 r lt i size y r for int c 0 c lt i size x ctt Pixel DefaultConversion lt float byte gt type convert lim i r c c tr rng s r c return s 11 12 2 3 void draw_bbox const BBox amp bbox Definition at line 49 of file multispot5_gui cc Referenced by GraphicsGL draw_bbox GraphicsGL draw_krap and mmain glBegin GL_LINES glVertex bbox first glVertex2i bbox first x bbox first y bbox second y glVertex2i bbox first x bbox first y bbox second y glVertex bbox first bbox second glVertex bbox first bbox second glVertex
286. to add remove a spot Definition at line 1395 of file multispot5 cc 10 8 4 25 const int FitSpots add_remove_opt_samples private Number of samples to use in model modification phase Definition at line 1396 of file multispot5 cc 10 8 4 26 const int FitSpots add_remove_opt_retries private Number of attempts restarting the optimization to escape saddle points Definition at line 1397 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 130 10 8 4 27 const int FitSpots add_remove_opt_hess_inner_samples private Number of extra FFBS samples to use for computing Hessian when testing for conver gence to non saddle point Definition at line 1398 of file multispot5 cc 10 8 4 28 constint FitSpots h_outer_samples private Number of samples used for computing Hessian as part of Laplace s approximation Definition at line 1399 of file multispot5 cc 10 8 4 29 constint FitSpots h_inner_samples private Number of additional FFBS samples to use for computing Hessian as part of Laplace s approximation Definition at line 1400 of file multispot5 cc 10 8 4 30 constint FitSpots tsamples private Number of samples to use in thermodynamic integration Definition at line 1401 of file multispot5 cc 10 8 4 31 const Image lt float gt FitSpots ave private Average of input data used for Definition at line 1404 of file multispot5 cc
287. tor lt ImageRef gt amp pixels_ const vector lt vector lt double gt gt amp pixel_intensities_ double mu_brightness_ double sigma_brightness_ double mu_blur_ double sigma_blur_ double variance_ int samples_ int sample_ iterations_ Matrix lt 3 gt A_ Vector lt 3 gt pi_ MT19937 amp rng_ Protected Attributes const vector lt ImageRef gt amp pixels e const vector lt vector lt double gt gt amp pixel_intensities const double mu_brightness const double sigma_brightness e const double mu_blur const double sigma_blur const double variance const int samples const int sample_iterations e const Matrix lt 3 gt A e const Vector lt 3 gt pi e MT19937 amp rng 10 5 1 Detailed Description Closure hoding the data required do use GibbsSampler2 See FitSpots for naming of variables Definition at line 176 of file multispot5 cc 10 5 2 Constructor amp Destructor Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 5 DataForMCMC Class Reference 94 10 5 2 1 DataForMCMC DataForMCMC const vector lt ImageRef gt amp pixels_ const vector lt vector lt double gt gt amp pixel_intensities_ double mu_brightness_ double sigma_brightness_ double mu_blur_ double sigma_blur_ double variance_ int samples_ int sample_iterations_ Matrix lt 3 gt A_ Vector lt 3 gt pi_ MT19937 amp rng_ inline Definition at line 195 of file multisp
288. truct was generated from the following file multispot5 h 10 34 StopButtonListener Class Reference Stop 3B thread Public Member Functions e StopButtonListener EControlPanel t_ e void actionPerformed ActionEvent e Private Attributes EControlPanel t 10 34 1 Detailed Description Stop 3B thread Definition at line 856 of file three_B java 10 34 2 Constructor amp Destructor Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 35 FloatSliderWithBox TextChanged Class Reference 221 10 34 2 1 StopButtonListener StopButtonListener EControlPanelt inline Definition at line 859 of file three_B java References t 10 34 3 Member Function Documentation 10 34 3 1 void StopButtonListener actionPerformed ActionEvente inline Definition at line 864 of file three_B java References EControlPanel issue_stop and t t issue_stop 10 34 4 Member Data Documentation 10 34 4 1 EControlPanel StopButtonListener t private Definition at line 858 of file three_B java Referenced by actionPerformed and StopButtonListener The documentation for this class was generated from the following file e three_B java 10 35 FloatSliderWithBox TextChanged Class Reference Public Member Functions e void actionPerformed ActionEvent e Package Functions TextChanged FloatSliderWithBox f_ Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10
289. try s x Double parseDouble tokens i 2 s y Double parseDouble tokens i 3 catch NumberFormatException nerr throw new IOException corrupt file bad spot positio n spots add s if roi null throw new IOException corrupt file no ROI final String fname name final Rectangle roi_ roi final int its iterations SwingUtilities invokeLater new Runnable public void run EControlPanel e new EControlPanel roi_ pixel_size_ in_nm_ fname null append spots its send_update_canvas_event send_status_text_message Using fname iterations 00 0 Integer toString its i Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 41 ThreeBRunner Class Reference 240 catch IOException another_ioe Toolkit getDefaultToolkit beep ij IJ showStatus Error reading data another_ioe getMessage finally close in The documentation for this class was generated from the following file e ThreeBLoader java 10 41 ThreeBRunner Class Reference This class deals with running the actual 3B code It should be run in a separate thread It will make calls back to a viewer and accepts termination calls as well Public Member Functions e void register EControlPanel c void run Static Public Member Functions e static void addLibraryPath String pathToAdd throws Exception Package Functions e ThreeBRunner BytePr
290. tual void FitSpotsGraphics swap pure virtual Swap buffers if double buffered Implemented in NullGraphics and GraphicsGL 10 9 3 4 virtual void FitSpotsGraphics draw_pixels const std vector lt CVD ImageRef gt amp pix float r float g float b floata 1 pure virtual Draw the pixel mask in an r g b a tuple colour Parameters pix mask red green i g b blue a alpha Implemented in NullGraphics 10 9 3 5 virtual void FitSpotsGraphics draw_bbox const BBox amp bbox pure virtual Draw a bounding box Parameters bbox Box corners Implemented in NullGraphics and GraphicsGL 10 9 3 6 virtual void FitSpotsGraphics glDrawCross const TooN Vector lt 2 gt amp p int size 3 pure virtual Draw a cross Parameters p Position of cross size Size to draw cross Implemented in NullGraphics Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 10 FloatSliderWithBox Class Reference 135 The documentation for this class was generated from the following files e multispot5 h multispot5 cc 10 10 FloatSliderWithBox Class Reference This class makes a floating point slider bar with an edit box next to it for more precision Classes e class SliderChanged e class TextChanged Public Member Functions e FloatSliderWithBox String text_ double min_ double max_ double value_ int co
291. tual void UserinterfaceCallback per_spot int iteration int pass int spot_num int totalspots pure virtual This function is called once per spot in each pass The idea is to provide a display along the lines of Iteration 1 optimizing 2 complete Parameters iteration Iteration number pass Pass number spot_num Spot currently being optimized total_spots Total number of spots to be optimized Implemented in NullUICallback and JNiUserlInterface 10 42 3 2 virtual void UserlnterfaceCallback per_modification int iteration int spot_num int total spots pure virtual This function is called once per spot in the modification phase The idea is to provide a display along the lines of Iteration 1 modifying 2 complete Parameters iteration Iteration number spot_num Spot currently being optimized total_spots Total number of spots to be optimized Implemented in NullUICallback and JNIUserlnterface 10 42 3 3 virtual void UserlnterfaceCallback per_pass int iteration int pass const std vector lt TooN Vector lt 4 gt gt amp spots pure virtual This function is called once each time PASS data is outputted It will allow the GUI to build up a reconstruction Parameters iteration Iteration number pass Pass number spots Data to be reconstructed Implemented in NullUICallback and JNIUserlnterface
292. tup the parameters for a run using the old and deeply peculiar method This includes the unpleasant and diffucult so use de checkpointing code wtf The use of this function is very strongly deprecated Parameters log_ratios Image from which region is selected ims Input data pixels Region for spot fitting to run in Definition at line 1150 of file multispot5 cc References assert_same_size StateParameters iteration log_normal_mode StatePa rameters pass StateParameters pixels StateParameters rng StateParameters spots and spots_to_vector sort pixels begin pixels end const double variance 1 it should be To scale the X axis of a log normal distribution only the mu parameter needs to be changed Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 11 10 multispot5 cc File Reference 264 const double intensity_mu GV3 get lt double gt intensity rel_mu 0 1 og sqrt variance const double intensity_sigma GV3 get lt double gt intensity rel_sigma 0 i const double blur_mu GV3 get lt double gt blur mu 0 1 const double blur_sigma GV3 get lt double gt blur sigma 0 1 The region was extracted at a certain threshold These regions may be too small so some post region finding dilation may be performed New spots are only placed at pixels which exceed the thre shold post_dilate threshold is if set used
293. tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d e Matrix lt 4 gt get_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d e template lt class C gt bool type_has_hess const C amp e bool type_has_hess const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp template lt class C gt bool type_has_diff const C amp bool type_has_diff const pair lt double Vector lt 4 gt gt amp e bool type_has_diff const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp e template lt class Input gt SpotWithBackgroundMasked const vector lt vector lt double gt gt amp sample_ intensities const SWBG_SPOT_INTENSITIES amp spot_intensities const vector lt vector lt double gt gt amp pixel_intensities const double variance const vector lt int gt amp mask e double log int state int obs const e Vector lt 4 gt diff_log int state int obs const e Matrix lt 4 gt hess_log int state int obs const e double get_val double d e Vector lt 4 gt get_diff double e Matrix lt 4 gt get_hess double double get_val const pair lt double Vector lt 4 gt gt amp d e Vector lt 4 gt get_diff const pair lt double Vector lt 4 gt gt amp d e Matrix lt 4 gt get_hess const pair lt double Vector lt 4 gt gt amp e double get_val const tuple lt double Vector lt 4 gt Matrix lt 4 gt gt amp d e
294. turn Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 20 LogFileParseError Struct Reference 176 im show im updateAndDraw System out println getClass getResource toString n System out println getClass getResource getPath toString n System out println getClass getResource getFile toString n 3 The documentation for this class was generated from the following file e LoadTestData java 10 20 LogFileParseError Struct Reference Null struct thrown if a parse error is encountered when trying to load a log file include lt multispot5 h gt Public Member Functions e LogFileParseError const std string amp s Public Attributes e std string what 10 20 1 Detailed Description Null struct thrown if a parse error is encountered when trying to load a log file Definition at line 102 of file multispot5 h 10 20 2 Constructor amp Destructor Documentation 10 20 2 1 LogFileParseError LogFileParseError const std string amp s inline Parameters s error message to set Definition at line 105 of file multispot5 h Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 21 MT19937 Struct Reference 177 what s 10 20 3 Member Data Documentation 10 20 3 1 std string LogFileParseError what variable holding the parse error error message Definition at line 110 of file multispot5 h Referenced b
295. ullGraphics 10 23 1 Detailed Description Graphics class which does absoloutely nothing Definition at line 75 of file multispot5 cc 10 23 2 Constructor amp Destructor Documentation 10 23 2 1 virtual NullGraphics NullGraphics _ inline virtual Definition at line 84 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 23 NullGraphics Class Reference 190 10 23 3 Member Function Documentation 10 23 3 1 virtual void NullGraphics init CVD ImageRef size inline virtual Initialize graphics Parameters size Size of window for display Implements FitSpotsGraphics Definition at line 78 of file multispot5 cc 10 23 3 2 virtual void NullGraphics draw_krap const std vector lt TooN Vector lt 4 gt gt amp spots const CVD lmage lt CVD byte gt amp im const BBox amp box int N TooN Vector lt 4 gt s inline virtual Draw a bunch of stuff Parameters spots List of spots to draw im Background image box Bounding box of region N Spot to highlight s Extra spot to draw as a cross Implements FitSpotsGraphics Definition at line 79 of file multispot5 cc 10 23 3 3 virtual void NullGraphics swap inline virtual Swap buffers if double buffered Implements FitSpotsGraphics Definition at line 80 of file multispot5 cc Generated on Wed Nov 28 2012 15 39 12
296. ultispot h 10 12 4 13 vector lt vector lt double gt gt SampledMultispot GibbsSampler current_ sample _intensities private Definition at line 203 of file sampled_multispot h The documentation for this class was generated from the following file sampled_multispot h 10 13 SampledMultispot GibbsSampler2 Class Reference Gibbs sampling class which masks spots to reduce computation include lt sampled_multispot h gt Public Member Functions e GibbsSampler2 const vector lt vector lt double gt gt amp pixel_intensities_ const vector lt vector lt double gt gt amp spot_intensities_ const vector lt Vector lt 4 gt gt amp spots_ const vector lt vector lt int gt gt amp spot_pixels_ const Matrix lt 3 gt A_ const Vector lt 3 gt pi_ double variance_ int sample_iterations_ void set_variance double v void reset e template lt class T gt void next T amp rng Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 13 SampledMultispot GibbsSampler2 Class Reference 152 const vector lt vector lt State gt gt amp sample const const vector lt vector lt double gt gt amp sample_intensities const Private Attributes const vector lt vector lt double gt gt amp pixel_intensities const vector lt vector lt double gt gt amp spot_intensities e const vector lt Vector lt 4 gt gt spots const std vector lt std vector lt i
297. umentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 22 NegativeFreeEnergy Class Reference 183 10 22 2 1 NegativeFreeEnergy NegativeFreeEnergy const DataForMCMC amp d inline Parameters d Necessary data Definition at line 266 of file multispot5 cc DataForMCMC d 10 22 3 Member Function Documentation 10 22 3 1 double NegativeFreeEnergy variance_from_sample double sample double samples double base_sigma double scale pow const inline Give the noise variance given a sample number and growth parameters Parameters sample Sample number samples Total number of samples base_sigma Starting value of sigme scale_pow Exponent scaling Definition at line 276 of file multispot5 cc References scale and sq double scale pow 1 25 sample 1 samples scale_pow double sigma base_sigma scale double new_variance sq sigma j return new_variance 10 22 3 2 double NegativeFreeEnergy compute_with_mask const Vector lt gt amp spots const vector lt vector lt int gt gt amp spot_pixels const inline Estimate free energy using the Slow Growth Thermodynamic Integration method given in Probalistic Inference Using Markov Chain Monte Carlo Methods Radford M Neal 1993 Except using a 5 point stencil instead of forward differenceing in Eq 6 30 Parameters spots list of spots spo
298. und_spot_hessian_ffbs cg x data add_remove_opt_hess_inner_samples rng SymEigen lt 4 gt hess_decomp hessian cout lt lt What the fuck lt lt endl lt lt hessian lt lt endl lt lt hessian3 lt lt endl lt lt hessian2 lt lt endl cout lt lt Eigenvalues are lt lt hess_decomp get_evalues lt lt endl if hess_decomp is_negdef break else Restart in the direction of the best uphill part cg init cg x 0 1 hess_decomp get_evectors 3 hess_decomp get_evectors 3 cout lt lt Grad lt lt compute_deriv cg x lt lt endl for int i 0 i lt 4 i cout lt lt Direction lt lt i lt lt endl cout lt lt unit compute_deriv cg x 0 1l hess_decomp get_evectors i hess_decomp get_evectors i lt lt endl for int i 0 i lt 4 itt cout lt lt Direction lt lt i lt lt endl Vector lt 4 gt d Zeros difil 1 cout lt lt unit compute_deriv cg x d hess_deco mp get_evectors i lt lt endl Update to use the result of the optimization model_2 spot cg x graphics draw_krap model_2 scale_to_bytes ave boundingbox pixels 1 graphics swap Update cached data based on the new spot position model2_spot_intensities spot compute_spot_intensity pixels mo del_2 spot Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 8 FitSpots Class Reference 123 get_spot_pix
299. us status_pos Create the ETA massage time_msg new JLabel if tbr null set_time unknown else set_time not running complete add time_msg time_pos The two control sliders blur_fwhm new FloatSliderWithBox Reconstruction blur FWHM 0 150 10 0 0 5 false blur_fwhm setUnits nm setFormat 5 1f blur_fwhm addChangeListener new SomethingChanges this complete add blur_fwhm blur_pos reconstructed_pixel_size new FloatSliderWithBox Reconstructed pixel si ze 2 300 10 0 5 true reconstructed_pixel_size setUnits nm setFormat 5 1f reconstructed_pixel_size addChangeListener new SomethingChanges this complete add reconstructed_pixel_size pixel_size_pos The button bar buttons new JPanel Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 99 exportButton new JButton Export exportButton addActionListener new ExportButtonListener this buttons add exportButton exportButtonColor exportButton getBackground No point in having a stop button if this is just a viewer if tbr null stopButton new JButton Stop stopButton addActionListener new StopButtonListener this buttons add stopButton closeButton new JButton Close closeButton addActionListener new CloseButtonListener this buttons add closeButton complete add buttons buttons_pos
300. uto_ptr lt FitSpotsGraphics gt gr null_graphics place_and_fit_spots ims maskir maskd save_spots gr ui f rows bind1lst multi 8 4 1 5 static SPair Util getFileName Stringt inline static package The a file name for saving and complete path using Imageu s file open dialog Kep re querying user if the file will be overwritten Windows already provides the query built in Parameters Initial file name Returns filename and full path Definition at line 80 of file three_B java References SPair a and SPair b Referenced by three_B run Get a filename to save as with appropriate warnings for overwriting files String fname fullname while true SaveDialog save new SaveDialog Save 3B output t txt Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 5 Storm classes 47 fname save getFileName fullname save getDirectory File separator fname if fname null break File test new File fullname Windows open dialog seems to do overwrite confirmation automatical ly so there is no need to do it here if ij IJ isWindows amp amp test exists GenericDialog g new GenericDialog Overwrite file g addMessage The file fname already exists and overwrite g enableYesNoCancel Yes No g showDialog if g wasOKed break else if g wasCanceled fname nu
301. va Referenced by FloatSliderWithBox getValue setFormat setUnits and setValue 10 10 4 12 boolean FloatSliderWithBox reciprocal private Definition at line 699 of file three_B java Referenced by FloatSliderWithBox get_value_from_slider and setValue The documentation for this class was generated from the following file e three_B java 10 11 FreeEnergyHessian Class Reference Class for computing the Hessian of the negative free energy Inheritance diagram for FreeEnergyHessian DataForMCMC FreeEnergyHessian Public Member Functions e FreeEnergyHessian const DataForMCMC amp d e Matrix lt 4 gt hessian const vector lt Vector lt 4 gt gt amp spots int spot const e MT19937 amp get_rng const Protected Attributes const vector lt ImageRef gt amp pixels const vector lt vector lt double gt gt amp pixel_intensities const double mu_brightness e const double sigma_brightness e const double mu_blur const double sigma_blur const double variance const int samples const int sample_iterations Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 11 FreeEnergyHessian Class Reference 142 e const Matrix lt 3 gt A e const Vector lt 3 gt pi e MT19937 amp rng 10 11 1 Detailed Description Class for computing the Hessian of the negative free energy Definition at line 608 of file multispot5 cc 10 11 2 Constructor amp Destru
302. ves the shared writable array of points Definition at line 1208 of file three_B java References iterations and pts Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 6 EControlPanel Class Reference 106 Referenced by ThreeBLoader run and ThreeBRunner send_new_points for int i 0 i lt p size i pts add p get i iterations its 10 6 3 21 void EControlPanel send_update_canvas_event inline Callback for causing a recomputation of the reconstruction This is a safe method for telling the class to recompute and redraw the reconstruction It can be called from anywhere but ensures that the redraw happens in the GUI thread Definition at line 1220 of file three_B java References update_canvas Referenced by ThreeBLoader run ThreeBRunner send_new_points and Some thingChanges stateChanged SwingUtilities invokeLater new Runnable final public void run update_canvas j 10 6 3 22 void EControlPanel die final Strings inline Callback which causes a fatal termination of the 3B control panel This is generally caused by something changing such that the error condition was not seen in the Java code but was seen in C Ought never to be called Definition at line 1235 of file three_B java Referenced by ThreeBRunner die SwingUtilities invokeLater new Runnable final public void run ij IJ showStatus 3B run terminated due to an er
303. x2 bracket a root and find the root using bisection x1 and x2 are represented by the scalars sl and s2 double sl 0 double s2 max_step double s_new max_step int updates 2 0 0 while abs sl s2 gt abs sl s2 linesearch_tolerance linesearch_epsilon if updates 0 updates 1 amp amp updates 0 0 Compute the new point using false position s_new sl fl s2 s1 fl1 2 new_g deriv x s_new minus_h double f_new new_g minus_h updates 0 updates 1 if f_new 0 break if f_new lt 0 sl s_new fl f_new Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 4 ConjugateGradientOnly lt Size Precision gt Struct Template Reference 87 updates 1 Il hb else s2 s_new f2 f_new updates 1 ll N else Compute the new point s_new s1 s2 2 new_g deriv x s_new minus_h double f_new new_g minus_h if f_new lt 0 sl s_new fl f_new updates 0 1 else s2 s_new f2 f_new updates 0 2 Update the current position and value The most recent gradient computation is at s_new x minus_h s_new 10 4 3 4 template lt int Size 1 class Precision double gt bool ConjugateGradientOnly lt Size Precision gt finished inline Check to see it iteration should stop You probably do not want to use this function See iterate instead This
304. y exhibit a property called burn in As the 3B al gorithm runs it maintains an estimate of the number of spots present in the image Since it is an MCMC algorithm this estimate will fluctuate around some mean value However 3B can add or remove spots at a rate of at most 5 per iteration usually much slower If the algorithm is started with a very bad estimage of the number of spots then it may take many iterations for it to approach the mean During this time the samples drawn will not be representative 3B must therefore run for enough iterations that the later representative it erations will dominate and swamp the earlier ones If 3B is started using a very bad estimate then this can require substantially more than 200 itera tions e Bright regions close to the boundary The 3B algorithm will not examine any pixels outside the boundary of the marked region If there is a bright region of the image on or near the bound ary then 3B will naturally attempt to places fluorophores there However since the point spread function of the microscope is typically several pixels across the images of fluorophores near the boundary will extend across it and so will be missing information which could lead to artefacts If possible placing the boundary near a bright region should be avoided If this is not possible then the reconstruction close to the boundary should be ignored Anything further than the PSF diameter from the boundary is unlike
305. y lt double N gt a Rng amp rng e template lt int States class StateType class Rng gt std vector lt StateType gt backward_sampling TooN Matrix lt States gt A const std vector lt std tr1 array lt double States gt gt amp delta Rng amp rng 8 3 1 Detailed Description The notation follows A tutorial on hidden Markov models and selected applications in speech recognition Rabiner 1989 8 3 2 Function Documentation 8 3 2 1 template lt int States class Btype class Otype gt std tr1 tuple lt double TooN Vector lt Btype NumParameters gt TooN Matrix lt Btype NumParameters gt gt forward_algorithm_hessian TooN Matrix lt States gt A TooN Vector lt States gt pi const Btype amp B const std vector lt Otype gt amp O bool compute_deriv 1 bool compute_hessian 1 The forward algorithm is defined as ay i Tibi O1 1 j bj OW aij 2 And the probability of observing the data is just P O Or A P O A Yar i 3 where the state A A 7 B Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 8 3 Generic hidden Markov model solver 31 All multipliers are much less than 1 to rapidly ends up as zero Instead store the logarithm ai maki i i In m 1nb 0 and the recursion is amp j Inb O T ny Ot 1 i ai Inb O rae Inajj including an arbitrary constant Z j gives J
306. y lt double 3 gt gt delta forward_algorithm_delta A pi B O current_sample k backward_sampling lt 3 State T gt A delta rng Put the newly sampled spot in add_spot current_sample_intensities spot_intensities k current_sample k 10 12 3 4 const vector lt vector lt State gt gt amp SampledMultispot GibbsSampler sample const inline Retrieve the current sample Definition at line 286 of file sampled_multispot h Referenced by FreeEnergyHessian hessian and FitSpots try_modifying_model return current_sample 10 12 3 5 const vector lt vector lt double gt gt amp SampledMultispot GibbsSampler sample_ intensities const inline Retrieve the intensities for the current sample Definition at line 291 of file sampled_multispot h Referenced by FreeEnergyHessian hessian NegativeFreeEnergy operator and FitSpots try_modifying_model return current_sample_intensities 10 12 4 Member Data Documentation Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 12 SampledMultispot GibbsSampler Class Reference 150 10 12 4 1 const vector lt vector lt double gt gt amp SampledMultispot GibbsSampler pixel_intensities private Definition at line 190 of file sampled_multispot h 10 12 4 2 const vector lt vector lt double gt gt amp SampledMultispot GibbsSampler spot_intensities private Definition at line 191 of file sampled_multispot h 10 12
307. y mmain The documentation for this struct was generated from the following file multispot5 h 10 21 MT19937 Struct Reference Useful wrapper for MT19937 random number generator class include lt mt19937 h gt Classes struct ParseError Null struct thrown if attempting to load state from stream yields a parse error Public Member Functions MT19937 void simple_seed int seed e void copy_state const MT19937 amp r double operator uint82_t rand_int e double gaussian void write std ostream amp 0 void read std istream amp is Public Attributes e CRandomMersenne rng Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 21 MT19937 Struct Reference 178 Private Member Functions e MT19937 const MT19937 amp 10 21 1 Detailed Description Useful wrapper for MT19937 random number generator class Definition at line 13 of file mt19937 h 10 21 2 Constructor amp Destructor Documentation 10 21 2 1 MT19937 MT19937 inline Definition at line 23 of file mt19937 h rng 0 10 21 2 2 MT19937 MT19937 const MT19937 amp private Disallow copying since one almost never wants to do this Copying has to be explicit via MT19937 copy_state 10 21 3 Member Function Documentation 10 21 3 1 void MT19937 simple_seed int seed inline Seed state with a simple RNG Parameters seed Definition at line 29 of file mt199
308. zeField and parseDouble return parseDouble getPixelSizeField getText Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 2 ClassicGlow Class Reference 79 10 1 3 8 int AdvancedDialog getFirstFrame inline package Definition at line 417 of file three_B java References getFirstFrameField and parselnt Referenced by dialogltemChanged return parseInt getFirstFrameField getText 10 1 3 9 int AdvancedDialog getLastFrame inline package Definition at line 422 of file three_B java References getLastFrameField and parselnt Referenced by dialogltemChanged return parseInt getLastFrameField getText 10 1 4 Member Data Documentation 10 1 4 1 boolean AdvancedDialog ok true package Definition at line 309 of file three_B java Referenced by dialogltemChanged 10 1 4 2 int AdvancedDialog nframes package Definition at line 310 of file three_B java Referenced by AdvancedDialog and dialogltemChanged The documentation for this class was generated from the following file e three_B java 10 2 ClassicGlow Class Reference Plugin implementing the classic glow hot LUT which seems to be missing from Imageu Generated on Wed Nov 28 2012 15 39 12 for ThreeB by Doxygen 10 3 CloseButtonListener Class Reference 80 Static Package Attributes e static byte red e static byte green e static byte blue 10 2 1 Deta
309. ze_each_spot_in_turn_for_several_passes inline Perform a complete iteration of the optimzation stage of the spot firrint algorithm Definition at line 1516 of file multispot5 cc References boundingbox SampledMultispot compute_spot_intensity get_spot_pixels FreeEnergyHessian hessian ConjugateGradientOnly lt Size Precision gt iterate ConjugateGradientOnly lt Size Precision gt max_iterations SampledMultispot GibbsSampler2 next SampledMultispot remove_spot SampledMultispot GibbsSampler2 sample SampledMultispot GibbsSampler2 s intensities sampled_background_spot_hessian_ffos scale_to_bytes SampledMul tispot sequence spots_to_Vector TIME and ConjugateGradientOnly lt Size Preci sion gt x Precompute the intensities for all spot pixels vector lt vector lt double gt gt spot_intensities spot pixel for unsigned int i 0 i lt spots size i spot_intensities push_back compute_spot_intensity pixels spots i Which pixels does each spot have vector lt vector lt int gt gt spot_pixels spot pixel spot_pixels resize spots size for unsigned int s 0 s lt spots size s get_spot_pixels pixels spots s spot_pixels s Optimize the model N spots at a time for int pass start_pass pass lt main_passes passtt save_spots lt lt Pass lt lt pass lt lt endl rng write save_spots save_spots lt lt endl sta
Download Pdf Manuals
Related Search
Related Contents
Bosch Power Tools 11318EVS User's Manual 1 1 Etendue de la livraison......................................3 2 Description Model GPA 27-45 GPA 27-45 Installation Manual User manual - CNET Content Solutions blat-marino descripcion propiedades aplicaciones Electrolux U27107 User's Manual Drucken - Brother Urban Factory Neopren Flag Sleeve Algéria handisecure™ - Handicare.dk Philips SDJ6040W Flush mount White Duplex jack Copyright © All rights reserved.
Failed to retrieve file