Skip to content

TypeError: 'module' object is not callable #53

Open
@gj21kr

Description

@gj21kr

Hello,

I tried to use edt after installation using pip (pip install edt).
However, with the code below, I got a error message like this :
TypeError: 'module' object is not callable

`

gt = sitk.ReadImage(gt_file)
spacing_raw = gt.GetSpacing()
spacing = [spacing_raw[2], spacing_raw[1],spacing_raw[0]]
gt_array = np.asarray(sitk.GetArrayFromImage(gt)>0).astype(np.uint8)

dt = edt.edt(gt_array, anisotropy=spacing)

dt = sitk.GetImageFromArray(dt)
dt.SetSpacing(gt.GetSpacing())
dt.SetOrigin(gt.GetOrigin())
dt.SetDirection(gt.GetDirection())
sitk.WriteImage(dt, os.path.join(save_folder, 'EDT.nii.gz'))`

How can I use the package?

Best,
Jung-Eun

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions