Search This Blog

Wednesday, October 29, 2014

In most dynamic models:  improved checking of the required Dynamic dimension to be present and have the proper values.
T1-inversion recovery (MODULUS):  parametric fitting and T1-map for the whole slice.  Processing time is 3 min/Slice but could be substantially improved.

T1-inversion recovery model:  completely reengineered the model, implemented a Global Fit solution, updated the user interface.

Data curve (Red),  Model Curve (Black)

Dynamic model  "T1 mapping using inversion-recovery - MODULUS" : made correction to allow data to have repeating TI-values.
MIDAS .time format::  Added improved heuristic about the "Starting Index Convention"
.IM file RAW load:  added special processing in case the time values are not in chronological order.
Fixed an error in "ChangeEndianess" function that was causing an aborted load of .im files.

Tuesday, October 28, 2014

FVX file format load:  Implemented function that ensures the Chronological order of Dynamic coordinates. 
Performed a major reengineering of a composite DynamicCoordinate structure in FireVoxel.  This influences the way the dynamic coordinates are stored and used.

Monday, October 27, 2014

Liver DCDI:  Blood Vessel removal Dialog:  corrected an error with displaying the percentage of the Vessel and Liver.

Sunday, October 26, 2014

Sulci Base Print with the Sulci Depth.  This is a quantified print, not a volume rendering.
Units are in 0.01 mm.  All processing and print are produced by FireVoxel, no additional software.



The above image is dual with the "Binary SulciBasePrint" which could be directly derived from the above.
SulciBasePrint:   Initial result of Sulci Depth maps (raw data to be improved).  Note!  THIS PICTURE IS NOT A VOLUME RENDERING.  Instead it is a fully quantifiable base print.  Signal intensities are in 0.01mm units representing Sulci depth

Added ".image"  to the list of the supported DICOM extensions.
BrainPrint - SulciBasePrint:

Can be now generated in FireVoxel directly.  Below is an intermediate result of binary SulciPrint, without Sulci Depth information (next step).  Note that the visible width of the Sulci is highly influenced by the User-define "Sulci minimal depth parameter"



Saturday, October 25, 2014

Implementing the "Sulci Base Print"  function for the BrainPrint project.

Friday, October 24, 2014

Finalized, documentd and sealed 2 most promising variants of the new Elastic Mongoose registration\segmentation algorithm.
Performed correction for the "Calculate the Texture Gradient over the ROI only" function.  This would speed up substantially and produce less irrelevant features for certain registrations.

Wednesday, October 22, 2014

Invented and implemented a superior "Feature-match" function for the Elastic Flow.  It is insensitive to the ordering of the voxels in the Match Search Apperture.

Monday, October 20, 2014

Implemented a function for Volume reslicing using the Flow Map.
Images of {1,32} bit and standard interpolations are allowed.

Friday, October 17, 2014

Added a handy function to determine if 3D polynomial transform is actually 2D.
Updated the Polynom::PruneZero() function, to check term coefficients to be fabs(k)<MACHEPS instead of exact zero

Wednesday, October 15, 2014

Landmark Matching\Registration function:  upgraded to accept arbitrary number of Landmarks.
URAL feature generation function (both Grad\Edge).  Made adjustment to algorithm that greatly
improve the speed of the processing on binary volumes (was done in context of the Mongoose-Elastic registration)

Tuesday, October 14, 2014

Internal code:  updated the Isotropic voxel test to include the DICOM_SPCEPS constant.
ROI Inflate-Deflate dialog box:  encapsulated programming interface.  Added static parameters separate for Inflate\Deflate so User's set options are remembered.

Friday, October 3, 2014

Implementing an initial version of the fully elastic registration algorithm.  In this variant - a 3D volume and the "Starting Shape" ROI are provided.  During the iterative matching process the Shape
is adjusted to elastically match the contents of the underlying volume.

Sunday, September 28, 2014

FireVoxel Build 156 is released.

1. Gradient withing URAL-radius to the Volume boundaries are set to 0 to avoid introducing non-existing features that might steer registration.
2. If one of the timepoints in registration is binary (as sometimes in hybrid scenario), the URAL_NORM=Linear is always chosen for that specific timepoint independent of what norm is specified by the user.
3. MainMenu>Volume>Effective Noise:  corrected the defects, crashes on 4D volumes4. RoiStats3D dialog:  added information about the number of the VOID voxels of the SI-Volume within the specified ROI.

4. Implemented the corrections to the Liver DCDI  4D registration parameters.  
Implemented the corrections to the Liver DCDI  4D registration parameters.  This was to fix example "OV" that had very high contrast enhancement thus failing the registration as high gradient inside the contrast regions were attracting the feature detector.
URAL_UNI measure was employed, with the sigmoid function base of 3*Noise.  Automatic noise detection step was added to the registration.

Saturday, September 27, 2014

RoiStats3D dialog:  added information about the number of the VOID voxels of the SI-Volume within the specified ROI.
MainMenu>Volume>Effective Noise:  corrected the defects, crashes on 4D volumes.  Obtain the result on GRASP very similar to the Riccian noise result but without the user specifying the size of the search window.

Friday, September 26, 2014

Added corrections to the general registration algorithm for URAL measure:

a) Gradient withing URAL-radius to the Volume boundaries are set to 0 to avoid
introducing non-existing features that might steer registration.

b) If one of the timepoints in registration is binary (as sometimes in hybrid scenario), the URAL_NORM=Linear is always chosen for that specific timepoint independent of what
norm is specified by the user.
FireVoxel Build 155 is released.


In 3D volume DICOM load, increased the interslice distance tolerance from 1e-4 to 1e-3. This allows to load A.R. volumes without warning messages.
FireVoxel Build 154 is released.

1. Added the BrainCT  workflow (MainMenu>Applications).
Added new function "BrainCT>Segment Intracranial cavity".
2. EdgeWave dialog:  corrected a major UI error.  When no seeds are present, the logic of selecting the Connected Component choices (radiobuttons) was damaged.
3. Corrected interface and initial parameters to process the CT-brain scans without leaks.
4. Toft's model (#8):  re-arranged the optimization variables to improve the solution bounds.
5.  Introduced a “Balanced solution” concept for parametric fitting and Toft’s model in particular.
6. Tofts modified model (k-trans,Ve,Va):  implemented changes to model similar to the regular model.
7. Corrected defect:  Unable to "Crop 4D All Layer" \ "Crop 4D Active Layer" using the vector ROI.
8. Added ABT subtest for "Tofts modified (K-trans,Ve,Va)" model.
9. Fixed major bug in registration of real-valued volumes (=PET).

Tuesday, September 23, 2014

Monday, September 22, 2014

