Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

FBP reconstruction 4D multichannel data #91

Open
epapoutsellis opened this issue May 5, 2021 · 4 comments
Open

FBP reconstruction 4D multichannel data #91

epapoutsellis opened this issue May 5, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@epapoutsellis
Copy link
Contributor

I am trying to do FBP for 3D+channel data and get this error

     70         if sinogram_geometry.channels > 1:
---> 71             raise NotImplementedError("Cannot process multi-channel data")
     72             #processor_full = ChannelwiseProcessor(processor, self.sinogram_geometry.channels, dimension='prepend')
     73             #self.processor = operator_full

NotImplementedError: Cannot process multi-channel data

See here.

@epapoutsellis epapoutsellis added the bug Something isn't working label May 5, 2021
@epapoutsellis epapoutsellis changed the title FBP reconstruction multichannel data FBP reconstruction 4D multichannel data May 5, 2021
@gfardell gfardell added enhancement New feature or request and removed bug Something isn't working labels May 6, 2021
@gfardell
Copy link
Member

gfardell commented May 6, 2021

I think we need a multichannel processor rather than implementing these versions by hand.

@gfardell gfardell closed this as completed May 7, 2021
@gfardell gfardell reopened this May 7, 2021
@paskino
Copy link
Contributor

paskino commented May 7, 2021

Currently this is not implemented as it may not be clear what it is expected to be done on the multichannel dataset. If channel wise repetition is what is required, we can have 2 options:

  1. create a ChannelwiseProcessor similarly to the ChannelwiseOperator to operate on the single channels in the data and return a multichannel dataset
  2. write your own for loop on the channels as option 2 below
ig3d = ig4d.get_slice(channel=1)
ag3d = ag4d.get_slice(channel=1)

fbp = FBP(ig3d, ag3d)
fbp.set_input(data)
recon3d = fbp.get_output()

# this fails
# fbp4d = FBP(ig4d, ag4d) 

### Option 1
ig3d = ig4d.get_slice(channel=1)
ag3d = ag4d.get_slice(channel=1)
fbp = FBP(ig3d, ag3d)

fbp4d = ChannelwiseProcessor(fbp, num_channels=ag4d.channels)
fbp4d.set_input(data4d)
recon4d = fbp4d.get_output()
# or 
recon4d = ChannelwiseProcessor(fbp, num_channels=ag4d.channels)(data4d)


### Option 2: do nothing
ig3d = ig4d.get_slice(channel=0)
ag3d = ag4d.get_slice(channel=0)
fbp = FBP(ig3d, ag3d)

recon4d = ig4d.allocate(None)
for ch in range(ag4d.channels):
    fbp.set_input(data4d.get_slice(channel=ch))
    recon4d.fill(fbp.get_output(), channel=ch)

### Option 3: not an option
fbp4d = FBP(ig4d, ag4d, isMultichannel=True)
recon4d = fbp4d(data4d)

@jakobsj
Copy link
Contributor

jakobsj commented May 7, 2021 via email

@gfardell
Copy link
Member

gfardell commented May 7, 2021

Yes, but I think RingRemover and Masker already handle 4D data. Centre of rotation is an interesting one, I don't think we can have different geometries in different channels, and it works by updating the geometry rather than changing the data, I'm not sure what we'd want to do here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants