Search This Blog

Sunday, April 13, 2014

Added L1/L2 optional residual metric to  Sokoloff'79 (short) model.
Completely re-enginered the Sokoloff-79 model (as in Wai's implementation = short formula).

a) Enabling the analytic integration, instead of PWL-functions.  This also eliminates the need for the 1-sec upsampling of the TAC data used in the old version.

b) More streamlined and corrected implementation of the Ta-arterial delay.



Re-enabled ABT subtest for the "Liver DCDI-standard model"

Saturday, April 12, 2014

Dynamic Experiment module (Parametric maps) flow:  correcting a significant inefficiency of dealing with the Void voxels (as in  "Process ROI only"  mode).  Entirely reengineered a parallel processing structure for the Voxelwise parametric map, especially for "ROI only" mode.

Friday, April 11, 2014

Liver DCDI model defect:  when voxelwise map (over the ROI) is requested calculation "hangs" and performance monitor shows only a single core loaded.


Thursday, April 10, 2014

ABT: added an automatic subtest for PET4D to MR4D registration, with several layers each, to Best Resolution option.
ABT:   adding automatic subtest for   PET4D<->MR4D multilayer registration.

Wednesday, April 9, 2014

ABT:  adding the "WM lesions \FLAIR"  segmentation to the automatic build test.
Also the corresponding dialog for "WM lesions \FLAIR"  parameters is automatically tested by Open\Close.
IDIF function:  "Keep high filter" is an effective way to reduce partial volume voxel effect and deviation outside the vessel.  This is an example on Aorta (Liver DCDI dataset)


Red ROI:  All the preliminary voxels were kept  (Keep high signal=1)
Blue ROI:  Only highest half of the voxels was kept.
Automatic Build Test:  adding the IDIF (vessel segmentation) subtest.
Also the corresponding dialog for IDIF parameters is automatically tested by Open\Close.
Automatic IDIF (input function):  added an option to restrict the length of the vessel from the start point. This is requested by all the users of this functionality.



Unconstrained-length segmentation    vs.    15mm-constrained segmentation.

Sunday, April 6, 2014

Updated the IDIF user interface and algorithm:
a) Adding a drop down combo box where user can select the direction {X,Y,Z} of the Vessel.
b) Adding an experimental option {Auto} for the direction of the vessel.  In this mode, all 3 directions will be checked and the largest (by voxel count) resulting vessel would be selected.

New features seem to provide a substantial improvement in usability and quality of the result. F.e. in liver, we would like to always work in Axial projection where the Portal Vein direction is often along {X,Y} axis.














So in new version, user does not have to choose the direction of the vessel.  So for portal vein the "Auto" direction is set by default.

Another change is that the seed does not have to cover the vessel.  Instead, it is only assumed that the center of the seed should be very close to the vessel in question.

Provided a basic documentation for Liver DCDI registration workflow.

Saturday, April 5, 2014

Corrected defect:  In all 3D registrations 2 documents should be present.  The selected document is used as a Target of the registration.  However, if more than 2 document are present, the selection of Source document is sometimes incorrect.  Now the warning would be issued when more than one possible Source document is present.
Added new UI function:   "MainMenu>Volume>Crop4D - Current dynamic point only"
Fixed the defect of gross misregistration in liver DCDI exam.  New default setting for all parameters were explored and set.  All the gross misregistration cases are fixed. Results are not stellar, but for large proportion of timepoint the movement across the axial plane is greatly reduce.
Further work will be done as needed but result is good enough for now.

Friday, April 4, 2014

Defect corrected: when 3D volume is converted to 4D using the "MainMenu>Volume>Convert 3D to 4D" function, dynamic information (such a timepoints) is not set properly in the new volume.
Developing UI function:   " MainMenu>Volume>Crop timepoints".  This function takes 4D volume.
User specify comma-deliniated set of timepoints such as "1,3,5,7".  Function outputs another 4D volume containing only the specified timepoints. This is a very important function for troubleshooting the 4D registration.

Thursday, April 3, 2014

FireVoxel Build 135B is released.
Real Valued volumes (such as PET and parametric maps):  fixed defect when after the cropping such volumes where transformed into the Integer Volume class.
Dialog  Registration 3D\4D:
Further simplified and compacted by conveniently grouping the translation fields in the AutoFocus panel.