Added ABT subtest for "Tofts modified (K-trans,Ve,Va)" model.
Corrected defect:  Unable to "Crop 4D All Layer" \ "Crop 4D Active Layer" using the vector ROI.
Tofts modified model (k-trans,Ve,Va):  implemented changes to model similar to the regular model.
Tofts model (but general issue important to all models, incl. Eric's IVIM), this problem originated in Henry's report of very high Ve (>18000) in particular ROI fit.

During the parameter fitting, there might be numerous solutions (both voxelwise and Single ROI), whose Minimization Cost differ by the miniscule amount (<0.01 in relative terms of Absolute Minimum Cost).

We "Balance" the solution by considering all such solutions equally valid candidates.  Then several logics could apply.

Below is the result of one such "Balanced" solution, on the same AATH dataset.  Note, the balancing is done on the level of the single voxel without taking neighboring voxels into account.

New Option is added to the Parmetric Model processing:  "Balance Solution" - ON\OFF.

K-trans (regular)
K-trans (Balanced)

Ve (regular)
Ve (Balanced)




















Residual (regular)
Residual (Balanced)




Toft's model (#8):  re-arranged the optimization variables to improve the solution bounds
old: (Ktrans,kep)   -> new: (Ktrans,Ve).  Since user supplies the Bounds for Ve, the calculation
of bounds for  the derived kep = Ktrans/Ve was introducing too big of the interval.

Sunday, September 21, 2014

Corrected interface and initial parameters to process the CT-brain scans without leaks.

EdgeWave dialog:  corrected a major UI error.  When no seeds are present, the logic of selecting the Connected Component choices (radiobuttons) was damaged.
Added the BrainCT  workflow (MainMenu>Applications).
Added new function "BrainCT>Segment Intracranial cavity"

Wednesday, September 17, 2014

Code work and maintenance eliminating the procedure handling 24-bit signal representations.

Tuesday, September 16, 2014

FireVoxel Build 152 is released.

1. Corrected the defect:  when new document & file are created as a result
of the operation, the document file name may exceed 256 characters which is
the MFC limit for VisualC++ 2010.
2.  Implemented the Registration by DICOM tags only.
3.  Completely re-engineered the AATH model.
4.  Added the ABT subtest for the AATH model.
5. Added the ABT subtest for Blood vessel segmentation.
Added the ABT subtest for Blood vessel segmentation.

Monday, September 15, 2014

Added the ABT subtest for the AATH model.
Completely re-engineered the AATH model.  Fully parallel implementation on a single TAC level.
Implementation is fast enough to process large ROIs in voxelwise manner.




Friday, September 12, 2014

"Register by DICOM-tags only" function is tested on PET-MR.


Corrected a flaw in constructing internal info on  "Image_Orientation_Patient".
Registration by DICOM tags only.  Preliminary result.   S->D and D->S.  4D->3D is tested too.

Thursday, September 11, 2014


Another look at the Portal Vein residual (possible) movement after the registration.  Part of portal vein was manually drawn on 6 slices of the initial timepoints.  Corresponding TAC (VIF) was generated.  If there would be a substantial movement out of plane for the PV, we would have observed  sharp iregularities in this TAC.  However, beside one bump in the last quater the curve is very smooth which indicates that PV majorly remains in the same position.



Corrected the effect:  when new document & file are created as a result of the operation, the document file name may exceed 256 characters which is the MFC limit for VisualC++ 2010.
Liver 4D registration:  Liver ROI could be clipped to exclude the areas outside the liver from the consideration.  There is a x10 time smaller files size (66MB vs  660MBs)


Tuesday, September 9, 2014

FireVoxel Build 151 is released:

https://drive.google.com/file/d/0B2lI9iEKOqv6bHEyVlFwY2MybUU/edit?usp=sharing


1.      Modified saving of ROIs to ANALYZE format to allow ImageJ to properly display the ROIs.
2.      Fixed the crash in  "MainMenu>ROI>Convert 3D to 4D" function. This was caused by incorrect creation of the DICOM header for new 4D Roi.
3.      Re-enabled ABT 8 subtest related to registration after the change in the core Autofocus registration.
4.      Mouse DCE (9 timepoint mouse brain axial dataset).  Determined the set of parameters that provides good quality registration and set these parameters as the default under the MainMenu>MouseDCE>Register using URAL.
5.      DCDI workflow:  released 1st version of the complete documentation.
6.      Finalized the DCDI workflow corresponding to the documentation

7.      Fix:  Loading Diffusion datasets with DCMTK (Siemens private b-value tag):  
Loading Diffusion datasets with DCMTK (Siemens private b-value tag):  
VM (value multiplicity) in DCMTK for the VR="OB" is always set to 1, while
it needs to be variable.  This affects the private Siemens tag for B-value
so only the first character is read (i.e.  "4" instead of "400"). 

 provided a general workaround for VR = {OB,UN}

Monday, September 8, 2014

DCDI workflow:  released 1st version of the complete documentation.
Mouse DCE (9 timepoint mouse brain axial dataset).  Determined the set of parameters that provides good quality registration and set these parameters as the default under the MainMenu>MouseDCE>Register using URAL.
Re-enabled ABT 8 subtest related to registration after the change in the core Autofocus registration.

Sunday, September 7, 2014

AutoFocus Registration (3D and 4D):  substantially improved the design and implementation of the AutoFocus algorithm when the Target ROI is positioned close to the boundaries of the Volume.

Made additional corrections affecting the Gradient Measure (URAL), to always inflate Target ROI (internally and implicitly) by 1 voxel to account for the   vertice of the lattice vs.  center of the lattice representation of the gradients.

Both changes have resulted in much better registration in Liver DCDI case.
a) before registration on the mid-sagittal slice                               b) after registration

