summaryrefslogtreecommitdiffstats
path: root/src/processors/FBP.py
blob: c48c59063cb4aef015242262f1f24022c9f3d6b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from cil.framework import DataProcessor
from cil.framework import DataOrder
from src.processors.FBP_Standard import FBP_Standard
from src.processors.FBP_Stacked import FBP_Stacked

class FBP(DataProcessor):
    def __init__(self, volume_geometry, sinogram_geometry, stacked=False, precision_mode='single', stack_num=2):
        if stacked==True:
            processor = FBP_Stacked(volume_geometry, sinogram_geometry, precision_mode, stack_num)
        else:
            processor = FBP_Standard(volume_geometry, sinogram_geometry)

        super(FBP, self).__init__(volume_geometry=volume_geometry, sinogram_geometry=sinogram_geometry,
                                  stacked=stacked,
                                  precision_mode=precision_mode, stack_num=stack_num, processor=processor)

        self.processor = processor

    def set_input(self, dataset):
        return self.processor.set_input(dataset)

    def get_input(self):
        return self.processor.get_input()

    def get_output(self, out=None):
        return self.processor.get_output(out=None)

    def check_input(self, dataset):
        return self.processor.check_input(dataset)

    def process(self, out=None):
        return self.processor.process(out=None)