PET-to-MR registration:  Achieved a very good registration result on the difficult case "MG".  Problem was that PET image was rotated by 12 degrees with the respect to MR just in one axis Z.
Default registration parameters were "widened" to accommodate such enormous displacements. Also switch default registration measure from MI (mutual info) to URAL (gradients).


Wednesday, April 2, 2014

Enabled the following User Interface-level functions for PET volumes:
a) Advance to the timepoint of Max Info
b) Optimize ViewFilter setting for the current timepoint
Continue to simplify code in numerous locations due to inclusion of the DIM3D field into the FRAME structure.
Small fixes related to the PET4D<->MR4D registration.  Build 135A is released.
FireVoxel Build 135 is released.
Finalized the algorithm and User interface for the 2 way "PET register to Anatomy" function.
Presently, {PET3D,PET4D}<->{MR3D,MR4D} can be registered. If both source and target are 4D user is given a choice for which one to keep in 4D.

All the additional layers (such as ROIs) are transformed properly.

Tuesday, April 1, 2014

Restoring the Automatic Build Test as it presently crashes. This is routine after substantial code changes.
Optimized API calls (remover the AddLayerByCrop\LoadDocumentByCrop) for document\layer loading.
Parallelized the internal DICOM header creation.

Monday, March 31, 2014

PET4D+ROIs  registration to MRI4D+ROIs is finished.  When timelines are merged, new 4D volumes created for the merged timeline.  This results in substantial memory overhead at the moment. Implementing the design for efficient memory handling when the redundant timepoints are present.

Sunday, March 30, 2014

Paralellized the  "Crop Out void voxels from Volume" function (part of the registration).

Friday, March 28, 2014

Sokoloff model, as in Sokoloff-Phelps paper (Annals of Neurology 1979, vol.6 No. 5) is

This  is the formula that was used by Dr. Wai Tsui (Mony's team). He sets k4=0.   So after that the expression could be rewritten:  alpha1 = 0,  alpha2 = k2+k3

This is exactly the formula used by Wai and is presently in FireVoxel Build 134 (the Anne was using for the abstract).

Now there is a second paper by Reivich (Journal of Cerebral Blood flow and Metabolism 5:179-192 1985), brought up by Fernando.  This paper references an earlier (Sokoloff 1977) paper: with


However, those 2 formulas are substantially different, which can be the easiest observe if we substitute k2=0 to both.  So which one should I use?





Fixing defect, when the 4D volume crop, the absolute values of times are lost and relative times are preserved.  This causes the problem for some registration functions.

Thursday, March 27, 2014

Implemented functionality in "PET to Anatomy registration" when all of the MR entity layer (incl. ROIs) are transformed appropriately.  This realizes the "ROI Transfer" feature.  PET entity layers, if present,  are transformed appropriately too.

Wednesday, March 26, 2014

Impementing 4D to 4D registration in the context of the PET to Anatomy registration. The challenge here is to properly merge the different timings of PET and MR.

Monday, March 24, 2014

FireVoxel Build 134 is released.
Fixed defect and crash:  Dialog RoiStats4D, in multilayer entity, if there are several ROIs present and if one of them is empty, no stats would be displayed even if it was not an active ROI.
Finalized the Release Candidate for Liver DCDI model. All the concentration options discussed are included. This would appear in Build 134.

Thursday, March 20, 2014

Liver DCDI:  revisiting the Monotail concept (AIF=VIF with t>3 min).  This might allow to perform a segmented fir for {F,Ve} only for this part of the curve thus stabilizing the kit.  This does not make any assumptions about the delays {Ta,Tv}, i.e. would work for any delays. Interestingly, Ki also can be derived as it is not an independent variable of in the trio of {F,Ve,Ki}

Wednesday, March 19, 2014

DCDI model:  added an User Interface option to select Linear (=1) or Logarithmic(=0) concentration conversion.
FireVoxel Build 133 is released.
DCDI model:  added an User Interface option to use the L1 or L2 metric for calculating the
fitness residual.
YL-case,   "DCDI - Stabilized V1"

Obtained a good fit with good parameter values except for the high flow. Perhaps high flow can be explained by the concentration conversion.
Note1:  ROI was drawn fairly large as in Sourbron's paper (i.e. 40-60 mm diameter)
Note2:  As in Sourbron's paper the Arterial delay exceeds the Venous delay.  Interestingly that would
mean that venous contrast arrives first, but this is exactly his primary mode.

Tuesday, March 18, 2014

Implemented automatic matching BATs of AIF and TACs. Result is inconclusive as fitting is very good but parameters are unrealistic.
Corrected the VolSetSlice function, in the binary (1-bit ROI) case.  The Source buffer was modified in this function causing the error.
New DCDI variant:   after BATs are matched, the arterial flow Fa can be calculated from the short initial period.

Monday, March 17, 2014

FireVoxel Build 132D is released.  This fixes the problem with MTT in the "DCDI  Stabilized-V1" model.

Sunday, March 16, 2014

Dialog RoiStats4D: added a function button-"BAT". When user press this button the current time advances to the BAT for this curve.
Developing an automatic  BAT (bolus arrival time) function for dynamic studies.  At the moment it will be employed in the context of DCDI model:   BAT of AIF should be matched to BAT of ROI to determine the Arterial delay specific to the given ROI.
Quick FireVoxel Builds 132B, 132C are released reflecting the urgent work on the stabilization of the Liver DCDI (Dual compartment dual input models).
Particularly, in 132C, a "DCDI Stabilized - V1" is introduce.  It uses the integral form of DCDI equation to eliminate one of the independent optimization variables thus stabilizing the fit.

Friday, March 14, 2014

Implementing the "Liver DCDI  Monotail" model that allows to avoid an explicit calculation of {Ta,Tv} (arterial and venous delay).  As the first stage only 3 parameters are calculated {F,Ve,Ki}.
FireVoxel Build 132A is released.

Thursday, March 13, 2014

Investigating defect of Saving\Loading RAW  (*.im\MIDAS) files.
Liver DCDI model:   removed the "Ve max" (extracellular volume limit) from the user interface since it is always in [0,1] range.

Wednesday, March 12, 2014

Dialog RoiStats4D:  added the Info button so the Information could be displayed more conveniently for the user.
Dialog RoiStats4D:   Implemented an intelligent background color management.
Dialog RoiStats4D:  User is now able to use   {LEFT,RIGHT} keyboard keys to scroll in time when this dialog is open.  The 4D volume and the Curves in the dialog box are updated correspondingly.

Among many uses this function allows to reuse this dialog in the BAT (Bolus Arrival Time)  verification procedure.
Fixed several issues related to 4D ROIs and the corresponding layer control dialog box:
a) 4D ROI default name RAW extension
b) 4D ROI default RAW save format
c) In RoiStat4D dialog box, the timepoints not containing the actual ROI are drawn as "white" nodes on the curve.

Monday, March 10, 2014

Liver DCDI model:  adding two implementations of this model to the UI. 
The "Standard" variant, has exact implementation of the Sourbron's paper with the addition of the Exam length parameter and the variables {TotalFlow,fa,Ve,ki}.
The "Experimental" variant hosts new investigations, such as independently derived "Ta" arterial delay time.
Fixed the defect in   "Roi>Convert 3D to 4D" function.  DICOM-style headers were not properly constructed for a newly created 4D entity.

Sunday, March 9, 2014

URAL registration 3D/4D:   in case when non-textured URAL measure is selected, applied very efficient gradient interpolation technique that result in a significant speed up during the AutoFocus and especially the Finetune stage.

Completely re-engineered the image gradient field reslicing function.

Saturday, March 8, 2014

Registration 4D:   Eliminated an excessive temporary memory allocation during the 4D registration.  This was the cause of the memory allocation failure during the registration of large 4D datasets.

Friday, March 7, 2014

Latest DCDI approach to  Arterial (Ta) and Venous (Tv) delay approach   was tested:

Arterial delay is defined graphically (at the moment) by analyzing the AIF and  roiTAC.
(blue-AIF,  red-VIF, green-roiTAC)

Define:   Ta = ContrastArrivalTimeROI - ContrastArrivalAIF.
For this specific ROI it was Ta = 16 sec.
At the moment User punches in this time delay, but will be entirely automatic later.

Then we perform 5 parameter fitting of DCDI model  {TotalFlow,fa,Ki,Ve,Tv}.  We set  Tv=[0,8] seconds.

Result is encouraging, with fa=0.33.  (Blue is the data curve, black is the Model curve)


ROI was made very small to avoid the blood vessels.

Thursday, March 6, 2014

Time to Peak  (in seconds) parametric map for the liver  , case YL.
Vein network shows varying arrival times.  There seem to be a substantial delay between the main Portal Vein (where we sample VIF) and the peripheral (?) branches (which actually supply the tissue).
Delays seem to be upto 15 seconds.


Liver DCDI:  Based on the discussion with Dr. Rusinek, experimenting with the alternative ways to calculate the Arterial fraction and then substitute it into the Sourbron's equation for fitting.  Reminds me of "Segmented fit" in IVIM promoted by Eric Sigmund.

Tuesday, March 4, 2014

Stress testing correctness of the fitting procedure, substituting  AIF and VIF (in 2 separate experiments) as the Data curve and comparing to the analytically derived result.
Assembled {AIF,VIF,+6 ROI Tacs} package for the external verification of Liver DCDI model fitting.

Monday, March 3, 2014

Adding the allowed ranges of parameters {Fa,Fv,Ve,Ki} for Liver DCDI model, so the User\Researcher could control those parameters directly for investigations.
Provided to Hersh the full analysis \report on 3 cases   {KA,LP,YL} with the respect to Liver DCDI model.

Sunday, March 2, 2014

Friday, February 28, 2014

Liver DCDI model:  Obtained a very good fit, with all parameter values are now in the allowd physiological ranges.  However, the question remains why the Arterial Fraction is essentially a 0?  Does it have an explanation?
ROI to model, was made very small with the effort to exclude possible blood vessels.


Thursday, February 27, 2014

Rewriting the Liver DCDI fit procedure, so the Amoeba optimization is performed many times from various starts in the grid, instead of a single start.
Implemented variant of Amoeba-local optimization that is guaranteed to stay within User-specified parameter bounds.  Applied it to the problematic liver case from Hersh. However, the obtained fit is not as good as for other cases, so continue the work on more efficient optimization procedure.  Here is current best result:


Further investigation of the fitting problems on Hersh's example:  very good fit is found by Amoeba,  but the best value is found is outside the acceptable physical range of parameters (f.e. the Arterial fraction is negative).  So clearly the Optimization procedure has to change in some way.  Investigations to continue.


Wednesday, February 26, 2014

Investigating and fixing what most likely a defect in the fitting of the DCDI model.  Issue is that two curves below, one with obviously worse fit is presently returned with the smaller residual.

Tuesday, February 25, 2014

Further optimized the search of the required precision of variables before Amoeba optimization.  This is relevant to all optimizations using Amoeba.  It was initiated in the context of Liver registration which was sped up by another 5%.

Monday, February 24, 2014

Re-engineered the Reslicing linear interpolation function for Undirected gradients.  This is in all registrations, 3D and 4D, that use the URAL measure.

Wednesday, February 19, 2014

Constructing the QuickStart manual for Liver Dual Compartment Dual Input workflow.

FireVoxel Build 131 is released.

1. AutoFocus 3D\4D registrations: parallelization was removed from Finetune, in non-MI measures. This led to a 18% speed up on 4D liver registration on Hersh's data.
2. Reimplemented the principal  gradient matching procedure of Registration, using the AVX2 latest INTEL 256-bit instructions.
3. Achieved further improvement of speed in URAL-Registration core procedure (affects 3D\4D).  This was done by further usage INTEL AVX intrinsics (128-bit vectorization commands).
4. Modified the Run-length representation of  Gradient fields used in 3D\4D registration to make more efficient use of memory and allocating and individual buffer for each image line  instead of one large buffer for the whole image.  
5. Liver DCDI:  Added the quick reference menu item for "Applications>Liver DCDI>Modelling".  This brings up the parametric modelling dialog box with the appropriate model active.
6.  Raised the "Optimization depth" Model control parameter to 10.
7.  Corrected the output units of the Liver DCDI model.  This does not change the fit, but outputs correct numbers consistent with the Sourbron's paper
8. Parametric Models:  when the "Process ROI as a single TAC" mode is used, before the  fitting curve is displayed,  all the requested parameters are displayed in a separate dialog with the appropriate units.
Parametric Models:  when the "Process ROI as a single TAC" mode is used, before the  fitting curve is displayed,  all the requested parameters are displayed in a separate dialog with the appropriate units.