Thursday, September 4, 2014

Fixed the crash in  "MainMenu>ROI>Convert 3D to 4D" function. This was caused by incorrect creation of the DICOM header for new 4D Roi.
Modified saving of ROIs to ANALYZE format to map to {0,255} instead of {0,1}.  This allows ImageJ to properly display the ROIs.

Wednesday, September 3, 2014

ImageJ is using an incorrect LUT table when displaying the ROI saved by FireVoxel in .IMG (Analyze 7.5) format.  Change the LUT (in Image J) to display the image properly.
I think it is a poor logic on ImageJ site in selecting the LUT.

Tuesday, September 2, 2014

FireVoxe Build 150 is released.
download here:
https://drive.google.com/file/d/0B2lI9iEKOqv6ZDhESTJrZ3dHeWM/edit?usp=sharing

1. RoiStats3D dialog box: fixed the crash after closing the dialog.
2. AutoFocus4D   registration dialog box:  fixed the drop-down combo box to expose all the interpolation options during the registration.
3. Dialog "ROI split by threshold":  expanded to work with the Parametric maps.
4. Dialog Split ROI by threshold:  added "%" information for 2 separated segments.
5. Liver DCDI blood vessel segmentation:  finalized the function.  User starts with no parameters, default 20% of the voxels are chosen as a blood vessel.  Then interactive dialog pops up when user can interactively adjust that threshold based
6. Expanded the RoiStats3D dialog, so it could be activated with only ROI present (i.e. no underlying
volume).  This is useful for the ROI morphological evaluations (number of voxels, blobs, etc).
7. ABT:  created a subtest that would test Core dialogs for not crashing.

Added the dialogs to subtest  a)  RoiStat3D  b)  RoiStat4D
ABT:  created a subtest that would test Core dialogs for not crashing.
Added the dialogs to subtest
a)  RoiStat3D
b)  RoiStat4D
Expanded the RoiStats3D dialog, so it could be activated with only ROI present (i.e. no underlying
volume).  This is useful for the ROI morphological evaluations (number of voxels, blobs, etc).

Monday, September 1, 2014

Liver DCDI blood vessel segmentation:  finalized the function.  User starts with no parameters, default 20% of the voxels are chosen as a blood vessel.  Then interactive dialog pops up when user can interactively adjust that threshold based on visual evaluation of "Time-to-Peak" parametric map.


Sunday, August 31, 2014

Dialog Split ROI by threshold:  added "%" information for 2 separated segments.

Saturday, August 30, 2014

Dialog "ROI split by threshold":  expanded to work with the Parametric maps.

Friday, August 29, 2014

AutoFocus4D   registration dialog box:  fixed the drop-down combo box to expose all the interpolation options during the registration.
RoiStats3D dialog box: fixed the crash after closing the dialog.

Wednesday, August 27, 2014

Liver Blood vessel segmentation.
New method is based on the "Time of Active Rise" technique developed years ago.  This can be applied to any organ in dynamic contrast studies.  "Time of Active Rise" parametric map is constructed and then a single simple threshold is chosen (in seconds).

Tuesday, August 26, 2014

FireVoxel Build 149 is released.

Download at:
https://drive.google.com/file/d/0B2lI9iEKOqv6N2U0a08taG9ZM2c/edit?usp=sharing



1. Sulci-ROI segmentation:  implemented function "Wave Distance" from the Brain mask ROI surface to its convex hull.
2. Implemented  the Support Module for measuring the Wave Distances in various scenarios.
3. Prototype of Sulci segmentation from  GM-CSF interface.
4. Fixed the crash related to DICOM features:  when volume is transformed with the dimension change (or similar operation),.
5. ABT: new subtest for Rotate+Scale of large volumes with all possible interpolations.
6. Volume Affine transform:  optimized memory usage  and workflow so it is possible to have a destination volume exceeding 1.5 billion voxels. 
7. Volume histogram calculation: optimized the memory workflow so very large volumes could be processed. 
8. DICOM load of very large: optimized memory workflow so no memory failure happens on 1.5 billion voxel volume.
9. Volume Arithmetic operations on very large volumes:  Optimized the memory workflow so the operations do not fail on volumes with upto 1.5 billion voxels timepoint.
10. SIEMENS De-identified DICOM load:  corrected the logic so the 4D dataset could be logically combined and loaded properly.
11. Added User Interface-level functions:
  a)Measure Surface Wave distance to Inside of the ROI
  b)Measure Surface Wave distance to Outside of the ROI
12. Surface Atrophy Depth measurement.  Added User Interface function "MainMenu>Brain>Measure Surface Atrophy depth"
13. Bruker ANALYZE 7.5:  added detection of the signed short integers in ANALYZE file, then offering user an option to treat file as a Bruker ANALYZE 7.5
14. Corrected the loading of ANALYZE-based  (.img)   4D file (.time).
15. MainMenu> {"Open RAW 3D", "Open RAW 4D"} functions:  added functionality so that last used extension is remembered and used as the default next time the dialog opens.
16. Completely re-engineered User Interface and the implementation of the "Aggregate projections"  -  {MIP,Surface}
17. Corrected the UI behavios:  In EdgeWave, if Vol+RoI is present,  ROI is disabled (invisible), but being Active ROI was still chosen as the operand.
18. Parametric Map calculation:  when resulting file is loaded, a check is performed if invalid floating point number is present (INF or NAN), message is  then displayed.
19. Dynamic Parametric Map module:  completely re-engineered the Model-1 ("Variation") and added an ABT validation subtest for this model.
20. Dynamic Parametric Models: Completely re-engineered Model 4 - "Input Function Distance". Added a corresponding ABT validation subtest.
21. Dynamic Parametric Models: Completely re-engineered Model 5 - "Custom Time of Active Rise". Added a corresponding ABT validation subtest.
Dynamic Parametric Models: Completely re-engineered Model 5 - "Custom Time of Active Rise". Added a corresponding ABT validation subtest.
Dynamic Parametric Models: Completely re-engineered Model 4 - "Input Function Distance". Added a corresponding ABT validation subtest.
Dynamic Parametric Map module:  completely re-engineered the Model-1 ("Variation") and added an ABT validation subtest for this model.
Parametric Map calculation:  when resulting file is loaded, a check is performed if invalid floating point number is present (INF or NAN), message is  then displayed to help pinpoint the source of the overflow.  Parametric map loading is then interrupted.
Corrected the UI behavios:  In EdgeWave, if Vol+RoI is present,  ROI is disabled (invisible), but being Active ROI was still chosen as the operand.
Completely re-engineered User Interface and the implementation of the "Aggregate projections"  -  {MIP,Surface}
MainMenu> {"Open RAW 3D", "Open RAW 4D"} functions:  added functionality so that last used extension is remembered and used as the default next time the dialog opens.
Corrected the loading of ANALYZE-based  (.img)   4D file (.time).

There was an additional typo error in the supplied header in image dimensions.



Also, the header of the .TIME file contains a different resolution (1,1,1 mm) from the information stored inside the individual  .img files.   (0.075, 0.15, 0.15mm)
Bruker ANALYZE 7.5:  added detection of the signed short integers in ANALYZE file, then offering user an option to treat file as a Bruker ANALYZE 7.5
File is now loading directly to FireVoxel (using supplied code sample, but without division by 10, see the MaxSI value reported).


Monday, August 25, 2014

                                           Surface Atrophy Depth meausrement.

Added User Interface function "MainMenu>Brain>Measure Surface Atrophy depth"

Two longitudinal timepoints Time0 (2009) and Time2 (2011)  of the same patient's brain were processed.

Step 1.
Brain Mask was extracted using FireVoxel\EdgeWave (after non-uniformity correction using FireVoxel BiCal).

Step 2.
Two Brain Masks were then registered using the Rigid Transform so they are overlaid in the same coordinate system of the Time2











Step 3.  For the Brain Mask of the earlier volume (Time0) we calculated the depth from the Surface into the brain (measured in 0.01 mm).


