!
! !
OCT$Segmentation$Man ual $
Jens$Kowal,$Pascal$Dufour$
This!manual!gives!a!quick!introduction!into!the!OCT!Segmentation!application!in!
particular!it!explains!how!to!prepare!the!OCT!data!in!order!to!be!loaded!into!the!
segmentation!application!and!it!outlines!the!existing!functionality.!$
08!
!"##$
%&'()*+,'-)&$$
The!application!is!a!development!of!the!Ophthalmic!Technology!Group!at!the!
ARTORG!Center!and!can!be!used!without!restrictions!for!research!purpose.!Of!
course,!we!ask!you!to!cite!our!paper!if!you!use!the!application!in!you!
publications:!
!"#$"#%&'(&)#*+#,-"./),0123,4*5#6&-+728&)',9*#8*:;*<+,+7(<#('#=>?#%,+,#@47<:#
?),7<*5#A,)5#,<5#8('+#>(<4+),7<+4"B#CDDD#?),<4"#6*5"#C;:"#EFGE"#
!
The!application!is!based!on!a!software!framework!MARVIN!that!has!been!
developed!within!the!Ophthalmic!Technology!Group!at!the!ARTORG!Center.!
!
."(*/"(0$102+-(030&'4$
Currently!the!software!runs!under!Mac!O S!X!10.7+!or!Windows!7!(64Bit).!If!there!
is!a!strong!demand!for!a!32Bit!version!we!might!create!one!in!the!future.!!
!
During!the!automatic!segmentation!procedure!the!application!requires!about!
3GB!of!memory.!Therefore!it!is!advisable!to!have!at!least!4GB!main!memory!in!
your!computer.!Moreover,!the!application!requires!an!OpenGL!compatible!
graphic!sub!system.!!
!
.0-*0#50(6$789$:"'"$;<=)('$
The!OCT!systems,!currently!available!on!the!market,!produce!a!multitude!on!
different!data!formats.!There!is!no!commonly!accepted!standard!to!exchange!
OCT!data.!DICOM!3.0!might!serve!as!an!exchange!format!for!OCT!data!in!the!
future.!!
However,!due!to!availability!of!Heidelberg!Engineering!OCT’s!at!the!clinic!we!are!
most!often!collaborating!with,!the!Inselspital!Bern!in!Switzerland,!we!focused!on!
the!compatibility!with!the!Heidelberg!Engineering!OCT!systems.!The!standard!
data!exchange!format!between!Heidelberg!OCT’s!is!the!so\called!*E*!format.!This!
is!a!binary!format!whereas!the!format!composition!and!structure!is!not!freely!
available!for!the!public.!!
For!research!purpose!Heidelberg!Engineering!created!an!XML!exchange!format!
for!which!the!specification!is!available.!!We!use!this!XML!format!to!read!OCT!data!
into!our!segmentation!application.!!
!
The!export!action!can!be!triggered!via!the!regular!export!submenu!(see!Figure!
1).!The!export!will!create!an!xml!file!plus!a!number!of!images!(depending!on!the!
amount!of!exported!data).!The!export!will!include!always!all!selected!items.!!
!
Usually!the!xml!export!functionality!is!not!available!in!a!default!installation.!
However,!it!can!be!turned!on!very!easily.! Open!in!a!text!editor!the!configuration!
file!.1),H7*I*)"7<7B!from!your!Heidelberg!Engineering!viewer!installation.!!
Add!the!following!two!lines!to!it:!
!
JK;-DL0()+M#
N()O40,9*P>QR!$?AR?=R$SRDKC8?CS/R%CTD>?=TU#
!
The!first!line!“[XmlExport]”!will!turn!on!the!xml!export!facility.!The!second!line!
controls!the!target!directory!for!the!xml!export.!You!should!make!sure!that!the!
directory!listed!there!exists!and!that!you!have!t he! rights!to!write!into!it.!
!
!
Figure!1:!Export!m e nu !point!to!create!a n!x ml!export!
!
!
!
>0630&'"'-)&$?==#-,"'-)&$$
The!application!consist!of!two!main!modules!the!“Patient!Manager”!and!the!
"OCTSegModule".!You!can!switch!between!both!modules!using!the!V$00-79,+7(<#
6(5&-*#8I7+91*)V!which!is!the!tab!bar!at!the!very!top!of!the!application.!!
!
!
Figure!2:!Applicatio n !main!screen!
Both!modules!are!explained!in!the!following.!Additionally!the!tab!bar!contains!a!
button!to!make!screenshots!(right!to!the!=>?8*:6(5&-*!button),!a!button!to!
launch!the!configuration!file!editor,!and!the!exit!button!(on!the!very!right!end!of!
the!tab!bar).!!
As!the!name!suggest!the!screenshot!button!enables!you!to!make!screen!shots!of!
the!application.!Clicking!on!it!opens!a!new!dialog!showing!a!scaled!down!picture!
of!the!application!an!to!buttons!to!either!save!the!acquired!screenshot!or!dismiss!
it.!The!default!location!to!store!the!screenshots!is!the!Desktop.!
Clicking!on!the!configuration!file!editor!button!opens!a!configuration!dialog!
editor!allowing!you!to!change!several!parameter!controlling!the!behavior!of!the!
application.!In!the!remaining!part!of!the!manual!we!will!refer!occasionally!to!the!
configuration!editor!whenever!it!is!appropriate.!For!the!moment!the!default!
values!are!good!to!go.!!
The!last!button!in!the!tab!bar!on!the!right!allows!you!to!terminate!the!
application.!
:"'"$@)"*-&6$A$B"'-0&'$C"&"60($
The!purpose!of!the!patient!manager!module!is!to!organize!and!import!data.!OCT!
data!are!organized!by!patients!and!studies.!Finally!the!in dividual!OCT!slice!stacks!
are!integrated!into!studies.!
You!can!have!as!many!patients!as!you!want!in!you!patient!database.!!
To!import!a!new!OCT!image!data!set!click!on!"New!Patient"!(see!number!1!in!
Figure!3)!first!and!enter!patient!specific!information!as!requested!in!the!dialog!
box!that!will!open.!!Note:!The!Patient!ID!will!be!assigned!automatically.!!
!
After!creating!a!new!patient!you'll!have!to!create!a!new!study,!by!clicking!on!
"New!Study"!(see!number!2!in!Figure!3).!In!the!dialog!that!will!open!you!can!
change!the!Study!name!or!leave!it!as!suggested.!Institution!name!is!optional.!!
To!finally!add!an!OCT!slice!stack!to!the!new!patient/study!combination!press!the!
"Add!Data"!button!(see!number!3!in!Figure!3).!
!
!
Figure!3:!Patient!Ma n a g er !Module!
Clicking!on!the!$55#%,+,!button!will!open!a!Dialog!box!a!shown!in!Figure!4.!This!
dialog!window!lets!you!normally!choose!the!type!of!data!that!you!want!add.!
Currently!within!this!application!onl y!OCT!data!are!of!concern!therefore!this!is!
the!only!type!you!can!select!here.!!
!
!
Figure!4:!Choose!Da t a!T y p e !D ia lo g !
To!proceed!click!on!the!green!checkmark.!A!new!dialog!will!open!where!you!can!
provide!a!name!for!OCT!data!(green!arrow!in!Figure!5)!\!you!can!also!proceed!
with!the!suggested!name.!Clicking!on!the!green!plus!sign!will!bring!up!a!file!
dialog!that!lets!you!choose!the!data!to! b e!added!(see!Figure!6Figure!6).!!!
!
!
Figure!5:!Add!Data !D ia lo g!
With!the!File!Dialog!navigate!to!the!directory!where!you!exported!the!OCT!from!
the!Heidelberg!Engineering!system!and!select!the!xml!File!(double!click!on!it!or!
select!it!and!click!open).!The!File!Dialog!will!close!and!the!list!view!in!the!Add!
Data!Dialog!will!be!updated!with!the!OCT!data!just!added.!!
!
!
Figure!6:!File!Dialog!t o !se le ct !th e !O C T !D a t a!
After!clicking!Ok!in!the!Add!Data!Dialog!the!xml!File!will!be!parsed!and!if!the!
export!contains!several!studies!it!will!let!you!choose!one!study.!Click!Ok!to!close!
the!selection!dialog.!!
!
Before!we!proceed!with!the!actual!segmentation!some!general!remarks!to!the!
patient!data!handling:!
All!patients!known!to!the!application!will!be!shown!in!the!upper!list!view!
marked!in!blue!as!!,+7*<+#W74+!(see!Figure!3).!!
The!created!studies!for!a!particular!patient!are!listed!in!a!tree!like!
structure!together!with!the!data!they!encap su late!(shown!with!a!blue!
mark!entitled!"8+&5X#%,+,#W74+V!see!lower!part!of!Figure!3).!!
You!can!edit!some!patient!information!by!clicking!on!the!D57+#!,+7*<+!
button.!!
You!can!remove!Patients!by!clicking!on!the!Remove!Patients!button.!
You!can!add!multiple!studies!to!a!particular!patient!and!you!can!have!
multiple!OCT!image!data!within!one!study.!
Throughout!the!application!we!use!the!concept!of!a!"Current!Patient"!and!
a!"Current!Study"/"Current!Data".!This!means!each!edit/remove!action!in!
the!Patient!Manager!is!always!in!relation!the!selected!items!in!each!of!the!
two!list!views.!Moreover,!later!in!the!Segmentation!Module!only!data!of!
the!currently!selected!Study!are!available!for!segmentation.!If!you!want!to!
segment!OCT's!from!a!different!study!or!from!a!different!patient!you!have!
to!go!beck!to!the!"Patient!Module"!and!select!the!respective!Patient/Study!
in!the!related!list!views.!
IMPORTANT:!Currently!we!do!not!copy!OCT!image!data!around!while!
importing!them!into!the!database!of!the!application.!This!means!if!you!
delete/move!the!data!from!the!location!where!you!have!added!them!the!
application!won't!find!them!again,!e.g.!if!you!have!the!on!a!USB!stick!add!
them!by!navigating!to!the!USB!stick!during!the!Add!Data!step!and!if!you!
unplug!the!USB!stick!the!application!will!fail!to!access!the!data.!A!save!
approach!would!be!to!copy!the!data!into!a!location!of!your!file!system!
where!they!can!stay!permanently.!In!the!future!we!might!change!this!
behavior.!
>0630&'"'-)&$
With!a!study!selected!in!the!study!view!we!can!proceed!to!the!Segmentation!
Module!by!clicking!on!the!respective!button!in!the!tab!bar.!The!application!will!
looks!like!shown!in!Figure!7.!!The!list!view!highlighted!in!Figure!7!shows!all!OCT!
data!items!of!the!study!currently!selected.!Double!clicking!on!one!OCT!slice!stack!
will!enable!it!for!the!segmentation!procedure.!!
!
Figure!7:!OCT!Segmentation!Mod u le !witout!data!load e d .!
The!data!will!be!loaded!and!some!preprocessing!steps!will!be!performed!
(anisotropic!diffusion).!!
!
Thereafter!the!slice!stack!is!shown!in!the!application!as!illustrated!in!Figure!8.!!
!
!
!
!
!
Figure!8:!Segmenta t io n!L!Automatic!Segementation!View!
The!Segmentation!module!provides!6!different!interaction!modes.!You!can!
switch!between!them!using!the!tab!bar!highlighted!green!in!Figure!8.!Two!modes!
("Graph"!and!"Man!Segmentation")!allow!for!segmenting!an!OCT!slice!stack!
automatically!an!manually!respectively,!one!mode!("Visualization")!is!to!
visualize!the!OCT!slice!stack!together!with!its!segmentation!results!in!3D,!
additionally!three!different!measurement!modes!are!available!("Section!
Measurement",!"Volume!Measurement",!"Reflectivity!Measurement").!!
?+')3"'-,$>0630&'"'-)&$
The!Automatic!Segmentation!will!be!activated!by!clicking!on!the!"Graph"!button!
in!the!interaction!mode!tab!bar!(highlighted!in!green!in!Figure!8).!!
!
The!automatic!segmentation!procedure!ranges!always!over!all!images!in!the!slice!
stack.!
!
The!button!group!"Segmentation"!underneath!the!slice!view!allows!to!control!the!
segmentation!procedure.!The!first!button!in!that!group!"Zero!Segmentation"!can!
be!used!to!reset!an!existing!segmentation.!!
In!general!you!can!choose!between!segmenting!all!layers!together!or!
individually.!!
"Segment!ILM"!will!selectively!segment!the!internal!limiting!membrane.!
"Segment!IS/OS!+!BM"!will!segment!inner!outer!segment!interface!and!Bruch!
membrane.!"Segment!GCL!+!INL/ONL"!will!segment!ganglien!cell!layer!and!the!
inner!nucleus!layer!(INL),!and!outer!nucleus!layer!(ONL).!!
NOTE:!If!you!segment!the!layer!individually!it!is!of!importance!to!do!it!in!the!
right!order!1.)ILM;!!2.)IS/OS!+!BM;!! 3)GCL! +!INL/ONL.!!
"Segment!all!Layers"!performs!a!segmentation!of!all!layers.!"Segment!all!Layers!
with!Drusen"!does!basically!the!same!but!the!segmentation!of!the!inner/outer!
segment!interface!layer!(IS/OS)!and!the!outer!PE/RPE!complex!layer!(OPR)!is!
less!constrained!by!the!statistical!model!which!allow!them!to!better!follow!
potential!pathologies!in!that!area.!However,!it!might!take!a!bit!longer!(35sec!
versus!90sec!on!my!computer).!!
!
After!each!segmentation!step!the!segmented!layer!will!show!up!in!the!slice!view.!
You!can!browse!over!individual!slices!by!using!the!slider!("Image!Selection")!
highlighted!in!Figure!8!in!the!lower!left!part!of!the!application!window!
The!individual!layer!are!color!coded!in!the!slice!view.!You!drag!and!zoom!the!
slice!in!the!slice!viewer!if!you!want!to!look! for! particular!details.!
!
The!layer!can!be!turned!on/off!individually!using!the!checkboxes!grouped!as!
"Layer!Visibility"!at!the!bottom!of!the!application!window.!
!
The!segmentation!should!be!able!to!handle!regular!slice!stacks!containing!
several!slices!as!well!as!single!slices!\!both!of!the!central!retina.!!
For!slice!stacks!consisting!of!several!slices!the!segmentation!algorithm!does!not!
segment!the!slices!individually!it!will!rather!find!an!optimal!segmentation!result!
over!all!slices!together.!That!is!the!reason!for!the!rather!large!amount!of!main!
memory!the!application!will!occupy!during!the!segmentation!step.!
!
Segmentation!of!OCT's!centered!around!the!optic!nerve!is!not!yet!supported!
because!we!don't!have!yet!a!statistical!model!for!it.!
!
The!Checkbox!"Invert!Slice"!(located!in!the!lower!right!part!of!the!segmentation!
view)!inverts!the!color!mapping!of!the!slice!view.!The!selection!box!above!allow!
visualization!of!different!steps!of!the!image!processing!queue!of!the!slices.!!
!
The!button!"Save!now"!stores!the!current!segmentation!result.!Stored!
segmentations!will!show!up!in!the!selection!view!in!the!upper!right!area!of!the!
application!window.!They!can!be!re\loaded!like!a!regular!slice!stack!for!
subsequent!inspections.!The!have!the!creation!date!and!time!in!their!names!
encoded.!
C"&+"#$>0630&'"'-)&$
The!manual!segmentation!mode!(activated!via!the!button!"Man!Segmentation"!)!
allows!to!refine!an!existing!segmentation.!The!basic!interaction!is!the!same!as!for!
the!automatic!segmentation.!!
To!change!manually!a!segmented!contour!you!have!to!first!select!the!contour!
that!you!want!change!using!the!selection!list!highlighted!in!Figure!9!in!blue.!!
!
Inside!the!viewer!you!drag!the!selected!contour!to!the!desired!position!using!the!
mouse.!The!mouse!is!visualized!as!a!cross!with!surrounding!square.!The!color!of!
the!square!correlates!always!with!the!color!of!the!currently!selected!layer!(e.g.!in!
Figure!9,!layer!that!will!be!changed!is!ILM!shown!in!green!therefore!the!
surrounding!square!is!green!as!well).!
!
Additionally,!each!manual!segmentation!interaction!creates!and!item!on!the!
undo!stack!(shown!in!green!in!Figure!9).!You!can!use!this!to!undo!the!last!
potentially!faulty!manual!segmentations.!!
!
"Save!now"!allows!you!to!explicitly!store!the!refined!segmentation!result.!Manual!
changes!in!the!slice!viewer!always!affects!the!current!slice!only!\!this!means!if!
you!want!to!propagate!the!changes!to!the!adjacent!slices!as!well!you!have!to!
repeat!the!manual!refinement!for!each!affected!slice.!
!
!
Figure!9:!Manual!S eg mentation!Screen!
!
C0"4+(030&'4$
Section(Measurements(
!
Figure!10:!Section!Meas u r ement!Screen!
The!section!measurement!uses!an!existing!segmentation!to!perform!
measurements!on!the!currently!displayed!slice!out!of!the!slice!stack.!If!you!
change!the!slice!(using!the!slice!selection,!highlighted!in!green!in!Figure!10)!the!
measurements!will!be!updated.!The!section!measurements!are!grouped!in!four!
individual!measurement!scopes!(see!the!four!group!boxes!located!in!the!lower!
half!of!the!main!screen):!!
1. Average!Measurements:!Average!distance!measurements!over!the!
complete!segmentation!of!the!current!slice.!!!!
2. Fovea!Measurements:!Punctual!distance!measurement!at!the!fovea.!The!
position!where!the!current!fovea!measurement!is!assessed!is!indicated!
with!a!grey!vertical!line!(see!yellow!arrow!in!Figure!10).!!The!horizontal!
position!of!the!line!can!be!adjusted!using!the!spin\box!entitled!“Fovea”!
(yellow!arrow!in!Figure!10).!!!!
3. Area!Measurements:!Area!measurement!is!an!average!distance!
measurement!covering!only!the!area!with!the!semi!transparent!colored!
overlay.!The!width!of!the!area!can!be!controlled!with!blue!highlighted!
spin\box!entitled!“Range!X”!(see!Figure!10).!The!area!is!always!centered!
around!the!fovea!measurement!line!shown!in!gray.!This!means!you!can!
move!the!measured!area!horizontally!by!changing!the!Fovea!position!
(see!previous!point).!If!you!move!the!area!or!change!the!width!the!values!
are!updated!automatically.!!!!!
4. Cursor!Measurements:!Assesses!the!current!layer!thicknesses!at!the!
position!of!the!cursor!(cursor!position!indicated!by!the!gray!line!passing!
vertically!across!the!whole!image).!If!you!move!the!cursor!the!values!are!
updated!automatically.!
The!units!for!all!shown!measurements!are!μm.!!In!each!of!the!four!groups!the!
field!complete!retina!gives!the!overall!height!of!the!retina.!The!color\coding!
shown!in!the!image!view!correlates!with!the!with!background!color!in!the!
individual!fields.!!!!
Volume(Measurements(
!
still!to!come...!
Reflectivity(Measurements(
!
still!to!come...!
!
!
D-4+"#-E"'-)&$$
Is!just!a!3D!viewer!with!some!interactions!like!rotation,!zoom,!pan!that!shows!
the!relation!of!the!localizer!image,!the!OCT!slides,!the!segmented!contours!
(shown!as!surfaces)!and!eventually!a!loaded!Flio!Image.!See!Figure!11!for!details.!
!
Layer!visibility!can!be!toggled,!flio!image!position!can!changed!(just!the!z\axis).!
You!can!browse!through!the!OCT!Slices!using!the!slider. !
!
!
Figure!11:!3D!Visualiza tio n !Mode!
!
!