Corrected the output units of the Liver DCDI model.  This does not change the fit, but outputs correct numbers consistent with the Sourbron's paper.
Liver DCDI:  Added the quick reference menu item for "MainMenu>Applications>Liver DCDI>Modelling".  This brings up the parametric modelling dialog box with the appropriate model active.

Raised the "Optimization depth" Model control parameter to 10.

Monday, February 17, 2014

Modifying the Run-length representation of  Gradient fields used in 3D\4D registration to make more efficient use of memory and allocating and individual buffer for each image line  instead of one large buffer for the whole image.  This should substantially reduce stress on the memory allocation system.
Achieved further improvement of speed in URAL-Registration core procedure (affects 3D\4D).  This was done by further employin INTEL AVX intrinsics (128-bit vectorization commands).

Sunday, February 16, 2014

Reimplemented the principal  gradient matching procedure of Registration, using the AVX2 latest INTEL
256-bit instructions.   Intel C++ compiler was used.  However, the timings are exactly the same as for AVX (128-bit) implementations.

Friday, February 14, 2014

AutoFocus 3D\4D registrations:   in the Finetune part of the registrations, there were several parallelization levels built in, f.e a Parallel Amoeba.  However, running each thread in some scenarios, like liver registration, requires a lot of memory.  Also, except for Mutual Information, all other measures (incl URAL) are highly parallelized on the level of evaluating a single transform about the matching cost.

So parallelization was removed from Finetune, in non-MI measures. This led to a 18% speed up on 4D liver registration on Hersh's data.
FireVoxel Build 130A is released:

1. Fixed the crash, reported by Hersh: when Liver dataset is loaded, without ROI,   "Liver DCIDI>Register 4D" command crashes the application.
2. 4D Registration (Basic Candidate Construction stage):  Added the "time remaining" info displayed in real time in   min:sec format.
3. AutoFocus 4D Registration:  Re-engineered previous design that was creating a copy of the original 4D volume in memory, so it uses precisely half of the memory of the previous design.
4. Improved User Interface of the "Blood Vessel Segmenter" function specific for DCE.  User is NOT required any longer to scroll in time to the timepoint of the desired vessel peak.
5. Implemented function to find the Peak timepoint of the volume over the specified Vector ROI.  Exposed this function under "MainMenu>Volume>AdvanceTo" submenu.

Thursday, February 13, 2014

Implemented function to find the Peak timepoint of the volume over the specified Vector ROI.  Exposed this function under "MainMenu>Volume>AdvanceTo" submenu.
Improved User Interface of the "Blood Vessel Segmenter" function specific for DCE.  User is NOT required any longer to scroll in time to the timepoint of the desired vessel peak.
Updating the Vessel Finder dialog box.
AutoFocus 4D Registration:  Re-engineered previous design that was creating a copy of the original 4D volume in memory, so it uses precisely half of the memory of the previous design.

Wednesday, February 12, 2014

4D Registration (Basic Candidate Construction stage):  Added the "time remaining" info displayed
in real time in   min:sec format.

Tuesday, February 11, 2014

Fixed the crash, reported by Hersh: when Liver dataset is loaded, without ROI,   "Liver DCIDI>Register 4D" command crashes the application.

Monday, February 10, 2014

FireVoxel Build 130 is released.



