Skip to content

Specific Blur for Multiple Images #769

Closed
@rousseau

Description

Is there an existing issue for this?

  • I have searched the existing issues

Problem summary

I try to apply different blur kernels to several images. It appears that only one image is blurred.

Code for reproduction

import torch
import torchio as tio

torch.manual_seed(0)

subject = tio.datasets.Pediatric(years=(4.5, 8.5))
subject.plot()

b1 = tio.Blur(std=(0.001,0.001,5), include='t1')
b2 = tio.Blur(std=(0.001,5,0.001), include='t2')
b3 = tio.Blur(std=(5,0.001,0.001), include='pd')

transform = tio.Compose([b1,b2,b3])
transformed = transform(subject)
transformed.plot()

Actual outcome

Only the pd image is blurred (by the 3 blur kernels).

Error messages

No response

Expected outcome

Each image is expected to be blurred by one specific kernel.

System info

Platform:   Linux-5.11.0-41-generic-x86_64-with-glibc2.17
TorchIO:    0.18.61
PyTorch:    1.10.0+cu102
SimpleITK:  2.1.1 (ITK 5.2)
NumPy:      1.20.3
Python:     3.8.12 (default, Oct 12 2021, 13:49:34) 
[GCC 7.5.0]

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions