Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log
### All notable changes to `COMMIT` will be documented in this file.

## `v2.4.2`<br>_2025-10-06_

### 🐛Fixed
- Error when checking the number of streamlines in the weighted LASSO function
- Error in verifying voxel correspondence between the lesion mask passed through the dictionary and the ISO weights map

---
---

## `v2.4.1`<br>_2025-09-18_

### 🛠️Changed
Expand Down
7 changes: 4 additions & 3 deletions commit/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,10 @@ cdef class Evaluation :
if self.A is None :
logger.error( 'Operator not built; call "build_operator()" first' )

if self.DICTIONARY['IC']['nF'] <= 0 :
if self.DICTIONARY['IC']['nSTR'] <= 0 :
logger.error( 'No streamline found in the dictionary; check your data' )

if int( self.DICTIONARY['nV'] * self.KERNELS['iso'].shape[0] ) == 0 :
if int( self.DICTIONARY['ISO']['n'] * self.KERNELS['iso'].shape[0] ) == 0 :
logger.error( 'Unable to set regularisation because no isotropic compartment found in the dictionary.' )

# load image and check it
Expand Down Expand Up @@ -827,7 +827,8 @@ cdef class Evaluation :

# compute array of weights from image
array_weights = weights_img[ self.DICTIONARY['MASK_ix'], self.DICTIONARY['MASK_iy'], self.DICTIONARY['MASK_iz'] ].flatten().astype(np.float32)
if array_weights.size != self.DICTIONARY['nV']:
array_weights = array_weights[self.DICTIONARY['ISO']['vox']]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we are overwriting the array_weight array; shall we create a new one?

if array_weights.size != self.DICTIONARY['ISO']['n']:
logger.error( 'Number of voxels in the weights image does not match the number of voxels in the dictionary' )
if np.any(array_weights < 1):
logger.error('All weights must be greater or equal to 1')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dmri-commit"
version = "2.4.1"
version = "2.4.2"
dependencies = [
"dmri-amico>=2.0.1",
"dmri-dicelib>=1.1.0",
Expand Down