@@ -14,7 +14,7 @@ class Localization: | |||
self.normalized_table = deepcopy(self.table) | |||
self.data = np.load('recorded_data/current_recording.npy') | |||
def localize(self, fv, exclude_frames=True): | |||
def localize(self, fv, exclude_frames=False): | |||
""" Input: - fv [type = numpy array (mb list) [15, 1]]: | |||
A feature vector contains the antenna voltages of one sample in following order: | |||
frame1, frame2, ... frame 8, main1, main2, ... main8 |
@@ -263,9 +263,10 @@ def plot_art_positions(positions, annotate_flag, markersize, annotation_size): | |||
#print("ART: x=", art_info[0, 1], ", y=", art_info[0, 2], ", z=", art_info[0, 3]) | |||
if annotate_flag: | |||
xy_subplot.annotate("P" + str(i+1), (positions[i, 0], positions[i, 1]), color="green", size=annotation_size) | |||
yz_subplot.annotate("P" + str(i+1), (positions[i, 2], positions[i, 1]), color="green", size=annotation_size) | |||
if i == len(positions)-1: | |||
if annotate_flag: | |||
xy_subplot.annotate("P13", (positions[i, 0], positions[i, 1]), color="green", size=annotation_size) | |||
yz_subplot.annotate("P13", (positions[i, 2], positions[i, 1]), color="green", size=annotation_size) | |||
def calc_multiple_positions(data, output_filename, only_fs, sf_list, k_list): | |||
@@ -318,6 +319,7 @@ def plot_multiple_positions(positions_filename, sf_list, k_list, only_label_once | |||
colors = iter(plt.cm.jet(np.linspace(0, 1, len(sf_list)*len(k_list)))) | |||
#markers = iter(['o', '8', 'p', '>', 'd', 'H', 'x','v', '^','*', 'D','s', 'h', '+', '<']) | |||
markers = iter(['x', 'x']) | |||
markers = iter(['.', '.']) | |||
#colors = iter(["blue", "orange", "red"]) | |||
for sf in sf_list: | |||
@@ -429,12 +431,12 @@ def load_entire_ART(recording_names): | |||
# Input here ----------------------------------------------------------------------------------------------------------- | |||
recording_selection = ["horizontal", "diagonal"] | |||
sf_list = np.arange(0.0015, 0.0025, 0.0001) # [0.002] | |||
k_list = [5] | |||
recording_selection = ["z_axis"] | |||
sf_list = [0.0021] # np.arange(0.0015, 0.0025, 0.0001) | |||
k_list = [12] | |||
annotate_points = False | |||
plot_title = "Removing the highest frame receiving coil from localization entire area" | |||
label = "Highest frame removed" | |||
plot_title = "Noise investigation" | |||
label = "IndLoc" | |||
# End of input --------------------------------------------------------------------------------------------------------- | |||
# Make the plot look nice | |||
@@ -442,8 +444,8 @@ plot_surroundings() | |||
# Load data positions | |||
if len(recording_selection) == 1: # if we only have to look at simply load ART and IndLoc | |||
ART_pos = load_entire_ART([recording_selection[0]]) # Load ART positions | |||
IndLoc_data = recording_dict_fs[recording_selection[0]] # Load IndLoc data | |||
ART_pos = load_entire_ART(recording_selection[0]) # Load ART positions | |||
IndLoc_data = recording_dict_fs["z_axis"] # Load IndLoc data | |||
if len(recording_selection) == 2: # if we want to look at multiple recordings its a little more complicated | |||
ART_pos = load_entire_ART([recording_selection[0], recording_selection[1]]) # Load both ART positions | |||
@@ -463,40 +465,44 @@ IndLoc_pos = calc_multiple_positions(data=IndLoc_data, | |||
sf_list=sf_list, | |||
k_list=k_list) | |||
# Find the best localization parameters | |||
best_mean = 10000 | |||
best_std_dev = 10000 | |||
best_both = 10000 | |||
for i in range((len(sf_list)*len(k_list))): | |||
print(i) | |||
distances, curr_mean, curr_std_dev = eval_loc(ART_pos=ART_pos, IndLoc_pos=IndLoc_pos[i]) | |||
#print("- current k_nearest:", sf_list[i], " --> mean=", curr_mean, ", std_dev=",curr_std_dev) | |||
curr_both = curr_mean + curr_std_dev | |||
if curr_both <= best_both: | |||
best_both = curr_both | |||
best_mean = curr_mean | |||
best_std_dev = curr_std_dev | |||
index = i | |||
if len(sf_list) != 1: # it looks like we`re analyzing multiple sf`s | |||
best_k = k_list[0] | |||
best_sf = sf_list[index] | |||
if len(k_list) != 1: | |||
best_sf = sf_list[0] | |||
best_k = k_list[index] | |||
if (len(sf_list) == 1) and (len(k_list) == 1): | |||
best_sf = sf_list[0] | |||
best_k = k_list[0] | |||
print("\n----Best localization parameters were found!-----\n scaling_factor = ", best_sf, "\n mean_error = ", best_mean, | |||
"\n standard_deviation = ", best_std_dev) | |||
# best_mean = 10000 | |||
# best_std_dev = 10000 | |||
# best_both = 10000 | |||
# for i in range((len(sf_list)*len(k_list))): | |||
# print(i) | |||
# distances, curr_mean, curr_std_dev = eval_loc(ART_pos=ART_pos, IndLoc_pos=IndLoc_pos[i]) | |||
# #print("- current k_nearest:", sf_list[i], " --> mean=", curr_mean, ", std_dev=",curr_std_dev) | |||
# curr_both = curr_mean + curr_std_dev | |||
# | |||
# if curr_both <= best_both: | |||
# best_both = curr_both | |||
# best_mean = curr_mean | |||
# best_std_dev = curr_std_dev | |||
# index = i | |||
# | |||
# if len(sf_list) != 1: # it looks like we`re analyzing multiple sf`s | |||
# best_k = k_list[0] | |||
# best_sf = sf_list[index] | |||
# if len(k_list) != 1: | |||
# best_sf = sf_list[0] | |||
# best_k = k_list[index] | |||
# if (len(sf_list) == 1) and (len(k_list) == 1): | |||
# best_sf = sf_list[0] | |||
# best_k = k_list[0] | |||
# | |||
# print("\n----Best localization parameters were found!-----\n scaling_factor = ", best_sf, "\n mean_error = ", best_mean, | |||
# "\n standard_deviation = ", best_std_dev) | |||
# Plot IndLoc pos | |||
plot_multiple_positions(positions_filename=str(recording_selection), | |||
sf_list=[best_sf], | |||
k_list=[best_k], | |||
sf_list=[0.001755], | |||
k_list=[19], | |||
only_label_once=True, | |||
xy_title=plot_title, | |||
yz_title=plot_title, | |||
@@ -504,11 +510,11 @@ plot_multiple_positions(positions_filename=str(recording_selection), | |||
annotationsize=15, | |||
labels=iter([label]), # labels=iter(["k = " + str(best_k)]), | |||
color_all_black=True, | |||
markersize=100) | |||
markersize=10,) | |||
# Plot ART positions | |||
plot_art_positions(ART_pos, | |||
annotate_flag=annotate_points, | |||
annotate_flag=True, | |||
markersize=100, | |||
annotation_size=15) | |||
@@ -20,12 +20,19 @@ class Plotting: | |||
antenna_dict = {"f1": 0, "f2": 1, "f3": 2, "f4": 3, "f5": 4, "f6": 5, "f7": 6, "f8": 7, | |||
"m1": 8, "m2": 9, "m3": 10, "m4": 11, "m5": 12, "m6": 13, "m7": 14, "m8": 15} | |||
label_iter = iter(["Frame 1", "Frame 2", "Frame 3", "Frame 4", "Frame 5", "Frame 6", "Frame 7", "Frame 8"]) | |||
markers = iter(['o', '8', 'p', '>', 'd', 'H', 'x', 'v', '^', '*', 'D', 's', 'h', '+', '<']) | |||
linestyles = iter(['-', '--', '-.', ':', '-', '--', '-.', ':']) | |||
colors = iter(["black", "black", "black", "black", "grey", "grey", "grey", "grey"]) | |||
# Plot the Antennas | |||
x = np.arange(np.shape(data)[0]) | |||
for antenna in antenna_list: | |||
y = fvs[:, antenna_dict[antenna]] | |||
plt.plot(x, y, label=str(antenna)) | |||
plt.legend() | |||
plt.scatter(x, y, label=next(label_iter), marker=next(markers), s=5) | |||
plt.legend(bbox_to_anchor=(1.01, 1.00), loc=2, borderaxespad=0., fontsize=10) | |||
plt.title("Noise investigation") | |||
plt.ylabel('Receoving coil signals [V]', fontdict=font) | |||
plt.xlabel('Samples', fontdict=font) | |||
plt.show() | |||
def plot_positions(self, positions_path): |
@@ -7,15 +7,11 @@ | |||
\citation{Franz.2014} | |||
\citation{Franz.2014} | |||
\citation{.2019} | |||
\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}\protected@file@percent } | |||
\@writefile{tdo}{\contentsline {todo}{Now this is exciting to read and hooks the readers attention, which is what Prof. Zwanger said the introduction should do}{1}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid1}{15240044}{34424518} | |||
\pgfsyspdfmark {pgfid4}{39101366}{34437974} | |||
\pgfsyspdfmark {pgfid5}{41018294}{34192788} | |||
\@writefile{tdo}{\contentsline {todo}{The above shit is probably gonna be deleted}{1}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid6}{21045174}{17323241} | |||
\citation{Rey.2006} | |||
\citation{Than.2012} | |||
\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}\protected@file@percent } | |||
\@writefile{tdo}{\contentsline {todo}{The above shit is probably gonna be deleted}{1}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid1}{21045174}{23116636} | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Wireless capsule endoscopy}{2}\protected@file@percent } | |||
\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}} | |||
\newlabel{fig:endoscopic_capsule_with_scale}{{1a}{2}} | |||
@@ -43,14 +39,14 @@ | |||
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces A surgeon performing patient-image registration by infrared scanning a patients facial surface. The scanned surface is then superimposed onto preoperative MRI images, as seen on the monitor.\relax }}{3}\protected@file@percent } | |||
\newlabel{fig:My_Z-Touch}{{2}{3}} | |||
\@writefile{tdo}{\contentsline {todo}{find a good disadv of fiducial marker}{3}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid7}{13522389}{16997982} | |||
\pgfsyspdfmark {pgfid10}{39101366}{17011438} | |||
\pgfsyspdfmark {pgfid11}{41018294}{16766252} | |||
\pgfsyspdfmark {pgfid2}{13522389}{16997982} | |||
\pgfsyspdfmark {pgfid5}{39101366}{17011438} | |||
\pgfsyspdfmark {pgfid6}{41018294}{16766252} | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Localization in neurosurgery}{3}\protected@file@percent } | |||
\@writefile{tdo}{\contentsline {todo}{This paper: \cite {Orringer.2012} cites this paper: \cite {Cleary.2010}, but I can not access the second paper)}{4}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid12}{23879805}{40928554} | |||
\pgfsyspdfmark {pgfid15}{39101366}{40942010} | |||
\pgfsyspdfmark {pgfid16}{41018294}{40696824} | |||
\pgfsyspdfmark {pgfid7}{23879805}{40928554} | |||
\pgfsyspdfmark {pgfid10}{39101366}{40942010} | |||
\pgfsyspdfmark {pgfid11}{41018294}{40696824} | |||
\newlabel{fig:Neuronavigation_reallife}{{3a}{4}} | |||
\newlabel{sub@fig:Neuronavigation_reallife}{{(a)}{a}} | |||
\newlabel{fig:how-image-guided-surgery-works}{{3b}{4}} | |||
@@ -82,14 +78,14 @@ | |||
\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {timeline of magnetic flux and the induced voltage resulting from (a)}}}{6}\protected@file@percent } | |||
\@writefile{lof}{\contentsline {subfigure}{\numberline{(c)}{\ignorespaces {Induction in time-invariant magnetic field by movement of the conductor L}}}{6}\protected@file@percent } | |||
\@writefile{tdo}{\contentsline {todo}{leaving out a few sentences where he explains moving conductor and time invariant field}{6}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid17}{8281196}{19599209} | |||
\pgfsyspdfmark {pgfid20}{39101366}{19612665} | |||
\pgfsyspdfmark {pgfid21}{41018294}{19367479} | |||
\pgfsyspdfmark {pgfid12}{8281196}{19599209} | |||
\pgfsyspdfmark {pgfid15}{39101366}{19612665} | |||
\pgfsyspdfmark {pgfid16}{41018294}{19367479} | |||
\newlabel{eq:induction_law}{{2}{6}} | |||
\@writefile{tdo}{\contentsline {todo}{I dont know why he references this equation here. But he referenced Gl (3.36)}{6}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid22}{33185564}{9544041} | |||
\pgfsyspdfmark {pgfid25}{39101366}{7831401} | |||
\pgfsyspdfmark {pgfid26}{41018294}{7586215} | |||
\pgfsyspdfmark {pgfid17}{33185564}{9544041} | |||
\pgfsyspdfmark {pgfid20}{39101366}{7831401} | |||
\pgfsyspdfmark {pgfid21}{41018294}{7586215} | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Induction of two infinite conductor loops \cite [p.261f]{Albach.2014}}{7}\protected@file@percent } | |||
\newlabel{fig:Gegeninduktion_zweier_Doppelleitungen_a}{{6a}{7}} | |||
\newlabel{sub@fig:Gegeninduktion_zweier_Doppelleitungen_a}{{(a)}{a}} | |||
@@ -120,9 +116,9 @@ | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.2}The host system}{11}\protected@file@percent } | |||
\newlabel{sec:The_host system}{{3.2.2}{11}} | |||
\@writefile{tdo}{\contentsline {todo}{Add algorithm reference here}{12}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid27}{9616227}{40928554} | |||
\pgfsyspdfmark {pgfid30}{39101366}{40942010} | |||
\pgfsyspdfmark {pgfid31}{41018294}{40696824} | |||
\pgfsyspdfmark {pgfid22}{9616227}{40928554} | |||
\pgfsyspdfmark {pgfid25}{39101366}{40942010} | |||
\pgfsyspdfmark {pgfid26}{41018294}{40696824} | |||
\citation{Stieglitz.2013} | |||
\citation{Putzer.2016} | |||
\citation{McMillen.2010} | |||
@@ -141,8 +137,6 @@ | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Comparison of medical localization systems and the IndLoc system}{13}\protected@file@percent } | |||
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Localization system comparison\relax }}{13}\protected@file@percent } | |||
\newlabel{Tab: localization system comparison}{{1}{13}} | |||
\@writefile{tdo}{\contentsline {todo}{ONE MORE LINE (DOWNWARDS) IN THE TABLE AND IT DOESNT FIT ON ONE PAGE ANYMORE WITH THE TITLE! The WCE: X-Ray until Ultrasound is basically all sources copied from 2012 Than. Some of these sources very old, there is even a patent in there and Im not sure how the guy found anything about the precision there. Basically noone is using X-Ray, MRI or Ultrasound for localizing WEC's, actually noone even uses WEC's....}{13}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid32}{21045174}{9392124} | |||
\@writefile{toc}{\contentsline {section}{\numberline {4}Materials}{15}\protected@file@percent } | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}The localization area}{15}\protected@file@percent } | |||
\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces The modified localization area of the IndLoc system, which was built during this project. The cube placed in the middle, is tracked by the IndLoc system. It is mounted on a frame with infrared markers, which are tracked by an infrared camera system.\relax }}{15}\protected@file@percent } | |||
@@ -155,17 +149,17 @@ | |||
\newlabel{fig:loc_object_on_art_frame}{{10}{16}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {4.1.3}The receiving coils}{17}\protected@file@percent } | |||
\@writefile{tdo}{\contentsline {todo}{Link to testing with ferrite core}{17}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid33}{23896195}{36989056} | |||
\pgfsyspdfmark {pgfid36}{39101366}{37002512} | |||
\pgfsyspdfmark {pgfid37}{41018294}{36757326} | |||
\pgfsyspdfmark {pgfid27}{23896195}{36989056} | |||
\pgfsyspdfmark {pgfid30}{39101366}{37002512} | |||
\pgfsyspdfmark {pgfid31}{41018294}{36757326} | |||
\@writefile{tdo}{\contentsline {todo}{Datenblatt verlinken}{17}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid38}{36329739}{34671698} | |||
\pgfsyspdfmark {pgfid41}{39101366}{32173322} | |||
\pgfsyspdfmark {pgfid42}{41018294}{31928136} | |||
\pgfsyspdfmark {pgfid32}{36329739}{34671698} | |||
\pgfsyspdfmark {pgfid35}{39101366}{32173322} | |||
\pgfsyspdfmark {pgfid36}{41018294}{31928136} | |||
\@writefile{tdo}{\contentsline {todo}{In discussion add somewhere that ferrite core increases magnetic field, but is also not taken into account in the fingeprinting creation, may interfere with magnetic field or whatever it may damage the localization more than benefit. Dunno}{17}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid43}{5594039}{25402266} | |||
\pgfsyspdfmark {pgfid46}{39101366}{25415722} | |||
\pgfsyspdfmark {pgfid47}{41018294}{25170536} | |||
\pgfsyspdfmark {pgfid37}{5594039}{25402266} | |||
\pgfsyspdfmark {pgfid40}{39101366}{25415722} | |||
\pgfsyspdfmark {pgfid41}{41018294}{25170536} | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}ART system}{17}\protected@file@percent } | |||
\@writefile{lof}{\contentsline {figure}{\numberline {11}{\ignorespaces One of six infrared cameras, of the ART system, positioned in the room in order to track the localization object.\relax }}{18}\protected@file@percent } | |||
\newlabel{fig:infrared_camera_1}{{11}{18}} | |||
@@ -182,46 +176,55 @@ | |||
\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Heating up}}}{20}\protected@file@percent } | |||
\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {setup is warm}}}{20}\protected@file@percent } | |||
\@writefile{tdo}{\contentsline {todo}{maybe cite the quickguide manual here?}{20}\protected@file@percent } | |||
\pgfsyspdfmark {pgfid48}{14468604}{15957387} | |||
\pgfsyspdfmark {pgfid51}{39101366}{15970843} | |||
\pgfsyspdfmark {pgfid52}{41018294}{15725657} | |||
\pgfsyspdfmark {pgfid42}{14468604}{15957387} | |||
\pgfsyspdfmark {pgfid45}{39101366}{15970843} | |||
\pgfsyspdfmark {pgfid46}{41018294}{15725657} | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Precision measurements}{21}\protected@file@percent } | |||
\newlabel{sec:precision_measurements}{{5.2}{21}} | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Movement measurements}{21}\protected@file@percent } | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Precision measurements}{21}\protected@file@percent } | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.1}Scaling factor test}{21}\protected@file@percent } | |||
\newlabel{sec:scaling_factor_test}{{5.4.1}{21}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.2.1}Scaling factor test}{21}\protected@file@percent } | |||
\newlabel{sec:scaling_factor_test}{{5.2.1}{21}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {14}{\ignorespaces Before being able to localize precisely the correct scaling factor, which multiplies each receiving coil voltages, has to be determined. For this the scaling factors $10^{2}$ to $ 10^{-4}$ were tested in logarithmic steps.\relax }}{22}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_1}{{14}{22}} | |||
\newlabel{eq:distances}{{8}{22}} | |||
\newlabel{eq:mean}{{9}{22}} | |||
\newlabel{eq:std_dev}{{10}{22}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {15}{\ignorespaces A zoomed in view of Figure \ref {fig:estimation_scaling_factor_1} shows which scaling factors result in a localization closest to the correct positions.\relax }}{23}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_2}{{15}{23}} | |||
\newlabel{eq:std_dev}{{10}{23}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {16}{\ignorespaces Placing the object in 25 positions near the centre of the localization area with a scaling factor of 0.001755, resulting in mean error $\mu = 3.76\textit {m}m$ and standard deviation $\sigma = 3.28\textit {m}m$.\relax }}{24}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_3}{{16}{24}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {17}{\ignorespaces Placing the object in 25 positions near the corner of the localization area with a scaling factor of 0.002100, resulting in mean error $\mu = 10.39\textit {m}m$ and standard deviation $\sigma = 7.52\textit {m}m$.\relax }}{25}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_4}{{17}{25}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {18}{\ignorespaces Placing the object in 42 positions running from the centre to the edges of the localization area with a scaling factor of 0.00204, , resulting in mean error $\mu = 7.42\textit {m}m$ and standard deviation $\sigma = 6.48\textit {m}m$.\relax }}{26}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_5}{{18}{26}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.2}K-nearest interpolation test}{27}\protected@file@percent } | |||
\newlabel{sec:K-nearest interpolation test}{{5.4.2}{27}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {19}{\ignorespaces placing the localization object in 25 positions near the centre of the localization are with a k-nearest value of 19, resulting in mean error $\mu = 3.21\textit {m}m$ and standard deviation $\sigma = 1.84\textit {m}m$.\relax }}{27}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_1}{{19}{27}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {20}{\ignorespaces placing the localization object in 25 positions near the corner of the localization are with a k-nearest value of 12, resulting in mean error $\mu = 10.39\textit {m}m$ and standard deviation $\sigma = 7.52\textit {m}m$.\relax }}{28}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_2}{{20}{28}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {21}{\ignorespaces Placing the object in 42 positions running from the centre to the edges of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 7.57\textit {m}m$ and standard deviation $\sigma = 5.34\textit {m}m$.\relax }}{29}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_3}{{21}{29}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.3}Remove highest frame receiving coil from the localization test}{30}\protected@file@percent } | |||
\newlabel{sec:remove_highest_frame_receiving_coil_from_the_localization_test}{{5.4.3}{30}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {22}{\ignorespaces (sf= 0.001755 , k= 19) Placing the localization object in 25 positions near the centre of the localization area with removing the highest frame receiving coil, resulting in mean error $\mu = 5.56\textit {m}m$ and standard deviation $\sigma = 3.2\textit {m}m$.\relax }}{30}\protected@file@percent } | |||
\newlabel{fig:estimation_removing_highest_frame_1}{{22}{30}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {23}{\ignorespaces (sf= 0.0021 , k= 12) Placing the localization object in 25 positions near the corner of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 13.32\textit {m}m$ and standard deviation $\sigma = 8.24\textit {m}m$.\relax }}{31}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_2}{{23}{31}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {24}{\ignorespaces (sf= 0.00204 , k= 4) Placing the object in 42 positions running from the centre to the edges of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 15.21\textit {m}m$ and standard deviation $\sigma = 14.33 \textit {m}m$.\relax }}{31}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_3}{{24}{31}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.4}Noise investigation}{32}\protected@file@percent } | |||
\newlabel{sec:Noise_investigation}{{5.4.4}{32}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {16}{\ignorespaces Placing the object in 25 positions near the centre of the localization area with a scaling factor of 0.001755, resulting in mean error $\mu = 3.76\textit {m}m$ and standard deviation $\sigma = 3.28\textit {m}m$.\relax }}{23}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_3}{{16}{23}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {17}{\ignorespaces Placing the object in 25 positions near the corner of the localization area with a scaling factor of 0.002100, resulting in mean error $\mu = 10.39\textit {m}m$ and standard deviation $\sigma = 7.52\textit {m}m$.\relax }}{24}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_4}{{17}{24}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {18}{\ignorespaces Placing the object in 42 positions running from the centre to the edges of the localization area with a scaling factor of 0.00204, , resulting in mean error $\mu = 7.42\textit {m}m$ and standard deviation $\sigma = 6.48\textit {m}m$.\relax }}{25}\protected@file@percent } | |||
\newlabel{fig:estimation_scaling_factor_5}{{18}{25}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.2.2}K-nearest interpolation test}{26}\protected@file@percent } | |||
\newlabel{sec:K-nearest interpolation test}{{5.2.2}{26}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {19}{\ignorespaces placing the localization object in 25 positions near the centre of the localization are with a k-nearest value of 19, resulting in mean error $\mu = 3.21\textit {m}m$ and standard deviation $\sigma = 1.84\textit {m}m$.\relax }}{26}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_1}{{19}{26}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {20}{\ignorespaces placing the localization object in 25 positions near the corner of the localization are with a k-nearest value of 12, resulting in mean error $\mu = 10.39\textit {m}m$ and standard deviation $\sigma = 7.52\textit {m}m$.\relax }}{27}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_2}{{20}{27}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {21}{\ignorespaces Placing the object in 42 positions running from the centre to the edges of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 7.57\textit {m}m$ and standard deviation $\sigma = 5.34\textit {m}m$.\relax }}{28}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_3}{{21}{28}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.2.3}Remove highest frame receiving coil from the localization test}{29}\protected@file@percent } | |||
\newlabel{sec:remove_highest_frame_receiving_coil_from_the_localization_test}{{5.2.3}{29}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {22}{\ignorespaces (sf= 0.001755 , k= 19) Placing the localization object in 25 positions near the centre of the localization area with removing the highest frame receiving coil, resulting in mean error $\mu = 5.56\textit {m}m$ and standard deviation $\sigma = 3.2\textit {m}m$.\relax }}{29}\protected@file@percent } | |||
\newlabel{fig:estimation_removing_highest_frame_1}{{22}{29}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {23}{\ignorespaces (sf= 0.0021 , k= 12) Placing the localization object in 25 positions near the corner of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 13.32\textit {m}m$ and standard deviation $\sigma = 8.24\textit {m}m$.\relax }}{30}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_2}{{23}{30}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {24}{\ignorespaces (sf= 0.00204 , k= 4) Placing the object in 42 positions running from the centre to the edges of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 15.21\textit {m}m$ and standard deviation $\sigma = 14.33 \textit {m}m$.\relax }}{30}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_3}{{24}{30}} | |||
\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.2.4}Noise investigation}{31}\protected@file@percent } | |||
\newlabel{sec:Noise_investigation}{{5.2.4}{31}} | |||
\newlabel{fig:estimation_noise_1}{{25a}{31}} | |||
\newlabel{sub@fig:estimation_noise_1}{{(a)}{a}} | |||
\newlabel{fig:estimation_noise_2}{{25b}{31}} | |||
\newlabel{sub@fig:estimation_noise_2}{{(b)}{b}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {25}{\ignorespaces Investigating the localization error due to noise in the receiving coils for 2000 samples. P13 was attempted to localize which lies almost exactly in the centre of the localization area ($\pm 1 \textit {m}m$).\relax }}{31}\protected@file@percent } | |||
\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {The localization object was placed in P13 (green). 2000 samples were recorded with the IndLoc system, resulting in 2000 slightly different positions, due to noise (black). The mean error is $\mu = 1.73\textit {m}m$.}}}{31}\protected@file@percent } | |||
\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {A magnified view of the 2000 IndLoc positions shows how noise affects the localization. The positions lie within a $\Delta x = 0.253\textit {m}m$ by $\Delta y = 0.358\textit {m}m$ rectangle. The standard deviation is $\sigma = 0.04\textit {m}m$.}}}{31}\protected@file@percent } | |||
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Movement measurements}{31}\protected@file@percent } | |||
\newlabel{sec:movement_measurements}{{5.3}{31}} | |||
\@writefile{lof}{\contentsline {figure}{\numberline {26}{\ignorespaces (sf= 0.00204 , k= 4) Placing the object in 42 positions running from the centre to the edges of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 15.21\textit {m}m$ and standard deviation $\sigma = 14.33 \textit {m}m$.\relax }}{32}\protected@file@percent } | |||
\newlabel{fig:estimation_k_nearest_3}{{26}{32}} | |||
\@writefile{toc}{\contentsline {section}{\numberline {6}RESULTS}{33}\protected@file@percent } | |||
\@writefile{toc}{\contentsline {section}{\numberline {7}DISCUSSION}{34}\protected@file@percent } | |||
\@writefile{toc}{\contentsline {section}{\numberline {8}SUMMARY, OUTLOOK INTO THE FUTURE}{35}\protected@file@percent } |
@@ -1,7 +1,7 @@ | |||
%!PS-Adobe-2.0 | |||
%%Creator: dvips(k) 5.999 Copyright 2019 Radical Eye Software | |||
%%Title: 2021_Seyffer_Investigating the precision of an induction-based localization system for medical applications.dvi | |||
%%CreationDate: Thu Feb 11 14:55:22 2021 | |||
%%CreationDate: Sat Feb 13 16:44:37 2021 | |||
%%Pages: 36 | |||
%%PageOrder: Ascend | |||
%%BoundingBox: 0 0 612 792 |
@@ -18,6 +18,8 @@ | |||
\usepackage{subfig} | |||
\graphicspath{ {Images/} } | |||
% Package used for footnotes in Table 1 | |||
\usepackage{tablefootnote} | |||
%Package used for changing border widths of page layout | |||
\usepackage[margin=2cm,nohead]{geometry} % http://ctan.org/pkg/geometry | |||
@@ -154,9 +156,9 @@ Write abstract at the end. | |||
\newpage | |||
\pagenumbering{arabic} % from here onwards the page numbering is in arabic | |||
\section{Introduction} | |||
In surgery rooms every inch of technology is used to decrease the mortality rate of patients. One that has proven to be very efficient at doing that is computer assisted surgery. A surgeon has a screen next to the patient, on which he can see where his instruments are inside the patient. In order to use this technology the instruments have to be tracked in 3D and real-time. So far infrared camera systems are most often used for this. The Fraunhofer Institute for Integrated Circuits developed an inductive localization system called IndLoc. It is mostly used for industry 4.0 applications in logistics, whereas this thesis is going to test whether or not the system could be used for medical applications. The main deciding factor hereby will be whether or not the system can be accurate enough, as this can decide on life or death during surgery. On a side note this thesis is going to check if the system can localize orthopaedic screws and metallic tooth fillings in order to localize the patient in 3D space aswell.\todo[]{Now this is exciting to read and hooks the readers attention, which is what Prof. Zwanger said the introduction should do} | |||
In surgery rooms every inch of technology is used to decrease the mortality rate of patients. One that has proven to be very efficient at doing that is computer assisted surgery. A surgeon has a screen next to the patient, on which he can see where his instruments are inside the patient. In order to use this technology the instruments have to be tracked in 3D and real-time. So far infrared camera systems are most often used for this. The Fraunhofer Institute for Integrated Circuits developed an inductive localization system called IndLoc. It is mostly used for industry 4.0 applications in logistics, whereas this thesis is going to test whether or not the system could be used for medical applications. The main deciding factor hereby will be whether or not the system can be accurate enough, as this can decide on life or death during surgery. | |||
\\ | |||
With progressing technology in medicine, automatic localization systems become more prevalent. Whether it is localizing a tumor in an X-Ray scan via machine learning, tracking surgical instruments inside a patient with infrared cameras, tracking a contrast agent inside the human body or localizing a pill in the intestines. Localization is required in many medical fields nowadays and inductive localization is still a much overlooked technology in this context. Inductive localization has the benefit of having almost no negative health effects, much unlike X-Ray and being much cheaper than MRI imaging. Additionally low frequency magnetic field waves penetrate biological tissue very well and thus fit medical applications very well. Object tracking is necessary in order to use computer-assisted surgery systems \cite{Franz.2014}. Biggest problem of inductive localization systems in medicine are: problems with workflow integration, robustness problems of EM tracking, cost issues with embedding sensors into clinical tools \cite{Franz.2014}. This paper is awesome, it has 270refs, is from 2014 and compares a bunch of EM med loc systems. I should maybe only ref this paper when talking about EM loc systems.. | |||
With progressing technology in medicine, automatic localization systems become more prevalent. Whether it is localizing a tumor in an X-Ray scan via machine learning, tracking surgical instruments inside a patient with infrared cameras, tracking a contrast agent inside the human body or localizing a pill in the intestines. Localization is required in many medical fields nowadays and inductive localization is still a much overlooked technology in this context. Inductive localization has the benefit of having almost no negative health effects, much unlike X-Ray and being much cheaper than MRI imaging. Additionally low frequency magnetic field waves penetrate biological tissue very well. Object tracking is necessary in order to use computer-assisted surgery systems \cite{Franz.2014}. Biggest problem of inductive localization systems in medicine are: problems with workflow integration, robustness problems of EM tracking, cost issues with embedding sensors into clinical tools \cite{Franz.2014}. | |||
\\ | |||
\todo[inline]{The above shit is probably gonna be deleted} | |||
The Fraunhofer Institute for Integrated Circuits developed an inductive localization system called IndLoc. It is used to localize passive objects in real-time in 3D space. Its current main application is to monitor the picking process in logistics to prevent wrong picks. The motivation of this thesis is to find out whether the IndLoc system could be used in any medical application. Medical applications require very precise localization systems. Usually within the millimetre range (Table \ref{Tab: localization system comparison}). The IndLoc system is accurate in the centimetre range ($\pm$5 \centi\metre) \cite{.2019}. | |||
@@ -367,7 +369,7 @@ The position is then shown in the GUI and superimposed with a digital representa | |||
\resizebox{\columnwidth}{!}{\begin{tabular}{|c|c|c|l|l|} | |||
\hline | |||
\rowcolor[HTML]{FFFFFF} | |||
\textbf{Medical field} & \textbf{Localization system} & \textbf{Precision} & \textbf{Advantages} & \multicolumn{1}{c|}{\cellcolor[HTML]{FFFFFF}\textbf{Disadvantages}} \\ \hline | |||
\textbf{Medical field} & \textbf{Localization system} & \textbf{Precision \tablefootnote{Precision is given in mean error $\pm$ standard deviation if information was available. Else only mean error is given.}} & \textbf{Advantages} & \multicolumn{1}{c|}{\cellcolor[HTML]{FFFFFF}\textbf{Disadvantages}} \\ \hline | |||
\rowcolor[HTML]{EFEFEF} | |||
\cellcolor[HTML]{FFFFFF} & \begin{tabular}[c]{@{}c@{}}Infrared camera system\\with markers on \\instruments \cite{Stieglitz.2013}\end{tabular} & \begin{tabular}[c]{@{}c@{}}$1.8 - 5.0\:mm$ \end{tabular} & \begin{tabular}[c]{@{}l@{}}High precision,\\ furthest developed\end{tabular} & \begin{tabular}[c]{@{}l@{}}Line of \\ sight necessary,\\ mean operating\\ time longer,\\ bending of\\ instruments\\ not registered\end{tabular} \\ | |||
\rowcolor[HTML]{FFFFFF} | |||
@@ -388,9 +390,13 @@ The position is then shown in the GUI and superimposed with a digital representa | |||
\cellcolor[HTML]{FFFFFF}To be determined & IndLoc system & To be determined & \begin{tabular}[c]{@{}l@{}}Maybe faster\\ setup time,\\ no line of \\ sight necessary \\ mb tooth filling \\ marker trackable\end{tabular} & \begin{tabular}[c]{@{}l@{}}Low precision,\\ affected by other\\ magnetic fields\end{tabular} \\ \hline | |||
\end{tabular}} | |||
\end{table} | |||
\todo[inline]{ONE MORE LINE (DOWNWARDS) IN THE TABLE AND IT DOESNT FIT ON ONE PAGE ANYMORE WITH THE TITLE! The WCE: X-Ray until Ultrasound is basically all sources copied from 2012 Than. Some of these sources very old, there is even a patent in there and Im not sure how the guy found anything about the precision there. Basically noone is using X-Ray, MRI or Ultrasound for localizing WEC's, actually noone even uses WEC's....} | |||
\clearpage | |||
Tab. \ref{Tab: localization system comparison} gives a quick overview of the advantages and disadvantages of bla. | |||
Tab. \ref{Tab: localization system comparison} gives a quick overview of the advantages and disadvantages of the different localization systems. | |||
Is is to be mentioned that the precision of the inductive localization system for image-guided surgery is for a 3mm thick preoperative CT image scan. | |||
\clearpage | |||
@@ -511,11 +517,7 @@ All of the following precision measurements were performed by placing the locali | |||
Afterwards the position was measured with the IndLoc system by recording 2000 samples per position. | |||
2000 samples were recorded for each point so later on the possibility of averaging and analyzing the signal to noise ratio was available. At a sampling rate of 1MHz recording 2000 samples took 2\milli s. These recordings contain the receiving coils voltages. Thus saving a 2D array of 2000 by 16. The file names of each measurement were documented. Then the object was placed 1 \centi\metre | |||
$\:$ to the side on the mm sheet and the process was repeated until a measurement set of points came together. The data of the precision measurements were then evaluated with different hard- or software parameters in order to optimize them. | |||
\subsection{Movement measurements} | |||
\subsection{Precision measurements} | |||
$\:$ to the side on the mm sheet and the process was repeated until a measurement set of points came together. The data of the precision measurements were then evaluated with different hard- or software parameters in order to optimize them. | |||
\subsubsection{Scaling factor test}\label{sec:scaling_factor_test} | |||
The scaling factor is a factor that is multiplied onto each receiving coil voltage. Its purpose is to diminish the difference between the calculated receiving coil voltages in the fingerprinting table and the real measured voltages. As the fingerprinting table is created certain parameters are required as input, such as for example: Exciter wire resistance, Inductance of the receiving coils, Resistance of the receiving coils, Windings of the localization object, etc. As measuring all of these parameters would take too much effort the scaling factor has been implemented. Usually the scaling factor is tested empirically for each IndLoc setup or prototype that is built. | |||
@@ -544,22 +546,18 @@ As the evaluation of the differences in localization precision by eye became imp | |||
\begin{equation}\label{eq:distances} | |||
d_{Pi} = \sqrt{(x_{ART_{Pi}} - x_{IndLoc_{Pi}})^2 + (y_{ART_{Pi}} - y_{IndLoc_{Pi}})^2 } | |||
\end{equation} | |||
Afterwards the mean distance for each scaling factor was calculated with the formula: | |||
The mean distance for each scaling factor was calculated with: | |||
\begin{equation}\label{eq:mean} | |||
\mu ={\frac {1}{n}}\sum _{i=1}^{n}d_{i}={\frac {d_{1}+d_{2}+\cdots +d_{n}}{n}} | |||
\end{equation} | |||
The standard deviation for each scaling factor was calculated with the formula: | |||
\begin{equation}\label{eq:std_dev} | |||
\sigma = \sqrt{\frac{\sum |P_{i} - \mu|^2}{N}} | |||
\end{equation} | |||
\begin{figure}[h] | |||
\includegraphics[scale=0.4]{estimation_scaling_factor_3} | |||
\includegraphics[scale=0.3]{estimation_scaling_factor_3} | |||
\centering | |||
\caption{Placing the object in 25 positions near the centre of the localization area with a scaling factor of 0.001755, resulting in mean error $\mu = 3.76\milli\metre$ and standard deviation $\sigma = 3.28\milli\metre$.} | |||
\label{fig:estimation_scaling_factor_3} | |||
@@ -728,7 +726,25 @@ Plotting positions for: sf= 0.00204 , k= 4 | |||
\clearpage | |||
\subsubsection{Noise investigation}\label{sec:Noise_investigation} | |||
\begin{figure}[h] | |||
\centering | |||
\subfloat[The localization object was placed in P13 (green). 2000 samples were recorded with the IndLoc system, resulting in 2000 slightly different positions, due to noise (black). The mean error is $\mu = 1.73\milli\metre$.]{\includegraphics[width=0.49\textwidth]{estimation_noise_1}\label{fig:estimation_noise_1}} | |||
\hfill | |||
\subfloat[A magnified view of the 2000 IndLoc positions shows how noise affects the localization. The positions lie within a $\Delta x = 0.253\milli\metre$ by $\Delta y = 0.358\milli\metre$ rectangle. The standard deviation is $\sigma = 0.04\milli\metre$.]{\includegraphics[width=0.49\textwidth]{estimation_noise_2}\label{fig:estimation_noise_2}} | |||
\caption{Investigating the localization error due to noise in the receiving coils for 2000 samples. P13 was attempted to localize which lies almost exactly in the centre of the localization area ($\pm 1 \milli\metre$).} | |||
\end{figure} | |||
In order to investigate to what extend noise in the receiving coil voltages, affects the localization, this test was performed. The localization object was placed in the center of the localization area (P13 of Figure \ref{fig:estimation_scaling_factor_3}). Then 2000 samples of the receiving coil voltages were recorded. Each of the samples were used to localize to the object, resulting in 2000 positions with a mean error of $\mu = 1.73\milli\metre$ (Figure \ref{fig:estimation_noise_1}). The noise level measured beforehand was $\pm 10\mu\volt$ (Figure \ref{fig:setup_is_warm}), resulting the positions to vary in a | |||
$\Delta x = 0.253\milli\metre$ by $\Delta y = 0.358\milli\metre$ rectangle or a standard deviation of $\sigma = 0.04\milli\metre$ (Figure \ref{fig:estimation_noise_2}). | |||
The test was repeated with the localization object placed near a corner of the localization area ($x = 400 \milli\metre$, $y = 428\milli\metre$), resulting in $\mu = 27.78 \milli\metre$ and $\sigma=0.01\milli\metre$. | |||
\begin{figure}[h] | |||
\includegraphics[scale=0.35]{estimation_noise_3} | |||
\centering | |||
\caption{(sf= 0.00204 , k= 4) Placing the object in 42 positions running from the centre to the edges of the localization area with a k-nearest value of 4, resulting in mean error $\mu = 15.21\milli\metre$ and standard deviation $\sigma = 14.33 \milli\metre$.} | |||
\label{fig:estimation_k_nearest_3} | |||
\end{figure} | |||
\subsection{Movement measurements}\label{sec:movement_measurements} | |||
\clearpage | |||
\section{RESULTS} | |||
@@ -25,12 +25,11 @@ | |||
\contentsline {section}{\numberline {5}Methods}{19}% | |||
\contentsline {subsection}{\numberline {5.1}Setting up the localization systems}{19}% | |||
\contentsline {subsection}{\numberline {5.2}Precision measurements}{21}% | |||
\contentsline {subsection}{\numberline {5.3}Movement measurements}{21}% | |||
\contentsline {subsection}{\numberline {5.4}Precision measurements}{21}% | |||
\contentsline {subsubsection}{\numberline {5.4.1}Scaling factor test}{21}% | |||
\contentsline {subsubsection}{\numberline {5.4.2}K-nearest interpolation test}{27}% | |||
\contentsline {subsubsection}{\numberline {5.4.3}Remove highest frame receiving coil from the localization test}{30}% | |||
\contentsline {subsubsection}{\numberline {5.4.4}Noise investigation}{32}% | |||
\contentsline {subsubsection}{\numberline {5.2.1}Scaling factor test}{21}% | |||
\contentsline {subsubsection}{\numberline {5.2.2}K-nearest interpolation test}{26}% | |||
\contentsline {subsubsection}{\numberline {5.2.3}Remove highest frame receiving coil from the localization test}{29}% | |||
\contentsline {subsubsection}{\numberline {5.2.4}Noise investigation}{31}% | |||
\contentsline {subsection}{\numberline {5.3}Movement measurements}{31}% | |||
\contentsline {section}{\numberline {6}RESULTS}{33}% | |||
\contentsline {section}{\numberline {7}DISCUSSION}{34}% | |||
\contentsline {section}{\numberline {8}SUMMARY, OUTLOOK INTO THE FUTURE}{35}% |