Step 4.  That "Depth from the surface" map of Time0, was then projected onto the surface-only  BrainMask of Time2.  Thus the surface values of the "Atrophy Depth map" were constructed.
One projection was rendered using the primitive rendering ability of the FireVoxel.
Depth of Surface atrophy (in 0.01 mm). Transparent voxels are due to FireVoxel's rudimentary volume rendering.



As a next step would try to regenerate the surface using better volume rendering tools.





















Sunday, August 24, 2014

Added User Interface-level functions:
a)Measure Surface Wave distance to Inside of the ROI
b)Measure Surface Wave distance to Outside of the ROI



Friday, August 22, 2014

SIEMENS De-identified DICOM load:  corrected the logic so the 4D dataset could be logically combined and loaded properly.  The problem was in De-dentifies replacing the TAG_PATIENT_ID differently for each timepoint.
Two timepoint T0(2009) and T1(2011) were
a) Whole brain segmented for masks M0 and M1.
b) Brain masks M0 and M1 were co-registered.


Result is below:
M0 - red mask (earlier)
M1 - blue mask (later)
Purple (red+blue) = overlap of M0 & M1



Wednesday, August 20, 2014

Prototype of Sulci-segmentation from T2-weighted image  MS31a_T2 using HullWave algorithm

I had to try BrainMask on T2, was not able to find optimal parameters to generate full BrainMask on T2.  But result seems to be good for the upper surface of the brain relevant for Sulci-segmentation.

HullWave works with the binary brain mask obtained from T1,T2 using any segmentation algorithm (FireVoxel\EdgeWave was used in this instance).


Map of detected Sulcal depth (in 0.01 mm)

Volume Arithmetic operations on very large volumes:  Optimized the memory workflow so the operations do not fail on volumes with upto 1.5 billion voxels /timepoint.
DICOM load of very large: optimized memory workflow so no memory failure happens on 1.5 billion voxel volume.
Volume histogram calculation: optimized the memory workflow so very large volumes could be processed.  This function is part of every volume loading operation.  Added optional progress indicator.
Volume Affine transform:  optimized memory usage  and workflow so it is possible to have a destination volume exceeding 1.5 billion voxels. This includes viewing of the resulting volume (rest of the image processing operations is not guaranteed due to 32-bit limits).  Added an optional progress indicator during the Affine reslicing.
Fixing defect:  ABT   Rotate+Scale subtest with the Scale=3 produces a crash.

Tuesday, August 19, 2014

Continued the work to correctly create DICOM header after the transformation {Affine}.
Added ABT test for the Rotation+LargeScale of the 3D brain volume, and checking the SaveDicom\LoadDicom combination.

Monday, August 18, 2014

ABT: adding a subtest for Rotate+Scale of large volumes with all possible interpolations.
Corrected the crash related to DICOM features:  when volume is transformed with the dimension change (or similar operation),  new internal DICOM headers have to be rebuilt.  Presently it produces a crash because the new number of slices can be bigger.

When volume is reformatted (f.e. changing dimensions), internal DICOM headers were not generated properly for the new volume, producing a crash.  Now fixed. 

Sunday, August 17, 2014

Prototype of Sulci segmentation from  GM-CSF interface.
In the literature two possible approaches are described:
a) Having the Whole Brain (WM+GM) mask, segment Sulci using the GM-CSF interface.
b) Having the separate WM and GM mask, segment Sulci using the WM-GM interface.

MethodA is simpler to implement but there are much more difficult cases many sulci are too narrow to be reflected on the whole Brain Mask.

MethodB is considered more reliable, due to thicker layer of GM, but requires the WM-GM segmentation (not present in FireVoxel at the moment).

Here are the results of MethodA implemented in FireVoxel.  Sulci is represented as a color map where color corresponds to the length of the curved path from the "brain hull\envelop" to the particular point in sulcal space (measured in mm).


"Curved depth" map in 0.01 mm units.

Saturday, August 16, 2014

Implementing, testing and debugging the Support Module for measuring the Wave Distances in various scenarios.

Friday, August 15, 2014

Sulci-ROI segmentation:  implementing function for defining the "Wave Distance" from the Brain mask ROI surface to its convex hull.
Experimenting with the "Sulci-ROI" detection algorithm using the brain mask (EdgeWave) as the input.