コード例 #1
0
ファイル: lenstest.py プロジェクト: Sotatek-TuyenLuu/MITK_src
    liverMean = np.mean(liver[np.nonzero(testsegmentation)[0], :], axis=0)
    noobjMean = np.mean(noobj[np.nonzero(testsegmentation)[0], :], axis=0)
    flatfMean = np.mean(flatf[np.nonzero(testsegmentation)[0], :], axis=0)

    plt.figure()
    plt.plot(simulation.wavelengths[si], liverMean[si], 'r-o')
    plt.plot(simulation.wavelengths[si], noobjMean[si], 'g-o')
    plt.plot(simulation.wavelengths[si], flatfMean[si], 'b-o')

    plt.title(title)
    plt.legend(["liver", "no object", "flatfield"])
    plt.xlabel('wavelength')
    plt.ylabel('reflectance')


shape, testsegmentation = csvImageReader(
    "data/output/liver_28_testsegmentation")

#%%
shape, liver28 = csvImageReader("data/output/liver_28")
shape, noobj28 = csvImageReader("data/output/NoObject_28")
shape, flatf28 = csvImageReader("data/output/flatfield_28")

plotOne(liver28, noobj28, flatf28, testsegmentation, "f2.8")

#%%
shape, liver22 = csvImageReader("data/output/liver_22")
shape, noobj22 = csvImageReader("data/output/NoObject_22")
shape, flatf22 = csvImageReader("data/output/flatfield_22")

plotOne(liver22, noobj22, flatf22, testsegmentation, "f22")
コード例 #2
0
ファイル: lenstest.py プロジェクト: 0r/MITK
    noobjMean = np.mean(noobj[np.nonzero(testsegmentation)[0], :], axis = 0)
    flatfMean = np.mean(flatf[np.nonzero(testsegmentation)[0], :], axis = 0)

    plt.figure()
    plt.plot(simulation.wavelengths[si], liverMean[si], 'r-o')
    plt.plot(simulation.wavelengths[si], noobjMean[si], 'g-o')
    plt.plot(simulation.wavelengths[si], flatfMean[si], 'b-o')

    plt.title(title)
    plt.legend(["liver", "no object", "flatfield"])
    plt.xlabel('wavelength')
    plt.ylabel('reflectance')



shape, testsegmentation = csvImageReader("data/output/liver_28_testsegmentation")


#%%
shape, liver28 = csvImageReader("data/output/liver_28")
shape, noobj28 = csvImageReader("data/output/NoObject_28")
shape, flatf28 = csvImageReader("data/output/flatfield_28")


plotOne(liver28, noobj28, flatf28, testsegmentation, "f2.8")


#%%
shape, liver22 = csvImageReader("data/output/liver_22")
shape, noobj22 = csvImageReader("data/output/NoObject_22")
shape, flatf22 = csvImageReader("data/output/flatfield_22")
コード例 #3
0
ファイル: lighttest.py プロジェクト: 0r/MITK
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 15:44:11 2015

@author: wirkert
"""

from csvImageReader import csvImageReader
import numpy as np
import matplotlib.pyplot as plt
from   setup import simulation

#%% load

shape, links = csvImageReader("data/output/CC2_links")
shape, flatfseglinks = csvImageReader("data/output/CC2_links_flatfieldsegmentation")

shape, rechts= csvImageReader("data/output/CC2_rechts")
shape, flatfsegrechts = csvImageReader("data/output/CC2_rechts_flatfieldsegmentation")

#%% process

wav = simulation.wavelengths
si = sorted(range(len(simulation.wavelengths)), key=lambda k: simulation.wavelengths[k])



linksMean = np.mean(links[np.nonzero(flatfseglinks)[0], :], axis = 0)
rechtsMean = np.mean(rechts[np.nonzero(flatfsegrechts)[0], :], axis = 0)