Skip to content

Commit

Permalink
test: updated test for radiomicFeatureExtraction to use default pyrad…
Browse files Browse the repository at this point in the history
…iomics parameter file
  • Loading branch information
strixy16 committed Dec 19, 2023
1 parent 84f16db commit 617abbc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test_feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ def test_singleRadiomicFeatureExtraction_RTSTRUCT(lung4DCTImage, lung4DRTSTRUCTI
"Volume feature is incorrect"


def test_radiomicFeatureExtraction(nsclcMetadataPath, pyradiomicsParamFilePath):
def test_radiomicFeatureExtraction(nsclcMetadataPath):
"""Test full radiomicFeatureExtraction function with CT and SEG and default PyRadiomics
parameter file and no output"""

actual = radiomicFeatureExtraction(nsclcMetadataPath,
imageDirPath="tests/",
roiNames = None,
pyradiomicsParamFilePath=pyradiomicsParamFilePath)
roiNames = None)
assert type(actual) == pd.core.frame.DataFrame, \
"Wrong return type, expect a pandas DataFrame"
assert actual.shape[1] == 1365, \
Expand All @@ -93,4 +95,6 @@ def test_radiomicFeatureExtraction(nsclcMetadataPath, pyradiomicsParamFilePath):
assert actual['diagnostics_Mask-original_Size'][0] == (26, 21, 20), \
"Cropped segmentation mask is incorrect size"
assert actual['original_shape_MeshVolume'][0].tolist()== pytest.approx(1273.7916666666667), \
"Volume feature is incorrect"
"Volume feature is incorrect"


0 comments on commit 617abbc

Please sign in to comment.