diff --git a/CHANGELOG.md b/CHANGELOG.md index fb8ce0c..9b0e53f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Change Log ### All notable changes to `COMMIT` will be documented in this file. +## `v2.4.2`
_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`
_2025-09-18_ ### 🛠️Changed diff --git a/commit/core.pyx b/commit/core.pyx index 20f12d6..e0754ed 100644 --- a/commit/core.pyx +++ b/commit/core.pyx @@ -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 @@ -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']] + 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') diff --git a/pyproject.toml b/pyproject.toml index d5c89d3..7741a0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",