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

Expose markups JSON reader/writer #6756

Merged
merged 4 commits into from Jan 2, 2023
Merged

Conversation

lassoan
Copy link
Contributor

@lassoan lassoan commented Dec 29, 2022

Allows custom markup classes (implemented outside Slicer core) to store additional properties in the markups file in JSON.
vtkMRMLMarkupsJsonElement, vtkMRMLMarkupsJsonReader, and vtkMRMLMarkupsJsonWriter provide a simple JSON reading/writing interface without exposing the internal RapidJSON implementation.

This is required for example for this extension to build on Windows and macOS: https://github.com/chir-set/SlicerExtraMarkups

@lassoan lassoan added this to the Slicer 5.3 milestone Dec 29, 2022
@lassoan lassoan self-assigned this Dec 29, 2022
@lassoan lassoan changed the title ENH: Expose markups JSON reader/writer Allows custom markup classes (implemented outside Slicer core) to store additional properties in the markups file in JSON. vtkMRMLMarkupsJsonElement, vtkMRMLMarkupsJsonReader, and vtkMRMLMarkupsJsonWriter provide a simple JSON reading/writing interface without exposing the internal RapidJSON implementation Expose markups JSON reader/writer Dec 29, 2022
@lassoan lassoan force-pushed the markups-json branch 3 times, most recently from a4c15dd to 4ed048c Compare December 30, 2022 01:05
When markup files were saved using the "Export to file..." feature then display properties were not included in the file.
Some curve features were only available for the curve in world coordinate system.
This is generally good, because developers should be encouraged to perform computations in the world coordinate system (take into account parent transforms).
However, in some cases it can be useful to perform computations in the curve's local coordinate system.

To allow performing computations on curve points in the local coordinate system if needed (but not making it as convenient as computations in the world coordinate system),
static methods are added, which can be used with points in any coordinate system.
THe method returns the ROI bounds in the Object coordinate system.
Allows custom markup classes (implemented outside Slicer core) to store additional properties in the markups file in JSON.
vtkMRMLMarkupsJsonElement, vtkMRMLMarkupsJsonReader, and vtkMRMLMarkupsJsonWriter provide a simple JSON reading/writing interface
without exposing the internal RapidJSON implementation.

Fixed saving of coded entries (such as units, quantityCode, derivationCode) in markup json files.
@lassoan
Copy link
Contributor Author

lassoan commented Jan 2, 2023

I'll merge this now. @Sunderlandkyl when you have time please have a look and if you have comments I'll fix them in a separate commit.

@lassoan lassoan merged commit af7c986 into Slicer:main Jan 2, 2023
@lassoan lassoan deleted the markups-json branch January 2, 2023 22:51
@Sunderlandkyl
Copy link
Member

Thanks @lassoan, it looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants