Search This Blog

Wednesday, January 13, 2016

Implemented new rule to select threshold from 2 modelled distribution:  "Minimize Missclassification" rule. This rule does not use actual histogram values


Further extensions are possible with histogram value usage.

Tuesday, January 12, 2016

We have found good BiModal match of the Histogram.  Having two curves (Gaussian or Laplacian) what is the suitable algorithm to choose the threshold?  Presently we choose the lowest point between the peaks of two components, but now I have doubts about this.  Should it be the intersection of 2 curves instead?


BiModal Laplacian histogram segmentation (first result):
This is simplistic global optimization (without extremum checking so did not perform as well as BiGaussian with the same number of iterations = 200K)


Monday, January 11, 2016

Proposed semi-automatic "breast\chest wall" segmentation:

One way is to segment OUT the chest wall, after that breast segmentation is a simple EdgeWave operation.

To segment the chest wall:
1. On every 5th slice, draw the chestwall boundary as an ROI (see pic below).  In this prototype I recommend the boundary starting and ending at the margins of the image (later on we can eliminate this).

2. I will provide a specialized operation "MainMenu>Applications>Breast>Segment Chest wall from Contours".  Internally this operation would perform completing the contour, and then "Fill & Morph convex" to fill the skipped slices.

3.  Result of this operation would be a "CHEST ROI" that could be excluded from the image.  Then we would simply apply the EdgeWave to segment out the Air.

4. Manual processing time should be <1 min.  Computing time is <20 sec.



Sunday, January 10, 2016

CT-PET-ATLAS workflow: Register ALL:  fixed the crash defect on case W73


Friday, January 8, 2016

"Deep breathing" lung segmentation case:  no leaks after BiCal+EdgeWave




Some very approximate parameters for BiCal - would work in the wide range.
BiCal parameters


EdgeWave (with seed) parameters


Mouse Brain, CT-PET-ATLAS wokflow:

Provided an additional registration function to register everything to the PET space to avoid any transforms\interpolation of the principal data (PET).


Thursday, January 7, 2016

Mouse Brain,  CT-PET-Atlas workflow.



1. Load Atlas once for the whole study session. Minimize the View, so it is out the way and reduce screen clutter. You don't need to open Atlas for every registration.

2.  Load CT-3D volume with landmarks present

3.  Load PET-4D volulume

(steps 2,3 in any order)

4.  Choose "MainMenu>Applications>Mouse Brain Atlas-PET-CT workflow"

5.  After brief processing only one document will remain that contains
CT,PET and several ROI layers.

6.  Press F4 to bring up the curve dialog, this might take up to 1 min since there are many ROIs present.  You will see something like below:


Mouse Brain   CT-PET-Atlas workfow:  finished the integrated "one-click" registration function.  Resulting entity is ready to get the PET curves and save them (to text file)

Wednesday, January 6, 2016

Prepared first integrated mouse brain Atlas with ROI regions named and the 4 Landmarks included.  This is ready for the final processing.


Added the functionality to extract only desired regions from the Atlas.  User enters the desired region indices separated by commas.  Result: they will appear as the new ROI layes named "atlas region #x" according to the specified indices.


Landmark co-registration:
a) When Source={3D,4D} 2-layer entity, registered to a 3D-volume, the timing information of the 4D volume was lost
b) Also corrected the defect when Alpha (transparency) and the color scheme of the source were lost after the regidstration.

Tuesday, January 5, 2016

Dialog RoiStats3D:  in Model-based Histogram segmentation added an option to view the "Modelling Cumulative" curve  (options are {None,All Curves,Cumulative"}
Also removed the "BiGauss Explore" and "BiGauss with Ratio Explore" options since they are superceded by the curves display now.



Monday, January 4, 2016

Histogram model-based segmentation {BiGauss,BiLaplace}: Implemented initial framework to show the modelling curves overlaid on top of the histogram. Notice the threshold is chosen as the midpoint between 2 peaks.


Sunday, January 3, 2016

Implemented some improvements to Global Optimization algorithm and code.

Saturday, January 2, 2016

Verified correct result of Histogram segmentation using "Bigauss with Ratio" method on the sample from EdgeWave manual.  BiGauss ration interval was [1.1,2]. This did not seem to work on Henry's computer.

Friday, January 1, 2016

Fixed crash defect while loading the DICOM folder obtained from Mr. Zhang under Win10. This was due to using the 32-bit truncation in CTreeCtrl::SetItemData during the DICOM tree construction.
Moved the main development environment to Windows 10.

Wednesday, December 30, 2015

Fixed the defect in RasterPaintbrush dialog box:  checking the "Allow paint on parametric Maps" had no effect and setting was not remembered.  Drawing on Parametric maps is now possible.
Fixed the paintbrush problem when drawing on integer volumes.

Tuesday, December 29, 2015

Registration by the landmarks:  provided more detailed analysis in case of the landmark mismatch between Source and Target.  List of Source mismatch landmarks + List of Target mismatched landmarks is provided.
Registration by Landmarks:  upon the start of the procedure all the "invisible" (void) landmarks are unconditionally removed from ALL documents. This is to avoid frequent confusion during the registration.
Mouse CT->Atlas landmark registration (suing 4 landmarks).


Thursday, December 24, 2015

FireVoxel Build 204 is released.

1. Fixed the SaveDicom defect introduced by the DeIdentifier code.
2. AutoFocus 3D registration: when the Target volume is ROI, allow to use it as a Target ROI role two (so it serves two purposes
3. T1-EPI-PET lesion workflow:  added an option to register the whole lesion ROI at once ("3D Mode").
4. "Dialog RoiStats4D : Save Curve" function:  in case of 4D ROI added information about the volume of the ROI for each timepoint.
5. When dynamic dimension="TIME", we output the time values as a difference from the initial timepoint.
6. EdgeWave resulting layer name generation - improved with adding the name of Dynamic component in case of the 4D volumes.
7. EdgeWave on near-isotropic lung volume "shifted-y-axis" defect:  was caused by slightly different definition of "isotropic" between different software modules.

8. Defect "View Projection of the Selected Entity": fixed defect when specifying projection produced an immediate crash.
Fixed the SaveDicom defect introduced by the DeIdentifier code, so the changeSeriesUID flag was not functioning.

Wednesday, December 23, 2015

AutoFocus 3D registration: when the Target volume is ROI, allow to use it as a Target ROI role two (so it serves two purposes).  This dramatically speeds up registration in some cases. This was developed in the context of the EPI->T1 registration as requested as Eric.
PET->T1 breast lesion registration workflow: Corrected a default problematic parameter "ScaleGrid=0" set to 1.
T1-EPI-PET lesion workflow:  added an option to register the whole lesion ROI at once ("3D Mode"). Original slice-by-slice method is kept (2D Mode).
1. "Dialog RoiStats4D : Save Curve" function:  in case of 4D ROI added information about the volume of the ROI for each timepoint.
2. When dynamic dimension="TIME", we output the time values as a difference from the initial timepoint.
EdgeWave resulting layer name generation - improved with adding the name of Dynamic component in case of the 4D volumes.
EdgeWave on near-isotropic lung volume "shifted-y-axis" defect:  was caused by slightly different definition of "isotropic" between different software modules.

Tuesday, December 22, 2015

Defect "View Projection of the Selected Entity": fixed defect when specifying projection produced an immediate crash.

Wednesday, December 16, 2015

FireVoxel Build 203 is released.
1. Corrected the defect when  .IM file is loaded that was missing the units info.
2. Fixed defect that presented itself as cropping failure.
3. Fixed: 3D Paintbrush, defects in Pint\Erase function on multiple projections:
4. "Deidentify DICOM folder" function:  fixed defect when the DICOM structure of resulting file set was lost after de-identification.
5. EdgeWave4D:  enabled functionality to process all of the timepoints of the 4D volume individually and to output a ROI-4D.

Tuesday, December 15, 2015

Volume Paintbrush:  relocated the code from FireVoxel.exe module to the platform-independent module: VolumeAnalyze.dll.
EdgeWave4D:  enabled functionality to process all of the timepoints of the 4D volume individually and to output a ROI-4D.

Monday, December 14, 2015

"Deidentify DICOM folder" function:  fixed defect when the DICOM structure of resulting file set was lost after de-identification.

Sunday, December 13, 2015

3D Paintbrush, defects in Pint\Erase function on multiple projections:  fixed the issues expose by (1.2,1.2,4) mm volume.

Saturday, December 12, 2015

Fixed defect that presented itself as cropping failure.  This was due to the fact the new cropped document was created without the full path, just the name. Corrected now.
Corrected the defect when  .IM file is loaded that was missing the units info.  Such units info was incorrectly loaded that was leading to incorrect save to .FVX file and further crash when that .FVX was loading.

Friday, December 11, 2015

FireVoxel Build 202 is released.

1. Corrected the 3D Paintbrush functionality for volume editing in 3 orthogonal projections.  Now the cursor and the result of the drawing are correctly updated in all projections.
2. Corrected the code responsible for recalling the state and the position of the window on the startup.
3. Histogram thresholding with BiGauss using Ratio:  algorithm was implemented.  The goal was to process the FGT-segmentation cases which were not processed by the Z-alg.
4. Bigauss with Ratio histogram split:  implemented the rebinning to a smaller #bins=128 to x10 speedup on  FGT segmentation.
5. Global Optimization Framework:  implemented major improvement to the algorithm that allows to reduce the number of candidates by x100.  In 6-dimension gaussian fit, after only 500K iterations this resulter in remaining parameters subspace of only 1e-14 of the original (by area).
6. User Interface  "Split ROI with Threshold" function:  Integrated the "BiGauss with Ratio" method to work seamlessly.
Re-enabled the ABT - Dynamic Framework subtest after the API calls for the Global Optimization were changed.
User Interface  "Split ROI with Threshold" function:  Integrated the "BiGauss with Ratio" method to work seamlessly.

Thursday, December 10, 2015

Global Optimization Framework:  implemented major improvement to the algorithm that allows to reduce the number of candidates by x100.  In 6-dimension gaussian fit, after only 500K iterations this resulter in remaining parameters subspace of only 1e-14 of the original (by area).

Tuesday, December 8, 2015

Bigauss with Ratio histogram split:  implemented the rebinning to a smaller #bins=128 to x10 speedup on  FGT segmentation.

Sunday, December 6, 2015

Histogram thresholding with BiGauss using Ratio:  algorithm was implemented.  The goal was to process the FGT-segmentation cases which were not processed by the Z-alg.

First doublechecked that in case of clear peaks the result is as good or close as Z-alg:
case ABRI:  BiGauss with ratio [2,4] finds good separation

Next we attempted to process harder cases where the peaks are much less clearly separated.  In all the experiments below, 10M iterations were used. User can now specify the amount of iterations required.


case ABBR: histogram split


case ABBR:  thresholding segmentation

case BARA: histogram split



case BARA: threshold seg,mentation


case BARZ



case BARZ: threshold segmentation
BiGauss histogram split: added the dialog box to specify Max Number of iterations.
Global optimization: added an optional progress bar.

Sunday, November 29, 2015

Corrected the code responsible for recalling the state and the position of the window on the startup.
Corrected the 3D Paintbrush functionality for volume editing in 3 orthogonal projections.  Now the cursor and the result of the drawing are correctly updated in all projections.

Monday, November 23, 2015

Build 201A is released.

Fixed the defect when the ANALYZE file is loaded as the ROI layer and FireVoxel asks to specify modality even though the main volume already has the modality specified.
Extended the range of file extensions accepted under the "Load RAW" function.
Enabled the "sticky note" prompt for the 1st and last buttons of the main toolbar.
F11 - "Advance to next Landmark" function: corrected the defect so it changes to correct slice and landmark is now visible.
Fixed the defect when the ANALYZE file is loaded as the ROI layer and FireVoxel asks to specify modality even though the main volume already has the modality specified.
Extended the range of file extensions accepted under the "Load RAW" function.
Enabled the "sticky note" prompt for the 1st and last buttons of the main toolbar.
F11 - "Advance to next Landmark" function:  corrected the defect so it changes to correct slice and landmark is now visible.
FireVoxel Build 201 is released.

Reenabled ABT on all subtests.
"Deidentify DICOM folder": fully parallelized and optimized.
Implemented initial version of "Deidentify DICOM folder" User-level function
ABT: SaveDICOM subtest:  Fixed the defect that was introduced during the DICOM API changes during the FGT-segmentation project.
Layer Control Dialog>Load RAW:  enabled loading of the .NII files as a layer.
Global Optimization:  "BiGauss Histogram Split" cost function, changed the calculation arrangement to improve the speed of calculation\convergence about x2.  In interval math, the Square(A)/Square(B)  should be replaced instead with Square(A/B) for better convergence (A,B are intervals).
Global Optimization framework:  improved the memory handling so only a single generation is stored for one split iteration, reducing memory by x2
Improved reporting of Max Total and Max Block memory allocation.
Fixed the thread safety defect in MonoExponential fit function for Global optimization.
Fixed the parallel version of Global Optimization. Now all the Dynamic Framework subtests are checking out OK.
Dialog RoiStats3D: Added a histogram bin tracker feature.  User moves the mouse over the histogram and corresponding bin value and bin count are displayed.
Dialog RoiStats3D:  fixed the defect when the displayed histogram span was set with incompletely taking the ROI info into account.
Main Menu>ROI>Load Vector ROI function.  The last used directory is now remembered within the session. It is also saved into the configuration file between the sessions.
Layer Control dialog:  Implemented basic Copy\Paste volume operation to move the layers between documents.
Implemented and exposed GUI for the additional options of histogram thresholding. Global optimization framework:  full parallelism of the main loop.  This allow the application programmer not to bother with parallelizing the cost function thus greatly simplifying the usage.
Dual peak (bi-modal?) histograms:  implemented an initial version of algorithm that find an optimal representation of histogram as the sum of 2 gaussians.  Global optimization framework is used.
DicomTree load:  added extra diagnostics when composite series are present but some files are missing so the logical structure could not be constructed.
Mouse PET dynamic dataset (from Jean): latest version of FireVoxel loads it without problems as a dynamic  volume (33x26x26  with 48 timepoints)
Dialog RoiStats3D:  integrated algorithm selection tool  {Otsu,Zigalga} for segmenting the Histogram. Developed a prototype of a novel  Histogram  splitting algorithm, comparing to Otsu on the breast
Registration by DICOM-tags only.  Corrected the defect so that the Window\Level settings after the operation are exactly those of the source volume
DICOM loading of the files containing Rescale\Inrtercept information:  Improvement to user interface was done.  Even if the Rescale\Intercept are "trivial" (i.e.  1/0) we now ask the user if the volume has to be loaded as INTEGER or REAL.  In case of REAL user needs to specify additional offset\factor.
Pressing SHIFT button is NOT required anymore during the "Select by rectangular Net" function when mouse is dragged and selects all the objects within the rectangular area.
Change of the workflow for using the Window Level\Width tool.  User now has to press the new  Window Level\Width button on the Toolbar.  This puts FireVoxel into the "Window Level\Width" mode with the appropriate Mouse Cursor change.  Then user can change the Window Level\Width several time.  On Pressing ESC  the cursor changes back to "SELECT" mode. !Important:  This also fixes error when then  View Filter  Window Level was randomly changed after loading the Vector ROI.  This was happening because the Mouse Move command is sent after the closing the Open VROI file dialog.  This Mouse Move was erroneously interpreted as the request to change the Window Level\Width. 
RoiStats 3D could be applied to specified range of values in data. Specify "Value Interval [Start,End]" parameters.
Implemented fully functional version of Breast FGT measuring workflow.
Fixed the defects with the Status bar progress indicator in
VolChangeResolution and VolN3 functions.
Fixed defects with the progress status bar text messages while loading the FVX document.
MainMenu>Volume>Crop with 4D ROI- all layers.  "Enabled" flag is now copying correctly for all the layers in the entity.
Layer Control Dialog> Load DICOM :  now using current UserOptions.LoadDicomFolder settings.
MainMenu>ROI>List All VROIs function now displays the message  "No VROIs are present".

Provided an initial verison of the Breast FGT Batch processing dialog.

Saturday, November 21, 2015

"Deidentify DICOM folder": fully parallelized and optimized the processing reducing the time ffrom 40 min down to 4 min for 32,600 files.

Friday, November 20, 2015

Implemented initial version of "Deidentify DICOM folder" User-level function

Thursday, November 19, 2015

ABT: SaveDICOM subtest:  Fixed the defect that was introduced during the DICOM API changes during the FGT-segmentation project.

Tuesday, November 17, 2015

Layer Control Dialog>Load RAW:  enabled loading of the .NII files as a layer.
Global Optimization:  "BiGauss Histogram Split" cost function, changed the calculation arrangement to improve the speed of calculation\convergence about x2.  In interval math, the
Square(A)/Square(B)  should be replaced instead with Square(A/B) for better convergence (A,B are intervals).
Global Optimization framework:  improved the memory handling so only a single generation is stored for one split iteration, reducing memory by x2

Monday, November 16, 2015

Improved reporting of Max Total and Max Block memory allocation.

Saturday, November 14, 2015

Fixed the thread safety defect in MonoExponential fit function for Global optimization.
Fixed the parallel version of Global Optimization. Now all the Dynamic Framework subtests are checking out OK.

Friday, November 13, 2015

Test of the sub-algorithm for FGT-FAT segmentation. Are the white streaks identified by green arrow is FAT?

Monday, November 9, 2015

Dialog RoiStats3D: Added a histogram bin tracker feature.  User moves the mouse over the histogram and corresponding bin value and bin count are displayed.
Dialog RoiStats3D:  fixed the defect when the displayed histogram span was set with incompletely taking the ROI info into account.

Saturday, November 7, 2015

Main Menu>ROI>Load Vector ROI function.  The last used directory is now remembered within the session. It is also saved into the configuration file between the sessions.
Layer Control dialog:  Implemented basic Copy\Paste volume operation to move the layers between documents.

Friday, November 6, 2015

Implemented and exposed GUI for the additional options of histogram thresholding.

Very preliminary test was performed of optimal histogram thresholding using "Bimodal Gaussian representation".  Case ZAMB.  Approximation done by Global optimization in R6 space, with 1M iterations in this experiment.

ZAMB: original histogram for Breast Mask




Original histogram thresholded by OTSU algotithm




BImodal Gaussian approximation and simple minima threshold 

Bimodal approximation threshold on the original histogram


Global optimization framework:  full parallelism of the main loop.  This allow the application programmer not to bother with parallelizing the cost function thus greatly simplifying the usage.

Thursday, November 5, 2015

Dual peak (bi-modal?) histograms:  implemented an initial version of algorithm that find an optimal representation of histogram as the sum of 2 gaussians.  Global optimization framework is used.
Any distribution other than Gaussian would fit this algorithm too.

Monday, November 2, 2015

DicomTree load:  added extra diagnostics when composite series are present but some files are missing so the logical structure could not be constructed.
Mouse PET dynamic dataset (from Jean): latest version of FireVoxel loads it without problems as a dynamic  volume (33x26x26  with 48 timepoints)



On the sample brain from EdgeWave manual:
1.  applied N3
2. performed EdgeWave segmentation using default parameters.
3. Brain mask was automatically thresholded to get WM\GM masks.
4. First Otsu then Z-algorithm were used.

Auto histogram separation over the Brainmask:   Otsu  vs. Z-algorithm
Resulting Wm\Gm masks:  Otsu vs. Z-algorithm

IVIM- regular model:  extended to calculation to allow three b-values to be present.
IVIM segmented fit model: Provided the diagnostics and clear requirements message on b-values.
Provided new icons for the FireVoxel main toolbar.
Provided several variants of the Breast FGT processing module.

Friday, October 30, 2015

Dialog RoiStats3D:  integrated algorithm selection tool  {Otsu,Zigalga} for segmenting the Histogram.

Comparison of the Otsu algorithm vs. Zigalga on breast histogram:
Case ZAMB:  old Otsu algorithm

Case ZAMB:  new Zigalga algorithm
Developed a prototype of a novel  Histogram  splitting algorithm, comparing to Otsu on the breast
case BIBI:  Current segmentation algorithm:  Otsu

case BIBI:  New histogram splitting algorithm: Zigalga.

Wednesday, October 28, 2015

Registration by DICOM-tags only.  Corrected the defect so that the Window\Level settings after the operation are exactly those of the source volume.

Tuesday, October 27, 2015

Breast FGT project:  PRE- and POST- image registration in case of the different dimensions. Registration is done using DICOM tags only.  Processing time <5 sec.  Alignment seems to be good.
Alignment of PRE- and POST- images in FGT project after DICOM-tag registration.
DICOM loading of the files containing Rescale\Inrtercept information:  Improvement to user interface was done.  Even if the Rescale\Intercept are "trivial" (i.e.  1/0) we now ask the user if the volume has to be loaded as INTEGER or REAL.  In case of REAL user needs to specify additional offset\factor.
This fixes the practical problem with some of FGT breast exams.

Saturday, October 24, 2015

Pressing SHIFT button is NOT required anymore during the "Select by rectangular Net" function when mouse is dragged and selects all the objects within the rectangular area.
Change of the workflow for using the Window Level\Width tool.  User now has to press the new  Window Level\Width button on the Toolbar.  This puts FireVoxel into the "Window Level\Width" mode with the appropriate Mouse Cursor change.  Then user can change the Window Level\Width several time.  On Pressing ESC  the cursor changes back to "SELECT" mode.

This design is now matching the one in Synedra Viewer.

!Important:  This also fixes error when then  View Filter  Window Level was randomly changed after loading the Vector ROI.  This was happening because the Mouse Move command is sent after the closing the Open VROI file dialog.  This Mouse Move was erroneously interpreted as the request to change the Window Level\Width.



RoiStats 3D could be applied to specified range of values in data.
Specify "Value Interval [Start,End]" parameters.

Implemented fully functional version of Breast FGT measuring workflow.
Updated the Batch parameters dialog to include N3 parameters.


Fixed the defects with the Status bar progress indicator in
VolChangeResolution and VolN3 functions.
Fixed defects with the progress status bar text messages while loading the FVX document.

Thursday, October 22, 2015

MainMenu>Volume>Crop with 4D ROI- all layers.  "Enabled" flag is now copying correctly for all the layers in the entity.
Layer Control Dialog> Load DICOM :  now using current UserOptions.LoadDicomFolder settings.
MainMenu>ROI>List All VROIs function now displays the message  "No VROIs are present".
Provided an initial coding of the Breast FGT Batch processing dialog.

Tuesday, October 20, 2015

FGT Batch dialog, initial layout. It is similar to CT batch processing layout.





1.  Source folder specifies where the folder containing the FVX files is.  It might have  subfolders.
2. Output masks:
    2a) checkbox specifies if they have to be output
    2b) Location specifies where the masks go
3,  Output log specifies output text file.

FireVoxel Build 200

1. Fixed entropy calculation
2. Fixed crash defect: in Dialog Open DICOM:  when Browse functionality is used to change the DICOM folder, pressing the Info button causes the crash.
3. DICOM open dialog:   fixed the loading problem when very long path of the DICOM file is specified.
4. N3-nonuniformity correction tool - enabled to work with Real-valued volumes.
5. Enabled BiCal to work with the Real-value images. Processed sodium image with BiCal.
6. Fixed the "total non-function" defect in VA_VolMul (Volume Multiply) function. This was used in Sulci Depth detection and BiCal.
7.Implemented initial version of perivascular space segmentation under "MainMenu>Segment>Detect Bright Spots" with the Dialog.

N3-nonuniformity correction tool - enabled to work with Real-valued volumes.