openep / openep-core

Core OpenEP code - Matlab implementation
Apache License 2.0
9 stars 6 forks source link

Issues changing the distance threshold the getMappingPointsWithinMesh #70

Closed Jsalas424 closed 2 years ago

Jsalas424 commented 2 years ago

Hello,

I"m having issues changing the distance threshold for the getMappingPointsWithinMesh function.

Steps to reproduce:

>> openep_demo

>> iPoint = getMappingPointsWithinMesh( userdata, 'tol', 0.1 )

SWITCH expression must be a scalar or a character vector.

Error in pointStatus (line 43)
        switch varargin{i}

Error in getMappingPointsWithinMesh (line 39)
[iPoint, ~] = pointStatus( userdata, varargin );

>> iPoint = getMappingPointsWithinMesh( userdata, 'tol', 0.2 )
SWITCH expression must be a scalar or a character vector.

Error in pointStatus (line 43)
        switch varargin{i}

Error in getMappingPointsWithinMesh (line 39)
[iPoint, ~] = pointStatus( userdata, varargin );

Thanks!

p-j-smith commented 2 years ago

Hello, welcome to the openep repo!

Thanks for reporting the issue. I've just submitted a fix for it. There's a problem with the way getMappingPointsWithinMesh passes the arguments to pointStatus, which it calls underneath.

In the meantime, if you want to determine which points are inside your mesh with a different distance threshold, you could call pointStatus directly:

[iPoint, ~] = pointStatus( userdata, 'tol', 0.5)

Jsalas424 commented 2 years ago

Clarifying question about this function:

1) What are the units for 'tol' ? 2) Does this work in addition to the distance threshold filter you declare during a case, or are all of the points (regardless of distance threshold) exported by CARTO and we're supposed to reprocess the data with this function?

p-j-smith commented 2 years ago

The units for tol should be the same as those for the mapping points (so mm). I'm not familiar with the filter set during a case (I'm a software developer and should not be poking catheters around inside someone's heart!), but as far as I'm aware Carto will indeed export all points and they will need to be filtered afterwards. But perhaps @drsewilliams know more

p-j-smith commented 2 years ago

This was fixed by #71