1. Corrected defect:   after IDIF is segmented, the TAC dialog pops up and now correctly displays the size of the vessel in (mm3) and appends it to the name of the vessel correctly.
2. Specifically for calculating distance of the fit of 2 curves that are sampled at highly uneven intervals:  Implemented the function for L2 integration based distance for two functions F(t) and G(t).  Perform exact integration of 2 piecewise linear functions.
3. Finalizing the parameter Dialog Box for the latest   Anatomy Constrained Input Function segmenter.
4. When a single seed is required and several seeds are present, Fvx requires a single seed to be selected and warns otherwise.
5. In all registrations, 3D and 4D,  implemented mechanism of tolerating the memory allocation failure. Now fully parallel version is ran,  the threads which failed are recorded into "Failed" thread array and then ran in serial mode.
6. Optimizing interface and performance of basic VolumeGetBox and VolumeSetBox procedures.  
7.Modifying User Interface objects due to a change of volume data primitives from 2D to 3D.

8. Updating the FVX file format.
9. Integrated  DCMTK-based DICOM header as a parallel structure to the existing TREE header design. 
10. Defect corrected: when drawing with the paintbrush  on ROIs, when paintbrush crosses the right border of the image the drawn voxels would appear sometimes at the top border.
11. Updated and restored .FVX format Load\Save due to a change in the basic volumetric entity data structure.
12. Finalized the Gamma Variate fit of the arbitrary function.  Introduced the "Fit" operation of the TAC inside the RoiStats4D dialog.
13.  Re-implementing the frequent {VolumeCropSlice, VolumeCropTimepoint} operations which are frequently used in processing.  Idea is to perform it through copying compressed blocks, 
14. Developed a function, when given a 4D volume and an ROI (3D or 4D),   FVX advances to timepoint where amount of information (or entropy) over the given ROI is maximum. 
15. Dialog "Split ROI by Threshold": Implemented a feature, so user is able to enter the desired threshold manually.
16. In preparation to release Build 130:  Restoring several parts of the Automatic Build Test that use the .FVX file format.
17. Implemented a support function, that in Play4D -  ALL the documents that have a compatible dynamic information will be played simultaneously
18. Implemented first fitting result for the Liver DCDI model (Sourbron).
19.  Liver DCDI model:
a) Fully parallelized the "Grid search" preceding the iterative Amoeba  (Simplex) optimization
b) Integrated the Parallel Amoeba variant
20.  Implemented derived parameters as per Sourbron's paper.
21.  Performing rearrangement of Sourbron's DCDI equation, moving to new
optimization variables:
22.  Updated the layout of the Dynamic Experiment\Parametric Map calculation dialog.  Added new relevant buttons.
23.  Defect Corrected:  When saving the TAC such as Input Function from ROIStats4D dialog box, the TAC name was improperly formatted and later incorrectly displayed inside the Parametric Models dialog.
24.  Converted all timing timing information to "Absolute times"  (starting Jan 1, 1900) for consistency and correctness.
25.  Layer Control Dialog\Load RAW.  Added the function so that the *.time files can be loaded.
26.  Layer Control Dialog\Load RAW.  Added the function so that the *.time files can be loaded.
27.  There is a substantial change in FireVoxel document format in Build 130.  Added the handling of cases when user tries to load an older version of the format and an appropriate message.
28.  Liver DCDI:  added automatic Build Test.
29.  AutoFocus 4D dialog box:  fixed the Slice Mode combo (drop down) box.

30.  Implemented a dedicated submenu with preset parameters for the "Liver DCDI" workflow.
Implemented a dedicated submenu with preset parameters for the "Liver DCDI" workflow.

Sunday, February 9, 2014

AutoFocus 4D dialog box:  fixed the Slice Mode combo (drop down) box.
Liver DCDI:  added automatic Build Test.
There is a substantial change in FireVoxel document format in Build 130.  Added the handling of cases when user tries to load an older version of the format and an appropriate message.
Layer Control Dialog\Load RAW.  Added the function so that the *.time files can be loaded.

Saturday, February 8, 2014

Fixing the design: In various part of the FireVoxel there is an inconsistent treatment of time values.  Certain structure hold time in "Absolute format" (i.e. seconds since Jan 1, 1900), other structures keeps them in seconds since the start of acquisitions.  This causes several glitches, f.e. during transfer of the Input function, from Automatic IDIF finder into Parametric Model calculation model.
Presently converting all the internal structure into the "Absolute format".  Relative times would only be constructed temporarily for specific purposes such as Display and during the Parametric Model calculations.