KitwareMedical / ITKUltrasound

ITK module with classes particularly useful for ultrasound.
http://www.insight-journal.org/browse/publication/722
Apache License 2.0
52 stars 22 forks source link

Improve test coverage with practical data sets #188

Open tbirdso opened 2 years ago

tbirdso commented 2 years ago

Several ultrasound image filters rely on contrived data for CTest coverage. For example, Spectra1DAveragingImageFilter tests currently average over multiple copies of a single image, spectra_pixel_image.mha, which depicts a 3D image with a single 31-channel pixel. In this case limited test data failed to cover an issue with stepping over lines, leading to the patch in #187.

It would be useful to revisit our testing and potentially duplicate some image filter tests with a small variety of input data samples representing real-world cases.

thewtex commented 2 years ago

@dzenanz has some test data for spectral data.

tbirdso commented 2 years ago

To that point, we already host/include liver spectra samples for attenuation testing (see data.kitware.com). @dzenanz should I amend this issue to reflect adding Spectra1DAveragingImageFilter and Spectra1DNormalizeImageFilter tests on sample data? Are there any other tests you are aware of that should be expanded?

dzenanz commented 2 years ago

Yes, testing on that sample data would be good. Those two filters were recently added, I doubt more filters need extra testing.

But Phantom RF data could be used as start of chain of filters: Spectra1DSupportWindowImageFilter+Spectra1DImageFilter -> Spectra1DAveragingImageFilter. Then apply Spectra1DNormalizeImageFilter to liver data using output of Spectra1DAveragingImageFilter as reference for normalization.

tbirdso commented 2 years ago

@dzenanz I've added #189 as a sanity check applying averaging and normalization separately to practical data. I agree that the workflow you've suggested here would make a good integration test, especially in light of recent discussion around spectra image issues.