4d9d2a1fc4e0d9289000a235340235802d51a97a,app/grandchallenge/cases/image_builders/dicom.py,,_create_itk_from_dcm,#,262

Before Change


    shape = dcm_array.shape[::-1]
    // Write the numpy array to a file, so there is no need to keep it in memory
    // anymore. Then create a SimpleITK image from it.
    with tempfile.NamedTemporaryFile() as temp:
        temp.seek(0)
        temp.write(dcm_array.tobytes())
        temp.flush()
        temp.seek(0)

        del dcm_array

        img = SimpleITK.Image(shape, sitk_dtype, 1)
        SimpleITK._SimpleITK._SetImageFromArray(temp.read(), img)

    return img


def image_builder_dicom(

After Change


            pixel_array = ds.pixel_array

        if (
            len(pixel_array.shape) == dimensions
            or pixel_array.shape == pixel_dims
        ):
            use_pixel_array = True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: comic/grand-challenge.org
Commit Name: 4d9d2a1fc4e0d9289000a235340235802d51a97a
Time: 2021-02-12
Author: 57257130+MikeOverkamp-diag@users.noreply.github.com
File Name: app/grandchallenge/cases/image_builders/dicom.py
Class Name:
Method Name: _create_itk_from_dcm


Project Name: google/language-resources
Commit Name: a847e176cb012c8d0469693961e4e90c8131136d
Time: 2016-01-07
Author: mjansche@google.com
File Name: xh/evaluate_pronunciation_rules.py
Class Name:
Method Name:


Project Name: pyinstaller/pyinstaller
Commit Name: 5ae5a2d4af15e570a74bc4541ac153ad12cddec5
Time: 2021-01-05
Author: dan@yeaw.me
File Name: PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py
Class Name:
Method Name: