Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat][METEOR-1128] TDCT Odemis Wrapper #2999

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

patrickcleeve2
Copy link
Contributor

@patrickcleeve2 patrickcleeve2 commented Jan 22, 2025

Implementation of the 3DCT wrapper to allow running multi-point correlation from odemis. Includes a parser to read correlated position from file, and z-targeting utility for multi-channel images.

3DCT package now only has two dependencies for the core workflow (excluding user interface and image readers), which are already included in odemis (numpy, scipy). Packaging will be done later. Source Repository

Subtasks:

Specifications:

@patrickcleeve2 patrickcleeve2 force-pushed the meteor-960-tdct-wrapper branch from 9e78512 to f55b809 Compare February 10, 2025 09:47
@patrickcleeve2 patrickcleeve2 changed the title [METEOR-960] TDCT Odemis Wrapper [feat][METEOR-1128] TDCT Odemis Wrapper Feb 11, 2025
@patrickcleeve2 patrickcleeve2 marked this pull request as ready for review February 11, 2025 05:40
Copy link
Member

@pieleric pieleric left a comment

Choose a reason for hiding this comment

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

The main thing missing here is the unit test code. Please add a couple of unit test, to show at least how the main functions are to be called. You can just hard-code some number for input, and have some basic expectation on the output.

Copy link
Member

@pieleric pieleric left a comment

Choose a reason for hiding this comment

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

Looks good. Just one very minor comment.

# get the point of interest coordinate (in microscope coordinates, in metres)
poi_coord = correlation_results["output"]["poi"][0]["px_um"]
poi_coord = (poi_coord[0] * 1e-6, poi_coord[1] * 1e-6)
return poi_coord
Copy link
Contributor

@K4rishma K4rishma Feb 17, 2025

Choose a reason for hiding this comment

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

It is confusing that some coordinates are saved in pixels and some in m, while all of them are called as coords? I am not sure why poi_coord is in m and not in pixels

Copy link
Contributor Author

@patrickcleeve2 patrickcleeve2 Feb 18, 2025

Choose a reason for hiding this comment

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

this is the final output for the milling patterns, which have coordinates in metres. They are all coordinates, not sure if you have a better name?

Copy link
Contributor

@K4rishma K4rishma Feb 19, 2025

Choose a reason for hiding this comment

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

Maybe if most of the coordinates are in pixels, by default the coords can represent pixels and for m it can be represented by pos , while the function name can explicitly tell i.e. in meters ? For e.g. get_poi_pos() or get_poi_coords_in_meters().

With that I would rename the function description and definitions to make the difference clear.

:param das: the data arrays (CTZYX, ZYX, or YX), all arrays must have the same shape
:param x: the x-coordinate
:param y: the y-coordinate
:param z: the z-coordinate (initial guess)
Copy link
Contributor

@tmoerkerken tmoerkerken Feb 17, 2025

Choose a reason for hiding this comment

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

So this argument is only present in case of failure, in which case it will be returned without manipulation. To me it makes more sense to not make it an arg/return but just throw the error (or return None, since no optimal z was found) and handle the failure case outside of this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand your point but disagree, almost always the handling will be to use the initial value. If it becomes an issue it can be changed later

@patrickcleeve2 patrickcleeve2 requested review from K4rishma, pieleric and tmoerkerken and removed request for pieleric February 18, 2025 04:01
@patrickcleeve2 patrickcleeve2 force-pushed the meteor-960-tdct-wrapper branch from 70d5cbe to 6f18d8d Compare February 18, 2025 04:02
@K4rishma
Copy link
Contributor

Just a quick question, how would the refractive index correction be handled? I am not sure if I have seen that code.

@patrickcleeve2
Copy link
Contributor Author

patrickcleeve2 commented Feb 19, 2025

Just a quick question, how would the refractive index correction be handled? I am not sure if I have seen that code.

That isn't implemented yet, it will come a bit later on

@pieleric pieleric merged commit 0be7c4f into delmic:master Feb 20, 2025
6 checks passed
@patrickcleeve2 patrickcleeve2 deleted the meteor-960-tdct-wrapper branch February 28, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants