예제 #1
0
def test_recon():
    from imars3d.recon.mpi import recon
    recon_template = os.path.join(outdir, "test_recon", "recon_%05i.tiff")
    recon_series = imars3d.io.ImageFileSeries(
        recon_template,
        mode = 'w', name = "Reconstructed", identifiers=layers,
        )
    recon(sinograms, theta, recon_series, nodes=5)
    return
예제 #2
0
def test_recon():
    from imars3d.recon.mpi import recon
    recon_template = os.path.join(outdir, "test_recon", "recon_%05i.tiff")
    recon_series = imars3d.io.ImageFileSeries(
        recon_template,
        mode='w',
        name="Reconstructed",
        identifiers=layers,
    )
    recon(sinograms, theta, recon_series, nodes=5)
    return
예제 #3
0
def reconstruct(angles, sinograms, workdir="work", **kwds):
    """reconstruct

 * angles: ct scan angles in degrees
    """
    recon_series = io.ImageFileSeries(
        os.path.join(workdir, "recon_%i.tiff"), identifiers=sinograms.identifiers, name="Reconstructed", mode="w"
    )
    import numpy as np

    theta = angles * np.pi / 180.0
    from imars3d.recon.mpi import recon

    recon(sinograms, theta, recon_series, **kwds)
    return recon_series
예제 #4
0
def reconstruct(angles, sinograms, workdir="work", filename_template = None, **kwds):
    """reconstruct

 * angles: ct scan angles in degrees
    """
    filename_template = filename_template or  "reconstructed_%i.tiff"
    recon_series = io.ImageFileSeries(
        os.path.join(workdir, filename_template),
        identifiers = sinograms.identifiers,
        name = "Reconstructed", mode = 'w',
    )
    import numpy as np
    theta = angles * np.pi / 180.
    from imars3d.recon.mpi import recon
    recon(sinograms, theta, recon_series, **kwds)
    return recon_series
예제 #5
0
def test_recon():
    from imars3d.recon.mpi import recon
    recon_template = os.path.join(outdir, "test_recon", "recon_%05i.tiff")
    recon_series = imars3d.io.ImageFileSeries(
        recon_template,
        mode='w',
        name="Reconstructed",
        identifiers=layers,
    )
    nodes = 5
    print('[DEBUG] {} nodes'.format(nodes))
    cmd = recon(sinograms, theta, recon_series, nodes=nodes)
    print('[DEBUG] MPI command = {}'.format(cmd))
예제 #6
0
def test_recon():
    from imars3d.recon.mpi import recon
    recon_series.identifiers = sinograms.identifiers
    recon(sinograms, theta, recon_series, nodes=20)
    return
예제 #7
0
def test_recon():
    from imars3d.recon.mpi import recon
    recon_series.identifiers = sinograms.identifiers
    recon(sinograms, theta, recon_series, nodes=20)
    return