-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# run-table-exam-practice-tool | ||
跑台考試的練習程式 | ||
|
||
**修改自 https://gist.github.com/nakagami/3764702** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"title": "寄生蟲期中跑台", | ||
"ans": { | ||
"1": "D01 10x Ascaris lumbricoides的三片口唇", | ||
"2": "D02 10x Ascaris lumbricoides的2根spicules", | ||
"3": "D2-1 10x Ascaris lumbricoides larva(中間八字型)", | ||
"4": "D03 40x Strongyloides stercoralis F-form larva", | ||
"5": "D04 40x Ancylostoma duodenale F-form larva", | ||
"6": "D05 40x Necator americanus F-form larva", | ||
"7": "D06 10x Eggs of Trichostrongylus orientalis", | ||
"8": "D07 40x Eggs of Capillaria hepatica", | ||
"9": "D08 40x Eggs of Capillaria phillippinensis", | ||
"10": "D09 10x Anisakis larva", | ||
"11": "D10 10x Anisakis larva(white stomach)", | ||
"12": "D11 12x Anisakis larva(mucron,尖尖透明物)", | ||
"13": "D12 10x Anisakis larva in intestine(Y字型腸道)", | ||
"14": "D12-1 10x Trichinella spiralis larva(中間偏左一團)", | ||
"15": "D13 10x Angiostrongylus cantonensis 3rd larva(尾端突然變尖,左上)", | ||
"16": "D15 4x Taenia saginata adult worm(scolex,4 suckers)", | ||
"17": "D16 10x Taenia saginata asiatica gravid segment(一邊有16~21的子宮分支)", | ||
"18": "D16-1 10x Taenia saginata gravid segment(一邊有15~30的子宮分支)", | ||
"19": "D17 10x Hymenolepis nana adult worm(scolex,一排鉤)", | ||
"20": "D18 10x Cysticercoid of Hymenolepis diminuta(一個scolex)", | ||
"21": "D19 4x Dipylidium caninum mature segment(兩邊生殖開口[兩朵花])", | ||
"22": "D19 D20 10x Dipylidium caninum(左邊gravid segment 右邊mature segment)", | ||
"23": "D21 10x Cross section of hyatid cyst(Echinococcus granulosus", | ||
"24": "D24 Cross section of alveolar hyatid cyst(Echinococcus muktilocularis)", | ||
"25": "D22 4x Diphyllobothrium latum adult worm(scolex,背面有溝)", | ||
"26": "D23 10x Diphyllobothrium latum mature segment(uterus飽滿)", | ||
"27": "1 10x Ascaris lumbricoides fertilized egg(短橢圓,外層有卵殼,中左)", | ||
"28": "2 10x Ascaris lumbricoides unfertilized egg(長橢圓,卵殼薄)", | ||
"29": "3 4x Ascaris lumbricoides cross section(male,實心testis 空心ejaculatory duct)", | ||
"30": "3 4x Ascaris Lumbricoides cross section(female,空心[大]uterus 實心ovary)", | ||
"31": "4 10x Larvae of Toxocara canis in mice brain(中左S型)", | ||
"32": "5 10x Eggs of Trichuris trichiura(上下有透明卵塞)", | ||
"33": "6 40x Cross section of Strongyloides stercoralis in intsetine(伸出類似手指的突起)", | ||
"34": "7 10x Eggs of Enterobius vermicularis(2層卵殼[沒染上黃褐色],一邊平一邊凸)", | ||
"35": "8 40x Enterobius vermicularis adult worm(頭部有透明cervical alae,圓圓一顆為食道球)", | ||
"36": " 10x Cross section of Enterobius vermicularis in appenditis", | ||
"37": "10 10x Eggs of hookworm(正中,有一層卵殼[不明顯,沒染上膽汁],卵細胞與卵殼二邊等距離)", | ||
"38": "11 10x Buccal capsule of Ancylostoma braziliense adult worm(2 pairs teeth,中左)", | ||
"39": "12 10x Bursa of Ancylostoma duodenale male(13根肋線,二根交配刺[右下較細的二根])", | ||
"40": "14 10x Eggs of Toxocara species embryonated egg(黑黑者為一團蜷曲幼蟲,有橫紋)", | ||
"41": "15 40x Trichella spiralis cyst form in pig's muscle(直接壓片,可以看到一團一團)", | ||
"42": "16 43x Eggs of Capillaria hepatica(兩個卵塞) *同D07", | ||
"43": "17 10x Cross section of Angistrongylus cantonensis in mice brain 4or5th larva", | ||
"44": "18 40x Cross section of Angistrongylus cantonenesis in rats lung", | ||
"45": "3 40x Eggs of Diphylloborhrium latum(圓鈍,白白一圈纖毛,左上有卵蓋)", | ||
"46": "24 10x Diphyllobothrium mansoni mature segment(咖啡色者為uterus)", | ||
"47": "25 40x Eggs of Taenia specises(放射狀胚膜)", | ||
"48": "26 4x Taenia solium cysticercus cellulosae(中右深紅色者為頭部)", | ||
"49": "27 10x Cross section of Cysticercus cellulosae in infected pork", | ||
"50": "28 40x Taenia solium scolex(兩排溝,有rosrellum,4 suckers)", | ||
"51": "29 40x Eggs of Hymenolepis diminuta", | ||
"52": "30 40x Eggs of Hymenolepis nana(前後有凸起,像雞蛋型.卵殼[薄]-胚膜-hook[由外至內])", | ||
"53": "31 10x Hymenolepis diminuta scolex(像蒼蠅,有rostllum沒hook,兩邊是suckers)", | ||
"54": "31 4x Hymenolepis diminuta mature segment(3testes)", | ||
"55": "31 4x Hymenolepis diminuta gravid segment(充滿uterus)", | ||
"56": "32 10x Dipylidium caninum scolex(rostellum特別突起,有3-7排hooks,4-suckers)", | ||
"57": "33 4x Echinococcus granulosus whole worm(segnent特別大者)", | ||
"58": "34 10x hymatid sand(中間有黑黑一條hook)", | ||
"59": "19 40x Microfilaria of Brugia malayi(尾部的核一前一後,右邊,有鞘)", | ||
"60": "20 10x Cross section Onchocerca volvulus(成對uterus,最上方者最典型[下方有一小洞])", | ||
"61": "21 40x Microfilaria of Loa loa(尾部有細胞核延伸,左邊,頭[右]鈍,尾[左]尖)", | ||
"62": "22 40x Microfilaria of Dirofilaria immitis(蟲體沒有sheath包覆)", | ||
"63": "成熟節片是正方形,受孕節片是長方形", | ||
"64": "Taenia saginata gravid segment", | ||
"65": "Diphyllobothrium latum mature segment", | ||
"66": "Trichuris trichura", | ||
"67": "Necator americans", | ||
"68": "Angistrongylus cantonensis" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pillow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# -*- coding: UTF-8 -*- | ||
############################################################################## | ||
# Copyright (c) 2012 Hajime Nakagami<[email protected]> | ||
# All rights reserved. | ||
# Licensed under the New BSD License | ||
# (http://www.freebsd.org/copyright/freebsd-license.html) | ||
# | ||
# A image viewer. Require Pillow ( https://pypi.python.org/pypi/Pillow/ ). | ||
############################################################################## | ||
import PIL.Image | ||
|
||
try: | ||
from Tkinter import * | ||
import tkFileDialog as filedialog | ||
except ImportError: | ||
from tkinter import * | ||
from tkinter import filedialog | ||
import PIL.ImageTk | ||
from PIL import Image | ||
import random, logging, json | ||
|
||
|
||
class Viewer(Frame): | ||
def LoadAnsConfig(self): | ||
configName = "config.json" | ||
|
||
self.fp = open(configName,"r",encoding="utf-8") | ||
jsondata = self.fp.read() | ||
ansdict = json.loads(jsondata) | ||
self.fp.close() | ||
return ansdict | ||
|
||
def chg_image(self): | ||
|
||
if self.im.mode == "1": # bitmap image | ||
self.img = PIL.ImageTk.BitmapImage(self.im, foreground="white") | ||
else: # photo image | ||
scale_w = 475 | ||
scale_h = 363 | ||
#self.im = self.im.resize((scale_h, scale_w), Image.ANTIALIAS) | ||
self.img = PIL.ImageTk.PhotoImage(self.im) | ||
self.la.config(image=self.img, bg="#000000", | ||
width=self.img.width(), height=self.img.height()) | ||
|
||
def open(self): | ||
#filename = filedialog.askopenfilename() | ||
self.fileNo = random.randint(1, self.total) | ||
filename = r"media/image" + str(self.fileNo) + "_c.jpg" | ||
if 1 != "": | ||
self.im = PIL.Image.open(filename) | ||
self.chg_image() | ||
self.num_page_ans.set("****") | ||
self.num_page_tv.set("Slide: " + str(self.fileNo)) | ||
|
||
def showAns(self): | ||
self.num_page_ans.set(self.ansdict["ans"][str(self.fileNo)]) | ||
|
||
def __init__(self, master=None): | ||
self.ansdict = self.LoadAnsConfig() | ||
|
||
Frame.__init__(self, master) | ||
self.master.title(self.ansdict["title"]) | ||
|
||
self.num_page = 0 | ||
self.num_page_tv = StringVar() | ||
self.num_page_ans = StringVar() | ||
self.total = len(self.ansdict["ans"]) | ||
|
||
fram = Frame(self) | ||
Button(fram, text="Next slide", command=self.open).pack(side=LEFT) | ||
Label(fram, textvariable=self.num_page_tv).pack(side=LEFT) | ||
Button(fram, text="Show answer", command=self.showAns).pack(side=LEFT) | ||
Label(fram, textvariable=self.num_page_ans).pack(side=LEFT) | ||
fram.pack(side=TOP, fill=BOTH) | ||
|
||
self.la = Label(self) | ||
self.la.pack() | ||
|
||
self.pack() | ||
#載入第一張照片 | ||
self.open() | ||
|
||
|
||
if __name__ == "__main__": | ||
app = Viewer() | ||
app.mainloop() |