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

Add documentation #21

Open
jakubMitura14 opened this issue May 25, 2024 · 3 comments
Open

Add documentation #21

jakubMitura14 opened this issue May 25, 2024 · 3 comments

Comments

@jakubMitura14
Copy link
Collaborator

jakubMitura14 commented May 25, 2024

Add documentation to

MedImage_data_struct.jl file

  1. @divital-coder Describe shortly first enums what they mean; secondly the MedImage struct together with information that it is immutable
  2. @divital-coder show how to change fields using accessors.jl on the basis of the function "update_voxel_and_spatial_data" from Utils.jl

Utils.jl file

  1. @JanZubik describe get_base_indicies_arr as function for convienient cartesian indicies extraction ; give examples of execution and show shapes of the resulting array

  2. @JanZubik cast_to_array_b_type give example that we will change the array of one type to the array of other also example when array a is float and array b is int and describe that the function prevent from getting inexact error message when casting float to Int

  3. @JanZubik interpolate_point - explain convention @JanZubik that all negative indiciec will be casted to extrapolated value and the we are interpolating points here - show examples to get values from negative indicies, indicies in range of the image and indicies way futher than image physical space (which will be extrapolated)

  4. @JanZubik interpolate_my explain the function particularly stressing what happens at extrapolation, negative indicies, that we deal with non isovolumetric voxels and what are the diffrences between diffrent interpolators - mainly that nearest neighbour is usefull for discrete lebels; linear is fast, b spline give good resolution

  5. @divital-coder TransformIndexToPhysicalPoint_julia show examples how we can get a point in physical space from indexes and how it will change for images with diffrent spatial metaata values - move origin show how it will affect, change spacin show how it affect, change direction ...

  6. @divital-coder ensure_tuple - just utility function needed becouse we expect in medimage struct tuples not lists show example of usage with list and with tuple

##Spatial_metadata_change.jl
9) @divital-coder change_orientation function - explain what is orientation show how to get orientation code (using string_to_orientation_enum from orientation_dicts.jl and vice versa using orientation_enum_to_string ), show example that will make it possible to see that changing direction can change order of spacing can change origin and show that it flips image and permute axis

  1. @JanZubik explain resample_to_spacing - show examples how the resolution of the image changes with diffrent spacing (for example using printscreens from slicer) explain what is the goal and copy here also what interpolators to use in what cases

Resample_to_target.jl

  1. @JanZubik resample_to_image explain what is the goal of the function give some example how it will look like and how changing spatial metadata like changing origin or spacing ... will affect change in the resulting image; consider adding simple schematic you used to understand the concept

##Load_and_save
12) @divital-coder you know all about topic make descriptions of the functions explain that both dicom and nifti will load into the same format; explain arguments and why setting all files orientation to rAS at the begining may be good idea (standarization)

HDF5_manag.jl

  1. @divital-coder simple save and load of the MedImage struct describe functions tell why hdf5 format is good (it is explained for example in julia con when hdf5.jl had their talk - it is fast, convinient for multidimensional arrays handling , can load in parts ... )

##Basic_transformations
14) @JanZubik Jan Zubik you know the issue from bottom up; so just describe all functions and make tests work

tests

  1. @JanZubik resample_to_image, change_orientation and resample_to_spacing has their tests ready but they need to be integrated together with other tests from test_spatial_metadata_change.jl into single test set, look into docs of tests in order to make it work https://docs.julialang.org/en/v1/stdlib/Test/ ; the test set combining all of the tests should be in a separate file, also the path to the test file should be relative - hence automatic testing in future could be run.
  2. @divital-coder if possible change simple itk function invocation from tests into wrapped C++ lib version and get rid of all Pycall conda etc from the package :)
@divital-coder
Copy link
Contributor

A separate Readme for each of the documented jl files?

@jakubMitura14
Copy link
Collaborator Author

basically all medimage docs should be organised using DocumenterVitepress.jl look here https://github.com/orgs/JuliaHealth/projects/3/views/2?pane=issue&itemId=62645761

@divital-coder
Copy link
Contributor

Yes, I was originally going to ask if I should setup documenter vitepress for medimage.
Sounds good.

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

No branches or pull requests

2 participants