nsmela / brachify

test app for a brachy applicator builder
GNU General Public License v3.0
0 stars 0 forks source link

Unit testing #34

Closed nsmela closed 11 months ago

nsmela commented 12 months ago

https://www.youtube.com/watch?v=EqJWhlC1H6k https://www.youtube.com/watch?v=ibVSPVz2LAA

nsmela commented 12 months ago

@michaelwkudla Could we repurpose your old code to produce json files to tell us what we should be seeing when we import the test dcm files?

so in each test dicom folder, we also have a json with the following info:

That way, we can run unit tests on each function to see if the output is accurate

michaelwkudla commented 11 months ago

We could. I think I can just do a code review with you for this section though.

If we set up a time early next week, I think we can knock it out pretty quickly. We can take a look at my other code as well if there's any questions.

Code doesn't do the rotation translation based on exactly the same parameters, but it's fairly transferable. Some of the stuff could definitely be used as test data for the things you mentioned, but some of it would require a little bit of tweaking.

Let's start with a code review and then if we need to build a test set we can do that.

MK

On Fri, Oct 20, 2023, 8:55 p.m. NathanSmela @.***> wrote:

@michaelwkudla https://github.com/michaelwkudla Could we repurpose your old code to produce json files to tell us what we should be seeing when we import the test dcm files?

so in each test dicom folder, we also have a json with the following info:

  • needle ROIs
  • raw needle points
  • rotated needle points
  • translated needle points
  • cylinder's ROI
  • cylinder's contours
  • cylinder tip
  • cylinder base
  • cylinder vector
  • tandem position
  • tandem rotation

That way, we can run unit tests on each function to see if the output is accurate

— Reply to this email directly, view it on GitHub https://github.com/nsmela/BrachyApp-PyQt5/issues/34#issuecomment-1773646677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEPREX7RMIQ5ZKGI4QQXIDYANBU3AVCNFSM6AAAAAA6CVFIP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTGY2DMNRXG4 . You are receiving this because you were mentioned.Message ID: @.***>

nsmela commented 11 months ago

Sure. I could also alter the DicomData class in this project to have a toJson and fromJson method. That should make this whole process easier

nsmela commented 11 months ago

Initial setup for unit testing completed