(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.4' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 169695, 3955] NotebookOptionsPosition[ 166466, 3859] NotebookOutlinePosition[ 166814, 3874] CellTagsIndexPosition[ 166771, 3871] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[TextData[StyleBox["Author: Antonetta Brigitte Cornelia Buskermolen, \ 2017-2018\nCopyright: University of Technology Eindhoven 2018", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.727593704677515*^9, 3.727593737883515*^9}, {3.728122228669883*^9, 3.7281222504496827`*^9}, { 3.728122413061283*^9, 3.7281224253232827`*^9}, {3.7281224625692825`*^9, 3.728122497953283*^9}, {3.7282078177228575`*^9, 3.728207825017457*^9}}], Cell[BoxData[{ RowBox[{"ClearAll", "[", "\"\\"", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"$HistoryLength", "=", "1"}], ";"}], "\n", RowBox[{ RowBox[{"ClearSystemCache", "[", "]"}], ";"}]}], "Input"], Cell[BoxData[ StyleBox[ RowBox[{"Declare", " ", RowBox[{"variables", ":"}]}], "Subsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]]], "Input", CellChangeTimes->{{3.6695396199486775`*^9, 3.6695396199486775`*^9}, { 3.7274989541764183`*^9, 3.727498954646418*^9}, 3.727593685153515*^9}], Cell[TextData[StyleBox["In factor you can change the # um/pixel, which \ depends on the type of microscope and objective you use.", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.727593704677515*^9, 3.727593737883515*^9}, {3.728194031461685*^9, 3.728194033568685*^9}, 3.7282078337164574`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"GraphicsGrid", "[", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"Button", "[", RowBox[{"\"\<10xaxio\>\"", ",", RowBox[{"factor", "=", "1.059"}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\<20xaxio\>\"", ",", RowBox[{"factor", "=", "0.53"}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\<40xaxio\>\"", ",", RowBox[{"factor", "=", "0.266"}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\<100xaxio\>\"", ",", RowBox[{"factor", "=", "0.105"}]}], "]"}]}], "}"}], "}"}], "]"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.585769452546976*^9, 3.5857694533998537`*^9}, { 3.6138919431081243`*^9, 3.613892082276616*^9}, {3.6138921507142553`*^9, 3.6138921512290583`*^9}, {3.615103567290924*^9, 3.615103623794849*^9}, { 3.6158061285906305`*^9, 3.6158062060476236`*^9}, {3.6158062416472797`*^9, 3.6158062542210407`*^9}, {3.6158062853776407`*^9, 3.615806309144746*^9}, { 3.615806344057994*^9, 3.615806372903764*^9}, 3.615806479526145*^9, { 3.618136137541029*^9, 3.6181361385791326`*^9}, {3.6181362980980825`*^9, 3.61813631717199*^9}, {3.6222791840824356`*^9, 3.622279184831236*^9}, { 3.6222793235620356`*^9, 3.622279345199236*^9}, {3.6223448454137955`*^9, 3.6223448459285955`*^9}, {3.622344902119796*^9, 3.6223449025877953`*^9}, { 3.622344947749796*^9, 3.6223449556433954`*^9}, 3.622345228097396*^9, { 3.622345314755396*^9, 3.6223453151609955`*^9}, {3.622345397468796*^9, 3.6223454236897955`*^9}, 3.622345491829796*^9, 3.6223469496503954`*^9, { 3.622351814440796*^9, 3.6223518250157957`*^9}, {3.6223670599731956`*^9, 3.6223670783231955`*^9}, {3.6227841073246737`*^9, 3.622784110235674*^9}, { 3.622784233932674*^9, 3.622784235140674*^9}, {3.623131847227927*^9, 3.623131847446327*^9}, {3.6233934954628553`*^9, 3.623393496586048*^9}, { 3.6463682705073504`*^9, 3.6463682752341504`*^9}, {3.6463683876055503`*^9, 3.6463684019263506`*^9}, {3.650778320511841*^9, 3.650778320823841*^9}, { 3.6518994646568785`*^9, 3.651899465311878*^9}, {3.669977199489208*^9, 3.6699772012051973`*^9}, {3.675402179953863*^9, 3.6754022943033285`*^9}, { 3.67540233729748*^9, 3.675402338997902*^9}, {3.67783167875183*^9, 3.67783167932903*^9}, {3.678525930695491*^9, 3.678525931744684*^9}, { 3.6805202657894025`*^9, 3.680520267349393*^9}, {3.6823238476487713`*^9, 3.6823238484921713`*^9}, {3.6839728598697243`*^9, 3.6839728747833242`*^9}, {3.690091753932908*^9, 3.690091754924898*^9}, { 3.709453815631341*^9, 3.7094538158913383`*^9}}], Cell[BoxData[ GraphicsBox[{{}, {InsetBox[ ButtonBox["\<\"10xaxio\"\>", Appearance->Automatic, ButtonFunction:>($CellContext`factor = 1.059), Evaluator->Automatic, Method->"Preemptive"], {194.4, -189.}, { Center, Center}, {360.00000000000006, 360.}], InsetBox[ ButtonBox["\<\"20xaxio\"\>", Appearance->Automatic, ButtonFunction:>($CellContext`factor = 0.53), Evaluator->Automatic, Method->"Preemptive"], {583.2, -189.}, { Center, Center}, {360.00000000000006, 360.}], InsetBox[ ButtonBox["\<\"40xaxio\"\>", Appearance->Automatic, ButtonFunction:>($CellContext`factor = 0.266), Evaluator->Automatic, Method->"Preemptive"], {972., -189.}, {Center, Center}, {360., 360.}], InsetBox[ ButtonBox["\<\"100xaxio\"\>", Appearance->Automatic, ButtonFunction:>($CellContext`factor = 0.105), Evaluator->Automatic, Method->"Preemptive"], {1360.8000000000002, -189.}, { Center, Center}, {359.9999999999998, 360.}]}, {}}, ContentSelectable->True, PlotRangePadding->{6, 5}]], "Output", CellChangeTimes->{{3.6900917560688868`*^9, 3.690091761070837*^9}, 3.6913020037049294`*^9, 3.6913023808695664`*^9, 3.6913028183328314`*^9, 3.6930471934908605`*^9, 3.6930474024062853`*^9, 3.693048166586904*^9, 3.6930483183815994`*^9, 3.6930491897612057`*^9, 3.693050004003375*^9, 3.695036882181244*^9, 3.6962279437786093`*^9, 3.696230744024787*^9, 3.696662101850294*^9, 3.6966673157814293`*^9, {3.696667688802952*^9, 3.6966676921257305`*^9}, 3.696667780655163*^9, 3.6966684872383146`*^9, 3.6966685645258136`*^9, 3.6966686551924324`*^9, 3.696668768229308*^9, 3.6966690635542927`*^9, 3.6979489966613812`*^9, 3.6979496991389008`*^9, { 3.6979498440903835`*^9, 3.697949847709491*^9}, 3.6979502875111585`*^9, 3.6979507153526464`*^9, {3.6979510793374014`*^9, 3.697951082519781*^9}, 3.697951634893818*^9, 3.697951798306327*^9, 3.697952054259035*^9, 3.6979521298093505`*^9, 3.6979526496880903`*^9, 3.697952899361858*^9, 3.6979535151006827`*^9, 3.697953650944612*^9, 3.6979537966380725`*^9, 3.6979543504571285`*^9, 3.697954493165544*^9, 3.697954647024399*^9, 3.699252572959798*^9, 3.69925407398843*^9, 3.709453811251384*^9, 3.709453893711584*^9, 3.719900250054196*^9, 3.7199005999932027`*^9, 3.7199022248173904`*^9, 3.7281277781500826`*^9, 3.728189767627885*^9, 3.7281905524978848`*^9, 3.728193222234085*^9}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Import images one map:", FontColor->RGBColor[1, 0, 0]]], "Subsection", CellChangeTimes->{{3.6754032761344724`*^9, 3.6754032847158175`*^9}}], Cell[TextData[{ StyleBox["In", Background->RGBColor[1, 0.9, 0.8]], StyleBox[" ", FontSlant->"Italic", Background->RGBColor[1, 0.9, 0.8]], StyleBox["dir", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[" you can put the folder of interest, in this particular example we \ extract the data from all the merged images (=imagestotal),\nimages of the \ actin cytoskeleton (=imagesactin), nucleus =(imagesnucleus), and focal \ adhesions (=imagesfocaladhesions). ", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.727593704677515*^9, 3.727593737883515*^9}, {3.7280226108457413`*^9, 3.7280227627053413`*^9}, { 3.7280230153409414`*^9, 3.728023021474141*^9}, {3.728194039260685*^9, 3.728194048621685*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ "dir", "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"files", "=", RowBox[{"FileNames", "[", RowBox[{"\"\<*.tif\>\"", ",", "dir"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberoffiles", "=", RowBox[{"Length", "[", "files", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"alldata", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Import", "[", RowBox[{"files", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "numberoffiles"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberofpositions", "=", RowBox[{ RowBox[{"Length", "[", "files", "]"}], "/", "4"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"imagesactin", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"alldata", "[", RowBox[{"[", RowBox[{"2", "+", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "*", "4"}], ")"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberofpositions"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"imagesnucleus", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"alldata", "[", RowBox[{"[", RowBox[{"3", "+", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "*", "4"}], ")"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberofpositions"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"imagesfocal", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"alldata", "[", RowBox[{"[", RowBox[{"4", "+", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "*", "4"}], ")"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberofpositions"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"imagestotal", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"alldata", "[", RowBox[{"[", RowBox[{"1", "+", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}], "*", "4"}], ")"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "numberofpositions"}], "}"}]}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.6695455700513334`*^9, 3.6695455903939333`*^9}, { 3.6749771703017783`*^9, 3.6749771771969347`*^9}, {3.6749772781450744`*^9, 3.674977279761074*^9}, {3.674978753933189*^9, 3.674978773342264*^9}, { 3.674978888828325*^9, 3.6749789040070276`*^9}, {3.6749792743755455`*^9, 3.674979299647546*^9}, {3.6749793820307455`*^9, 3.6749795321247454`*^9}, 3.6749796140685453`*^9, {3.6749802606880455`*^9, 3.674980363601246*^9}, { 3.6749804079192457`*^9, 3.6749804427381988`*^9}, {3.674980535178796*^9, 3.6749805997971673`*^9}, {3.674980633585561*^9, 3.674980744804473*^9}, { 3.674980797172179*^9, 3.6749808024293456`*^9}, {3.674980835152336*^9, 3.674980842733887*^9}, {3.6749808960707455`*^9, 3.6749808969131403`*^9}, { 3.6749809830797863`*^9, 3.674980989694544*^9}, {3.6749811088448753`*^9, 3.6749811163328753`*^9}, {3.674981256741175*^9, 3.6749813047943754`*^9}, { 3.674981352109175*^9, 3.674981422023775*^9}, {3.674986811892405*^9, 3.6749870412668047`*^9}, 3.6754023470632052`*^9, 3.675402585870489*^9, { 3.6762765119428444`*^9, 3.676276519555498*^9}, {3.6774736332614684`*^9, 3.6774736368338*^9}, {3.6780164889072495`*^9, 3.678016490014849*^9}, { 3.678074760758232*^9, 3.6780747728661547`*^9}, 3.6780748505748496`*^9, { 3.6780749157486286`*^9, 3.6780749217137904`*^9}, 3.6780896876376443`*^9, { 3.678090261097684*^9, 3.6780902780391755`*^9}, {3.6781686366418085`*^9, 3.678168654519294*^9}, {3.6784385123233566`*^9, 3.678438519462367*^9}, { 3.678438653726573*^9, 3.6784386822426248`*^9}, {3.6785050630284452`*^9, 3.678505064278447*^9}, {3.6785088414670057`*^9, 3.6785088439970093`*^9}, { 3.678515265613536*^9, 3.6785153149318705`*^9}, {3.6785203500118027`*^9, 3.6785203501522017`*^9}, {3.678521348153744*^9, 3.6785213483409367`*^9}, { 3.6785224305332537`*^9, 3.678522431391243*^9}, {3.678522465018613*^9, 3.678522466562993*^9}, {3.678525481935187*^9, 3.67852548294918*^9}, { 3.678525553840523*^9, 3.678525554872116*^9}, {3.678525828360347*^9, 3.678525828658745*^9}, {3.6785258805624127`*^9, 3.6785258872365704`*^9}, { 3.678704375042747*^9, 3.678704381298347*^9}, {3.6791332391955853`*^9, 3.6791332610245852`*^9}, {3.6791388834378853`*^9, 3.6791388991626854`*^9}, {3.679139112990085*^9, 3.679139165967685*^9}, 3.679140370588785*^9, {3.679206184261981*^9, 3.6792061993627806`*^9}, 3.6797412821413264`*^9, 3.68032275361476*^9, {3.6803356857100673`*^9, 3.68033568599286*^9}, 3.680335716814303*^9, 3.6804303347862253`*^9, 3.680494287184824*^9, 3.6804962276406603`*^9, {3.680500105631486*^9, 3.680500106286682*^9}, {3.680501939153181*^9, 3.6805019402451744`*^9}, { 3.680520273199355*^9, 3.680520281592101*^9}, {3.680839656546915*^9, 3.680839660602863*^9}, {3.6808465575675545`*^9, 3.680846562325494*^9}, 3.681717928061426*^9, {3.681719218857826*^9, 3.6817192206830263`*^9}, 3.681725887989995*^9, 3.681727622210685*^9, {3.681727782991469*^9, 3.6817277845670385`*^9}, 3.6817285883437605`*^9, 3.6817301448759604`*^9, { 3.6820579458593884`*^9, 3.6820579494941883`*^9}, 3.6820611773090925`*^9, 3.68206313886764*^9, 3.68206391046284*^9, 3.6820646568380585`*^9, 3.682067306024548*^9, 3.682067695326548*^9, 3.682068896760106*^9, 3.6820698720596933`*^9, {3.6820699388100934`*^9, 3.682069940432493*^9}, 3.6820701403624935`*^9, 3.6821352670869665`*^9, 3.6821363396472836`*^9, 3.6821517122129574`*^9, 3.6821532508307266`*^9, 3.682155161559327*^9, 3.6821585084249725`*^9, {3.682223777302808*^9, 3.6822237907500076`*^9}, 3.682224576316999*^9, 3.6822256077999263`*^9, 3.6822270991165934`*^9, 3.682227762267804*^9, {3.6822280120900345`*^9, 3.682228014629958*^9}, { 3.6822284509470196`*^9, 3.682228474086788*^9}, 3.6822312658424883`*^9, 3.6823213626500144`*^9, 3.6823216452700143`*^9, 3.6823224492785144`*^9, { 3.6823229084385147`*^9, 3.6823229086257143`*^9}, 3.682323084535863*^9, 3.682324778645871*^9, 3.682329643962463*^9, 3.682398875900419*^9, 3.6824230684227133`*^9, 3.6826557181006556`*^9, 3.6826572511522274`*^9, 3.6826588788752785`*^9, 3.6826780322589483`*^9, 3.6826785567566347`*^9, 3.682756639468384*^9, 3.6827579871195216`*^9, 3.682760170968322*^9, 3.682760882046338*^9, 3.6833427284439383`*^9, {3.683343549140617*^9, 3.6833435509033833`*^9}, 3.6833444938301926`*^9, 3.683432037503986*^9, 3.6834325105030193`*^9, 3.683432942929279*^9, 3.683433327943079*^9, 3.683433752736679*^9, 3.683966637279199*^9, 3.6839674291396384`*^9, 3.683971849785324*^9, 3.687164849946743*^9, 3.687165141337015*^9, 3.6872632596497583`*^9, {3.687677553916587*^9, 3.6876775600005865`*^9}, 3.6876839696863766`*^9, 3.6877572654213457`*^9, 3.6877603961534777`*^9, { 3.687857802904566*^9, 3.6878578713935657`*^9}, 3.6878600747385197`*^9, 3.6878613012008333`*^9, 3.6882104030597486`*^9, 3.688289859008692*^9, 3.688291965875803*^9, {3.6882931674175234`*^9, 3.6882931726874714`*^9}, 3.6882949392997265`*^9, 3.6882955633198195`*^9, {3.6882956192592626`*^9, 3.688295620319252*^9}, 3.6882964460533094`*^9, {3.6882965817499633`*^9, 3.6882965826309547`*^9}, 3.6882969244064813`*^9, 3.6899347121705275`*^9, 3.6899411490497217`*^9, {3.690091387063424*^9, 3.69009138815541*^9}, 3.6913020143126574`*^9, 3.693047205830737*^9, 3.6930481634869347`*^9, { 3.6930491849411097`*^9, 3.6930492099396105`*^9}, {3.6950369288019753`*^9, 3.695036931921955*^9}, 3.6962279374617834`*^9, {3.696230735662938*^9, 3.6962307358959336`*^9}, {3.6966621018602934`*^9, 3.696662120944459*^9}, 3.6966673109454603`*^9, 3.6966684842431335`*^9, {3.696669060590293*^9, 3.6966690609334927`*^9}, 3.697948993573591*^9, 3.6979510763266206`*^9, 3.697951631383998*^9, 3.6979520341663637`*^9, 3.6979526470673575`*^9, 3.6979535123395004`*^9, 3.69795379387689*^9, 3.6979543479143286`*^9, 3.6992525698904915`*^9, 3.6992540685907955`*^9, 3.7094538080704155`*^9, 3.7199002472790136`*^9, 3.7199022222021904`*^9, 3.7281277747758827`*^9, { 3.728193033421085*^9, 3.728193064555085*^9}, 3.728193237396085*^9}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Remove background and adjust image:", FontColor->RGBColor[1, 0, 0]]], "Subsection", CellChangeTimes->{{3.644055977569062*^9, 3.644055985322262*^9}, { 3.644056033417062*^9, 3.644056038705462*^9}, {3.64405684265491*^9, 3.644056852108268*^9}, {3.6487931864576793`*^9, 3.648793210637679*^9}, { 3.6695398168089485`*^9, 3.669539820724473*^9}, {3.67783126973703*^9, 3.6778312780674305`*^9}}], Cell[TextData[StyleBox["This part is used to remove the background from the \ images. ", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.727593704677515*^9, 3.727593737883515*^9}, {3.7280226108457413`*^9, 3.7280227627053413`*^9}, { 3.7280230153409414`*^9, 3.728023021474141*^9}, {3.728194039260685*^9, 3.728194073696685*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"transformactin", "=", RowBox[{ RowBox[{ RowBox[{"ImageAdjust", "[", "#", "]"}], "&"}], "/@", "imagesactin"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"transformnucleus", "=", RowBox[{ RowBox[{ RowBox[{"ImageAdjust", "[", "#", "]"}], "&"}], "/@", "imagesnucleus"}]}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"removebackgroundactin", "=", RowBox[{ RowBox[{ RowBox[{"TopHatTransform", "[", RowBox[{"#", ",", "150"}], "]"}], "&"}], "/@", "transformactin"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"removebackgroundnucleus", "=", RowBox[{ RowBox[{ RowBox[{"TopHatTransform", "[", RowBox[{"#", ",", "100"}], "]"}], "&"}], "/@", "transformnucleus"}]}], ";"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{"tophattransformfocal", "=", RowBox[{ RowBox[{ RowBox[{"TopHatTransform", "[", RowBox[{"#", ",", RowBox[{"DiskMatrix", "[", "40", "]"}]}], "]"}], "&"}], "/@", "imagesfocal"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Medianfilterred7", "=", RowBox[{ RowBox[{ RowBox[{"MedianFilter", "[", RowBox[{"#", ",", "7"}], "]"}], "&"}], "/@", "tophattransformfocal"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"removebackground7", "=", RowBox[{ RowBox[{ RowBox[{"Image", "[", RowBox[{ RowBox[{"ImageData", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "-", RowBox[{"ImageData", "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"tophattransformfocal", ",", "Medianfilterred7"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"actinadjusted", "=", "removebackgroundactin"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nucleusadjusted", "=", "removebackgroundnucleus"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"focaladjusted", "=", "removebackground7"}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.6899397366692934`*^9, 3.6899397438291883`*^9}, { 3.697953523477829*^9, 3.6979535243514233`*^9}, {3.7274982340100183`*^9, 3.727498351139018*^9}, 3.7274989828698177`*^9, {3.727501596266018*^9, 3.727501776837818*^9}, {3.727501813575018*^9, 3.7275018310268183`*^9}, 3.7281279609456825`*^9, 3.728189903191085*^9, {3.728193071455085*^9, 3.728193077941085*^9}}], Cell[BoxData[ StyleBox[ RowBox[{"Binarize", " ", RowBox[{ StyleBox[ RowBox[{"i", StyleBox[ StyleBox[ StyleBox["m", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "ag", StyleBox["e", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], StyleBox[ StyleBox["s", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]]}]], ":", " "}]}], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]]], "Input", CellChangeTimes->{{3.6695466254587803`*^9, 3.6695466267223806`*^9}, { 3.6778312852746305`*^9, 3.67783128695943*^9}, {3.727499018607418*^9, 3.727499021599018*^9}}], Cell[TextData[StyleBox["This part is used to binarize the images. ", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.727593704677515*^9, 3.727593737883515*^9}, {3.7280226108457413`*^9, 3.7280227627053413`*^9}, { 3.7280230153409414`*^9, 3.728023021474141*^9}, {3.728194039260685*^9, 3.728194096769685*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"binblue", "=", RowBox[{ RowBox[{ RowBox[{"Binarize", "[", RowBox[{"Erosion", "[", RowBox[{ RowBox[{"FillingTransform", "[", RowBox[{"Dilation", "[", RowBox[{"#", ",", "1"}], "]"}], "]"}], ",", "1"}], "]"}], "]"}], "&"}], "/@", "nucleusadjusted"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"binactin", "=", RowBox[{ RowBox[{ RowBox[{"DeleteSmallComponents", "[", RowBox[{ RowBox[{"MorphologicalBinarize", "[", RowBox[{"Erosion", "[", RowBox[{ RowBox[{"FillingTransform", "[", RowBox[{"Dilation", "[", RowBox[{"#", ",", "1"}], "]"}], "]"}], ",", "1"}], "]"}], "]"}], ",", RowBox[{"Method", "->", "\"\\""}]}], "]"}], "&"}], "/@", " ", "actinadjusted"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"quantifyfocal7", "=", RowBox[{ RowBox[{ RowBox[{"Binarize", "[", "#", "]"}], "&"}], "/@", "removebackground7"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"imageadhesions7", "=", RowBox[{ RowBox[{ RowBox[{"Colorize", "[", RowBox[{"MorphologicalComponents", "[", "#", "]"}], "]"}], "&"}], "/@", "quantifyfocal7"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"composefocal", "=", RowBox[{ RowBox[{ RowBox[{"ImageCompose", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"RemoveBackground", "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"imagesfocal", ",", "imageadhesions7"}], "}"}], "]"}]}]}]}], "Input", CellChangeTimes->{{3.675496165993503*^9, 3.6754962268023033`*^9}, { 3.6754963628525033`*^9, 3.675496424164503*^9}, {3.6754964798811035`*^9, 3.675496500302503*^9}, {3.6754973686983576`*^9, 3.675497379468357*^9}, { 3.6754975096793575`*^9, 3.6754975401993575`*^9}, {3.675497596204357*^9, 3.6754975977943573`*^9}, {3.6754977756468573`*^9, 3.6754977777568574`*^9}, {3.6754978747648573`*^9, 3.6754981011758575`*^9}, 3.6754981346698575`*^9, {3.6754989890172415`*^9, 3.6754989906672907`*^9}, { 3.6755078515839577`*^9, 3.675507913529617*^9}, {3.675509068597017*^9, 3.6755091140016165`*^9}, {3.676266832338348*^9, 3.676266868826748*^9}, { 3.676267332094492*^9, 3.676267332843263*^9}, 3.6762764849085646`*^9, { 3.677384458473782*^9, 3.677384614567382*^9}, {3.677384950654546*^9, 3.677384979375496*^9}, {3.677920739487779*^9, 3.6779207692413654`*^9}, { 3.6780168929942493`*^9, 3.678016900232649*^9}, {3.678438757022773*^9, 3.6784388007728395`*^9}, {3.6784392541112537`*^9, 3.678439260242262*^9}, { 3.6784402619482307`*^9, 3.678440390936415*^9}, {3.678440653424801*^9, 3.678440654204802*^9}, {3.6785157914576283`*^9, 3.6785158131727643`*^9}, { 3.6785158490215645`*^9, 3.6785158589431643`*^9}, {3.6785158898779645`*^9, 3.6785158913287644`*^9}, {3.678521562846884*^9, 3.678521618827531*^9}, { 3.6785216791600595`*^9, 3.678521722858819*^9}, {3.6785226574311695`*^9, 3.6785226681795*^9}, {3.678525684280671*^9, 3.6785257169338627`*^9}, { 3.6785258206011963`*^9, 3.6785258210223937`*^9}, {3.679206545155881*^9, 3.679206555295881*^9}, {3.6792066231518517`*^9, 3.6792066253044586`*^9}, { 3.6792879163033895`*^9, 3.679287917426589*^9}, 3.6792879780447893`*^9, 3.6792880371895895`*^9, 3.6792880840561895`*^9, {3.679288114109789*^9, 3.6792881521651893`*^9}, {3.679288211125389*^9, 3.679288211858589*^9}, { 3.6792882511124744`*^9, 3.6792883074443913`*^9}, {3.6792894265023966`*^9, 3.679289431287713*^9}, {3.679741428386836*^9, 3.6797414680553474`*^9}, 3.6797415211702833`*^9, 3.679741588839179*^9, {3.6797422755551786`*^9, 3.6797422961647787`*^9}, {3.6797423296891785`*^9, 3.679742347582379*^9}, { 3.6797424002207785`*^9, 3.6797424215635786`*^9}, {3.6797424646527786`*^9, 3.679742491127979*^9}, {3.679742618447579*^9, 3.679742709771979*^9}, { 3.679742790515379*^9, 3.679742892516179*^9}, {3.679742944544179*^9, 3.679742963420179*^9}, {3.679743092377679*^9, 3.679743097240679*^9}, { 3.679743632307579*^9, 3.679743687500179*^9}, {3.6797437427339787`*^9, 3.6797440100613785`*^9}, {3.6797440477959785`*^9, 3.6797440510945787`*^9}, {3.679744301830279*^9, 3.6797443734442787`*^9}, { 3.679744404962279*^9, 3.679744554048279*^9}, {3.679810445549386*^9, 3.6798104929259787`*^9}, {3.6798193925850286`*^9, 3.6798193935366287`*^9}, {3.6798219238182287`*^9, 3.679821927370428*^9}, { 3.679822000318528*^9, 3.6798220097253284`*^9}, {3.6798220400139284`*^9, 3.6798220761047287`*^9}, {3.6798221191425285`*^9, 3.679822188845128*^9}, { 3.6798294118600025`*^9, 3.6798294332476025`*^9}, {3.6798295326352024`*^9, 3.6798295444756026`*^9}, {3.680323100523656*^9, 3.6803231060300674`*^9}, { 3.680329526377404*^9, 3.6803295409210043`*^9}, {3.6803296807440042`*^9, 3.6803297042960043`*^9}, {3.6803299905286045`*^9, 3.6803300610506077`*^9}, {3.6804944034120646`*^9, 3.680494432118041*^9}, { 3.680494556145897*^9, 3.6804945599204917`*^9}, {3.680497249366089*^9, 3.680497265464876*^9}, {3.680497328378063*^9, 3.6804973358970704`*^9}, { 3.6805023130769043`*^9, 3.6805023347447834`*^9}, {3.68206395720044*^9, 3.68206404367124*^9}, {3.6820642875700397`*^9, 3.6820642891612244`*^9}, { 3.6821348066119666`*^9, 3.6821348377189665`*^9}, {3.6821378456180677`*^9, 3.6821378516239133`*^9}, {3.6821378965819607`*^9, 3.682137903476984*^9}, { 3.6821518294845576`*^9, 3.6821518417461576`*^9}, {3.682153340639927*^9, 3.6821533520435266`*^9}, {3.6823224693557143`*^9, 3.6823224902909145`*^9}, {3.6823225450313144`*^9, 3.6823225791173143`*^9}, {3.6823284346921625`*^9, 3.6823285247041626`*^9}, 3.6876776860329866`*^9, {3.6876777183093867`*^9, 3.6876777194013867`*^9}, { 3.68775729471777*^9, 3.6877573023772717`*^9}, {3.688290089789846*^9, 3.688290091209473*^9}, {3.6899401739418488`*^9, 3.6899401751898165`*^9}, { 3.690091778118667*^9, 3.6900917790606575`*^9}, {3.693047227333522*^9, 3.693047233023465*^9}, 3.6930482691680913`*^9, {3.6962281690933948`*^9, 3.6962281743672447`*^9}, {3.696228205235449*^9, 3.696228234463625*^9}, { 3.697950318305558*^9, 3.6979503249511585`*^9}, {3.697950375120758*^9, 3.6979504150243783`*^9}, {3.697950452040805*^9, 3.6979505565229073`*^9}, { 3.697953547517275*^9, 3.697953549654461*^9}, {3.697953823220302*^9, 3.697953829928259*^9}, {3.6979544231531286`*^9, 3.697954426912729*^9}, 3.6992541118443832`*^9, {3.7274983585240183`*^9, 3.7274983602314177`*^9}, { 3.727501834054618*^9, 3.727501849105418*^9}, {3.727590609000715*^9, 3.727590670322915*^9}, {3.728030394676341*^9, 3.7280303954763412`*^9}, { 3.728128192094883*^9, 3.728128196297083*^9}, {3.728128229116083*^9, 3.728128257996683*^9}, {3.728189915390285*^9, 3.728189932473085*^9}, { 3.728193080702085*^9, 3.7281930813250847`*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox["Crop", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], " ", RowBox[{ StyleBox[ RowBox[{"i", StyleBox[ StyleBox[ StyleBox["m", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "ag", StyleBox["e", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], StyleBox[ StyleBox["s", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]]}]], ":", " "}]}], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]]], "Input", CellChangeTimes->{{3.6792875190888844`*^9, 3.6792875198064795`*^9}, { 3.727499010952818*^9, 3.727499016615818*^9}}], Cell[TextData[{ StyleBox["You can use this part to crop the images, when you have a border \ surrounding the images. In ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["border", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[" ", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox["you can change the number of pixels you want to remove from the \ images. ", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.727593704677515*^9, 3.727593737883515*^9}, {3.7280226108457413`*^9, 3.7280227627053413`*^9}, { 3.7280230153409414`*^9, 3.728023021474141*^9}, {3.728194039260685*^9, 3.728194137120685*^9}, {3.728194186880685*^9, 3.728194226633685*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"border", "=", "5"}], ";"}], "\n", RowBox[{ RowBox[{"Crop", "[", RowBox[{"img_", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"dxl_", ",", "dxr_"}], "}"}], ",", RowBox[{"{", RowBox[{"dyl_", ",", "dyu_"}], "}"}]}], "}"}]}], "]"}], ":=", RowBox[{"ImageTake", "[", RowBox[{"img", ",", RowBox[{"{", RowBox[{"dyl", ",", RowBox[{"-", "dyu"}]}], "}"}], ",", RowBox[{"{", RowBox[{"dxl", ",", RowBox[{"-", "dxr"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"actincrop", "=", RowBox[{ RowBox[{ RowBox[{"Crop", "[", RowBox[{"#", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}], ",", RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}]}], "}"}]}], "]"}], "&"}], "/@", "binactin"}]}], "\[IndentingNewLine]", RowBox[{"cellcrop", "=", RowBox[{ RowBox[{ RowBox[{"Crop", "[", RowBox[{"#", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}], ",", RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}]}], "}"}]}], "]"}], "&"}], "/@", "actinadjusted"}]}], "\[IndentingNewLine]", RowBox[{"nucleuscrop", "=", RowBox[{ RowBox[{ RowBox[{"Crop", "[", RowBox[{"#", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}], ",", RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}]}], "}"}]}], "]"}], "&"}], "/@", "binblue"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"focalcrop", "=", RowBox[{ RowBox[{ RowBox[{"Crop", "[", RowBox[{"#", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}], ",", RowBox[{"{", RowBox[{"border", ",", "border"}], "}"}]}], "}"}]}], "]"}], "&"}], "/@", "quantifyfocal7"}]}], ";"}]}], "Input", CellChangeTimes->{{3.728194174746685*^9, 3.728194183939685*^9}}], Cell[CellGroupData[{ Cell[TextData[StyleBox["Multiple cells:", FontColor->RGBColor[1, 0, 0]]], "Subsubsection", CellChangeTimes->{{3.6804947560291853`*^9, 3.680494777041173*^9}, { 3.727517367687669*^9, 3.727517379746069*^9}}], Cell[TextData[{ StyleBox["This part is used for the analysis of multiple cells per image. To \ only analyze individual cells, which are not touching the image border, \nwe \ first need to segment all the cells in individual cells (based on watershed \ segmentation). For this we use the command ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["markergreenselect", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[",\n where you can adjust the number to find the correct markers \ for segmentation. In ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["areacell ", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[" you can change the number to remove small objects that fail the \ size criterion to be a single cell (objects smaller than 20 \[Micro]m^2) \n", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972309486124*^9, 3.683972384553324*^9}, { 3.727498426512018*^9, 3.727498428786018*^9}, {3.7280228179161415`*^9, 3.728022949689541*^9}, {3.7280230047737412`*^9, 3.7280230100097413`*^9}, { 3.728194253127685*^9, 3.728194257136685*^9}, {3.7281943073016853`*^9, 3.728194327943685*^9}, {3.7281943584736853`*^9, 3.728194383274685*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"marker", "=", "0.15"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"areacell", "=", RowBox[{"20", "/", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"disTgreenselect", "=", RowBox[{ RowBox[{ RowBox[{"ImageAdjust", "[", RowBox[{"DistanceTransform", "[", "#", "]"}], "]"}], "&"}], "/@", "actincrop"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"markergreenselect", "=", RowBox[{ RowBox[{ RowBox[{"MaxDetect", "[", RowBox[{"#", ",", "marker"}], "]"}], "&"}], "/@", "disTgreenselect"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"watershedComponentsgreenselect", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"WatershedComponents", "[", RowBox[{ RowBox[{"ColorNegate", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "*", RowBox[{"ImageData", "[", RowBox[{"#", "[", RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"disTgreenselect", ",", "markergreenselect", ",", "actincrop"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"imageselect", "=", RowBox[{ RowBox[{ RowBox[{"Colorize", "[", "#", "]"}], "&"}], "/@", "watershedComponentsgreenselect"}]}]}], "Input", CellChangeTimes->{{3.679134294131585*^9, 3.6791343214845853`*^9}, { 3.6791346517745852`*^9, 3.679134672229585*^9}, {3.6791347221065855`*^9, 3.6791347293465853`*^9}, 3.679135905272585*^9, {3.679140466729185*^9, 3.6791404719239855`*^9}, {3.6791405265903854`*^9, 3.6791405283375854`*^9}, {3.6791405603739853`*^9, 3.679140588393585*^9}, { 3.679206314135481*^9, 3.6792063151026807`*^9}, {3.679206347472681*^9, 3.679206406269081*^9}, 3.6792874857934403`*^9, {3.679287527060433*^9, 3.6792875858704557`*^9}, 3.679287762283126*^9, {3.6792895871982317`*^9, 3.6792895880216284`*^9}, {3.679741912899118*^9, 3.679741971169079*^9}, { 3.679742106540279*^9, 3.6797421090986786`*^9}, {3.6797421439042788`*^9, 3.6797421464470787`*^9}, {3.6797422489551787`*^9, 3.679742259188779*^9}, { 3.6797431525576787`*^9, 3.679743152972679*^9}, {3.679743193602679*^9, 3.679743195298679*^9}, {3.679743260750679*^9, 3.679743261158679*^9}, { 3.679743539110979*^9, 3.6797435395165787`*^9}, {3.679743581615379*^9, 3.6797435821145787`*^9}, {3.6797446291414785`*^9, 3.679744630701479*^9}, { 3.6798107715113277`*^9, 3.679810784896042*^9}, {3.6798196449281282`*^9, 3.6798196488801284`*^9}, {3.6798197419071283`*^9, 3.679819742371128*^9}, { 3.6798222495721283`*^9, 3.6798222516313286`*^9}, 3.6798234715129485`*^9, { 3.679823516934035*^9, 3.6798235186968346`*^9}, {3.679823551630435*^9, 3.6798235968100348`*^9}, {3.6798236639522347`*^9, 3.6798236645294347`*^9}, {3.6798237048154345`*^9, 3.679823711429835*^9}, { 3.679823785557435*^9, 3.679823786087835*^9}, {3.6798239188435345`*^9, 3.679823948545335*^9}, {3.6798240082517347`*^9, 3.6798240251383348`*^9}, { 3.679824099496335*^9, 3.6798241095185347`*^9}, {3.679824157408735*^9, 3.6798241582979345`*^9}, {3.679824463914835*^9, 3.6798245846336346`*^9}, { 3.679824621540635*^9, 3.679824623880635*^9}, {3.679824801366335*^9, 3.679824801675335*^9}, {3.6803233391181726`*^9, 3.680323339820154*^9}, { 3.6803295972596045`*^9, 3.6803296229692044`*^9}, 3.680330091035616*^9, { 3.6803301237350063`*^9, 3.680330167182728*^9}, {3.680335829955578*^9, 3.680335830735573*^9}, {3.6803358895359964`*^9, 3.680335916544423*^9}, { 3.680336536735736*^9, 3.680336570189136*^9}, {3.680337064685536*^9, 3.680337065824336*^9}, 3.680494794512165*^9, 3.6804948550834703`*^9, { 3.6804964082886605`*^9, 3.6804964274298606`*^9}, {3.6804969710770655`*^9, 3.680496974618061*^9}, {3.6804970585256205`*^9, 3.6804970942475595`*^9}, { 3.680497136755107*^9, 3.6804971381590257`*^9}, {3.680497169731604*^9, 3.6804972147194085`*^9}, {3.680497460132285*^9, 3.6804974624878244`*^9}, { 3.680497542014923*^9, 3.680497562918655*^9}, {3.680497595600236*^9, 3.6804976034313354`*^9}, {3.680497644084414*^9, 3.680497648935952*^9}, { 3.680497704689637*^9, 3.680497704892434*^9}, {3.6804977465907*^9, 3.680497746871496*^9}, {3.680497792656909*^9, 3.680497818708595*^9}, { 3.680498058335249*^9, 3.68049805891243*^9}, {3.6805003467239356`*^9, 3.6805003470983334`*^9}, 3.680502365164198*^9, {3.680502642719534*^9, 3.6805026581166353`*^9}, {3.680502697521982*^9, 3.6805026980523787`*^9}, { 3.680508080051507*^9, 3.680508080691103*^9}, {3.680520349046069*^9, 3.6805203622279844`*^9}, {3.6808401879671497`*^9, 3.6808401913056355`*^9}, {3.6808402641127024`*^9, 3.680840265048726*^9}, 3.680844812953416*^9, {3.680846975825186*^9, 3.6808469773227763`*^9}, { 3.6808472779270735`*^9, 3.680847299377761*^9}, {3.681726472381895*^9, 3.681726472584695*^9}, {3.6817296997199607`*^9, 3.6817297164399605`*^9}, { 3.6817302135669603`*^9, 3.6817302745019608`*^9}, {3.68206286946964*^9, 3.6820628711076403`*^9}, {3.68206302255604*^9, 3.68206302293044*^9}, { 3.68206330945544*^9, 3.68206333368224*^9}, {3.68206406048804*^9, 3.68206407050324*^9}, {3.682064869759347*^9, 3.6820648701805415`*^9}, { 3.6820651729448824`*^9, 3.682065173600078*^9}, {3.6820654386787825`*^9, 3.6820654391311827`*^9}, {3.6820655669887824`*^9, 3.6820655674567823`*^9}, {3.682067347302148*^9, 3.682067347707748*^9}, 3.6820674059113483`*^9, 3.682067814354548*^9, 3.6820693908054934`*^9, { 3.6820702392976933`*^9, 3.6820702399528933`*^9}, {3.682070584681693*^9, 3.6820705977544937`*^9}, 3.6821349137709665`*^9, {3.682135318403967*^9, 3.6821353190039663`*^9}, {3.6821353910799665`*^9, 3.6821353923199663`*^9}, {3.6821376109140143`*^9, 3.682137612240014*^9}, { 3.6821376695453825`*^9, 3.682137670106968*^9}, {3.68213780574549*^9, 3.6821378062290773`*^9}, {3.682137993815505*^9, 3.6821379983238764`*^9}, { 3.682152005195066*^9, 3.6821520331818247`*^9}, 3.6821534005439267`*^9, { 3.6821589097094727`*^9, 3.682158910411473*^9}, {3.6822238988424077`*^9, 3.682223923116008*^9}, {3.682224679505046*^9, 3.682224700657425*^9}, { 3.6822257880142975`*^9, 3.6822257920391235`*^9}, 3.6822271500190673`*^9, { 3.6822278134809628`*^9, 3.682227813964547*^9}, {3.6822286768783193`*^9, 3.682228678288333*^9}, {3.6822313154093704`*^9, 3.6822313160021667`*^9}, { 3.682321838497014*^9, 3.682321873721814*^9}, {3.6823219642242146`*^9, 3.682322028075014*^9}, {3.6823221520739145`*^9, 3.6823221783443146`*^9}, { 3.6823225115693145`*^9, 3.6823225225985146`*^9}, {3.6823226065421143`*^9, 3.6823226152313147`*^9}, {3.682322647648114*^9, 3.6823226548865147`*^9}, { 3.6823228369229145`*^9, 3.6823228486541147`*^9}, {3.6823229316357145`*^9, 3.6823229384061146`*^9}, {3.6823231297596827`*^9, 3.6823231301808777`*^9}, {3.6823233407470713`*^9, 3.682323364895871*^9}, { 3.6823234025230713`*^9, 3.6823234398694715`*^9}, {3.6823234867162714`*^9, 3.682323542860671*^9}, 3.6823240257203712`*^9, {3.682328828444163*^9, 3.6823288294893627`*^9}, {3.6823288647453628`*^9, 3.682328865119763*^9}, 3.6823302074520626`*^9, 3.682399216903759*^9, {3.682423146328236*^9, 3.682423164721518*^9}, 3.6824232307264953`*^9, {3.6826562315785656`*^9, 3.6826562321712594`*^9}, {3.682656563873503*^9, 3.682656564325883*^9}, { 3.6826782768862567`*^9, 3.682678279586022*^9}, {3.6826783241440506`*^9, 3.6826783567653303`*^9}, 3.6826788044214535`*^9, {3.682756773652384*^9, 3.6827567742593837`*^9}, {3.6833430805006857`*^9, 3.68334308092181*^9}, { 3.683343359264361*^9, 3.683343359545144*^9}, 3.6833448744023666`*^9, { 3.6834320955660696`*^9, 3.683432097921624*^9}, {3.683432966625679*^9, 3.683432970182479*^9}, {3.683433781987279*^9, 3.683433782814079*^9}, { 3.683966830586033*^9, 3.683966831366028*^9}, {3.6839719048845243`*^9, 3.6839719054773245`*^9}, {3.683972011448124*^9, 3.683972011666524*^9}, { 3.683972281827324*^9, 3.683972286460524*^9}, {3.6871656300079155`*^9, 3.687165694079014*^9}, {3.6871661013682065`*^9, 3.6871661231147456`*^9}, { 3.687166332769659*^9, 3.687166420597659*^9}, {3.6876777528165865`*^9, 3.6876777532533865`*^9}, {3.687684142097576*^9, 3.6876841433767767`*^9}, { 3.6878581164035654`*^9, 3.6878581521295657`*^9}, {3.6878601472110043`*^9, 3.687860147694598*^9}, {3.6878602689920435`*^9, 3.687860270084029*^9}, { 3.688288298065637*^9, 3.688288299516446*^9}, 3.6882883964713383`*^9, { 3.688288992656725*^9, 3.688288999941925*^9}, {3.688289030049925*^9, 3.688289030564725*^9}, {3.688290721779394*^9, 3.6882907223293943`*^9}, 3.688290781630394*^9, {3.688292538573612*^9, 3.688292539190606*^9}, 3.6882926266501427`*^9, 3.6882933753558764`*^9, {3.6882934250025425`*^9, 3.6882934264035287`*^9}, 3.688293505450754*^9, {3.688293646445797*^9, 3.688293647005791*^9}, 3.6882939585460024`*^9, 3.688294236200199*^9, { 3.688294327641342*^9, 3.6882943287874565`*^9}, {3.6882959281472034`*^9, 3.688295968262803*^9}, 3.6900915699786825`*^9, {3.6900917950274982`*^9, 3.690091805814391*^9}, {3.6930475510127974`*^9, 3.6930475515127926`*^9}, 3.6930501073693447`*^9, {3.6930501738579035`*^9, 3.6930501779478626`*^9}, 3.693050356889762*^9, {3.6930503944493866`*^9, 3.6930503949393816`*^9}, { 3.693050429215473*^9, 3.693050458395181*^9}, 3.696228335365942*^9, { 3.6966622321208243`*^9, 3.6966622328748064`*^9}, {3.697950067894875*^9, 3.6979500683004723`*^9}, {3.697950108610614*^9, 3.6979501102174034`*^9}, { 3.697950585349859*^9, 3.697950611961753*^9}, {3.6979508783216677`*^9, 3.697950907056131*^9}, {3.6979520776900845`*^9, 3.6979520837428455`*^9}, { 3.697952675614626*^9, 3.697952693351371*^9}, 3.6979527733466735`*^9, 3.6979530816929817`*^9, {3.6979531234853816`*^9, 3.6979531409105816`*^9}, { 3.697953561869183*^9, 3.697953588092615*^9}, {3.6979536227087927`*^9, 3.6979536768248463`*^9}, {3.697954525222722*^9, 3.6979545262522955`*^9}, { 3.6979546979726925`*^9, 3.6979547497945633`*^9}, {3.719900303507656*^9, 3.719900322949332*^9}, {3.727498412856618*^9, 3.727498435608018*^9}, { 3.728030419781541*^9, 3.728030432202741*^9}, {3.728192989929085*^9, 3.7281929981590853`*^9}, {3.7281942747766848`*^9, 3.7281942932236853`*^9}, {3.728194388338685*^9, 3.7281943885186853`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"selectallactin", "=", "imageselect"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"selectactinnocolour", "=", RowBox[{ RowBox[{ RowBox[{"Binarize", "[", "#", "]"}], "&"}], "/@", "selectallactin"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"selectactinold", "=", RowBox[{ RowBox[{ RowBox[{"SelectComponents", "[", RowBox[{"#", ",", "\"\\"", ",", RowBox[{ RowBox[{"#", "\[Equal]", "0"}], "&"}]}], "]"}], "&"}], "/@", "selectactinnocolour"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"selectactin", "=", RowBox[{ RowBox[{ RowBox[{"SelectComponents", "[", RowBox[{"#", ",", "\"\\"", ",", RowBox[{ RowBox[{ RowBox[{"areacell", "/", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}], "<", "#"}], "&"}]}], "]"}], "&"}], "/@", "selectactinold"}]}], "\[IndentingNewLine]", RowBox[{"selectcell", "=", RowBox[{ RowBox[{ RowBox[{"ImageMultiply", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"cellcrop", ",", "selectactin"}], "}"}], "]"}]}]}], "\n", RowBox[{"selectnucleus", "=", RowBox[{ RowBox[{ RowBox[{"FillingTransform", "[", RowBox[{"ImageMultiply", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"nucleuscrop", ",", "selectactin"}], "}"}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"selectfocal", "=", RowBox[{ RowBox[{ RowBox[{"FillingTransform", "[", RowBox[{"ImageMultiply", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"focalcrop", ",", "selectactin"}], "}"}], "]"}]}]}]}], "Input", CellChangeTimes->{{3.6754990755987377`*^9, 3.6754991095670776`*^9}, { 3.6754993388158774`*^9, 3.675499436148777*^9}, {3.675499605941777*^9, 3.675499636209777*^9}, 3.675499680702777*^9, {3.675500525386777*^9, 3.675500610379177*^9}, {3.675506737104888*^9, 3.675506759242288*^9}, { 3.6755069396760883`*^9, 3.6755070049524145`*^9}, {3.675507334402681*^9, 3.6755073826595364`*^9}, {3.6755074334425616`*^9, 3.67550750681001*^9}, { 3.6755076331265526`*^9, 3.675507636090515*^9}, {3.6755077259105663`*^9, 3.675507762898493*^9}, 3.675507808607107*^9, {3.6755079573318167`*^9, 3.675507967213417*^9}, {3.6755079986468167`*^9, 3.675508128935817*^9}, { 3.675508602845617*^9, 3.675508616891617*^9}, 3.676276475143152*^9, 3.6773848418081365`*^9, 3.6773887151628017`*^9, {3.67792082252322*^9, 3.677920834068922*^9}, {3.6779209321849155`*^9, 3.6779210617339582`*^9}, { 3.678439183922149*^9, 3.678439187235154*^9}, {3.678439375843441*^9, 3.678439381634449*^9}, 3.6785093483461676`*^9, 3.679134290956585*^9, 3.679135909130585*^9, {3.6791396927848854`*^9, 3.6791397025348854`*^9}, { 3.679139737213685*^9, 3.6791397691936855`*^9}, {3.679140496074785*^9, 3.6791404965271854`*^9}, {3.679140549974785*^9, 3.679140551565985*^9}, { 3.679140592527585*^9, 3.6791405934947853`*^9}, {3.679141047028085*^9, 3.679141100007685*^9}, {3.679141435933285*^9, 3.679141437820885*^9}, { 3.679287603301544*^9, 3.6792876102922993`*^9}, {3.6798198858193283`*^9, 3.6798198904433284`*^9}, {3.6798199302277284`*^9, 3.6798199342837286`*^9}, {3.679820448292528*^9, 3.6798205007923284`*^9}, { 3.6798205520939283`*^9, 3.6798205808363285`*^9}, {3.6798212567730284`*^9, 3.6798212889970284`*^9}, {3.679821411315628*^9, 3.679821463730028*^9}, { 3.6798214989096284`*^9, 3.679821506054428*^9}, {3.6798215779222283`*^9, 3.6798216687388287`*^9}, {3.679821805909828*^9, 3.6798218152248287`*^9}, { 3.679822377659728*^9, 3.679822391092328*^9}, {3.6798224339347286`*^9, 3.6798224345919285`*^9}, {3.680323368897809*^9, 3.680323375746033*^9}, 3.6803302063092766`*^9, {3.6803302460910215`*^9, 3.6803303133461905`*^9}, { 3.6803343897478*^9, 3.6803343900442*^9}, {3.6803345782868*^9, 3.680334604684*^9}, {3.6803348812432*^9, 3.6803349761068*^9}, { 3.6803350089136*^9, 3.680335071766*^9}, {3.680335111514274*^9, 3.6803351327442408`*^9}, {3.6803359479198217`*^9, 3.6803359483098197`*^9}, {3.68033606214069*^9, 3.680336068895447*^9}, { 3.680336494686336*^9, 3.680336523068136*^9}, {3.680336614395936*^9, 3.6803366679315357`*^9}, {3.680336950286736*^9, 3.680336988078936*^9}, { 3.6803370290347357`*^9, 3.6803370296899357`*^9}, {3.680337166155136*^9, 3.680337166576336*^9}, 3.680337208119618*^9, {3.6804945814762363`*^9, 3.6804947117465563`*^9}, {3.680494943000473*^9, 3.680494980077157*^9}, { 3.6804950432026677`*^9, 3.680495080279351*^9}, {3.6804951218950825`*^9, 3.6804951224410152`*^9}, {3.680495180288743*^9, 3.6804952639039907`*^9}, { 3.680495472196048*^9, 3.6804955152046967`*^9}, {3.680495557698552*^9, 3.6804955663720407`*^9}, {3.680495600488803*^9, 3.6804956333107824`*^9}, { 3.6805006300589094`*^9, 3.6805006635206947`*^9}, 3.680500695687689*^9, 3.680500736887025*^9, {3.680500773952387*^9, 3.6805007879610972`*^9}, { 3.6805008503450975`*^9, 3.6805008675049872`*^9}, {3.68050279305577*^9, 3.68050283983987*^9}, {3.6805028773420296`*^9, 3.6805029735466127`*^9}, { 3.6805030096447816`*^9, 3.6805030313598423`*^9}, 3.6805030876439238`*^9, { 3.680503159402544*^9, 3.6805031627720795`*^9}, {3.6805060387338986`*^9, 3.6805060574069786`*^9}, {3.6805062113440757`*^9, 3.6805064503152766`*^9}, {3.680507260169137*^9, 3.680507284674176*^9}, { 3.6805073806001625`*^9, 3.680507425097678*^9}, {3.680508049007706*^9, 3.6805080620180225`*^9}, {3.680840387494875*^9, 3.680840401800166*^9}, { 3.6808404322047615`*^9, 3.6808404997371044`*^9}, {3.6808405415297723`*^9, 3.6808405425281787`*^9}, {3.680840696715352*^9, 3.6808407000225525`*^9}, { 3.680840788354952*^9, 3.680840812441352*^9}, {3.680840850645752*^9, 3.680840853266552*^9}, 3.6808408884193525`*^9, {3.680841050651402*^9, 3.6808410559935336`*^9}, {3.680843500671384*^9, 3.6808435011081753`*^9}, { 3.6808436676173763`*^9, 3.6808436784436417`*^9}, {3.680843778741399*^9, 3.6808438375102224`*^9}, {3.680843899953682*^9, 3.6808439004840784`*^9}, { 3.6808440087788153`*^9, 3.6808440454856157`*^9}, {3.6808440819740157`*^9, 3.6808440836432157`*^9}, {3.680844410567021*^9, 3.680844477038616*^9}, { 3.6808445639510164`*^9, 3.6808445728596163`*^9}, 3.680846350696082*^9, { 3.6808467225342445`*^9, 3.680846734187295*^9}, {3.6808467850272083`*^9, 3.680846798318323*^9}, {3.680846855554356*^9, 3.6808468730886436`*^9}, { 3.6808469140651817`*^9, 3.680846954780921*^9}, {3.6808473461948614`*^9, 3.680847347442901*^9}, {3.680847582554298*^9, 3.680847584239109*^9}, { 3.6808476500091305`*^9, 3.6808476619900074`*^9}, {3.6808477061538906`*^9, 3.680847819446703*^9}, {3.6816398341340027`*^9, 3.681639892212803*^9}, 3.6816399230228033`*^9, {3.681719688687826*^9, 3.681719756844226*^9}, { 3.681719789885026*^9, 3.6817198290566263`*^9}, {3.6817199777788258`*^9, 3.681720011958426*^9}, {3.681726633556895*^9, 3.6817266462864947`*^9}, { 3.681726702524495*^9, 3.6817267067052946`*^9}, {3.681726741805295*^9, 3.6817267460640945`*^9}, {3.681726817777295*^9, 3.681726849882095*^9}, { 3.681727043093295*^9, 3.6817270452304945`*^9}, {3.6817278272634172`*^9, 3.68172784428269*^9}, {3.6817289140805607`*^9, 3.6817289300549603`*^9}, 3.6817302890359607`*^9, 3.681730319268961*^9, {3.682058245207515*^9, 3.6820583090714583`*^9}, {3.6820584046021843`*^9, 3.682058432431514*^9}, { 3.682058463443607*^9, 3.682058476360241*^9}, {3.6820619260434923`*^9, 3.6820619377902927`*^9}, {3.6820621172838926`*^9, 3.682062126784292*^9}, { 3.6820621978734922`*^9, 3.682062203473892*^9}, {3.68206338051344*^9, 3.6820633936486397`*^9}, {3.68206347804464*^9, 3.68206353008624*^9}, { 3.68206356225344*^9, 3.6820635800686398`*^9}, {3.68206408363844*^9, 3.68206408959764*^9}, {3.6820651093596897`*^9, 3.6820651220892086`*^9}, { 3.6820655177239823`*^9, 3.6820655235895824`*^9}, {3.682067374820548*^9, 3.682067381419348*^9}, {3.682067924131748*^9, 3.682067951509748*^9}, { 3.6820694881338935`*^9, 3.6820694959650936`*^9}, {3.682134894455967*^9, 3.6821348991259665`*^9}, {3.6821354107089663`*^9, 3.6821354157659664`*^9}, {3.6821366812181053`*^9, 3.682136687863577*^9}, { 3.682227178005288*^9, 3.682227183059655*^9}, {3.682227949367915*^9, 3.6822279528378115`*^9}, {3.682231301758458*^9, 3.6822313025072527`*^9}, 3.6823228319621143`*^9, 3.6823228697921143`*^9, {3.682323150523017*^9, 3.6823231545009656`*^9}, {3.682323557259471*^9, 3.682323600050271*^9}, { 3.6834320775796156`*^9, 3.6834320808399525`*^9}, {3.6839676527488384`*^9, 3.6839676607828383`*^9}, 3.6839722943073244`*^9, 3.6877579708655567`*^9, 3.687758033963176*^9, {3.6878580781425657`*^9, 3.6878580919005656`*^9}, { 3.6878581722645655`*^9, 3.687858172720566*^9}, 3.6882888355491247`*^9, { 3.688290391241394*^9, 3.688290575849394*^9}, {3.688290694839394*^9, 3.688290695539394*^9}, {3.688291356984171*^9, 3.6882914757529974`*^9}, { 3.696662302835082*^9, 3.696662303129074*^9}, {3.696668726827173*^9, 3.6966687377315035`*^9}, {3.6979530973553815`*^9, 3.6979530999449816`*^9}, {3.727498455003418*^9, 3.727498462544018*^9}, 3.727590720075515*^9, {3.7280304374995413`*^9, 3.7280304384083414`*^9}, { 3.728128346840683*^9, 3.728128356953683*^9}, {3.728193091493085*^9, 3.728193091974085*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox[ StyleBox["Data", "Subsubsection", FontColor->RGBColor[1, 0, 0]], FontColor->RGBColor[1., 0.5019607843137255, 0.]], StyleBox[" ", FontColor->RGBColor[1., 0.5019607843137255, 0.]], StyleBox[ StyleBox[ RowBox[{ StyleBox["ana", "Subsubsection", FontColor->RGBColor[1, 0, 0]], StyleBox[ StyleBox[ StyleBox["l", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "ysis"}]], FontColor->RGBColor[1, 0, 0]], StyleBox[ StyleBox[" ", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], FontColor->RGBColor[1, 0, 0]], StyleBox[ RowBox[{ StyleBox["m", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "ul", StyleBox["t", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "ip", StyleBox["l", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], StyleBox[ StyleBox["e", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"]}]], StyleBox[" ", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], RowBox[{ StyleBox[ RowBox[{ StyleBox["ce", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "ll", StyleBox["s", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"]}]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[1., 0.5019607843137255, 0.]]}]}], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"]], "Input", CellChangeTimes->{{3.6695478344322805`*^9, 3.6695478364602804`*^9}, { 3.7274991179222183`*^9, 3.727499122595418*^9}, {3.7275910645023146`*^9, 3.727591078645915*^9}}], Cell[BoxData[ StyleBox[ RowBox[{"Nucleus", ":"}], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Input", CellChangeTimes->{{3.6695480170178804`*^9, 3.6695480181586804`*^9}}], Cell[TextData[{ StyleBox["This part is used to quantify the different properties from the \ nucleus, such as the elongation, orientation, area, etc. To only select \ individual nuclei and \nnot some small background dots or multiple nuclei, \ you can use the command ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["markerblue ", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox["(0RGBColor[1, 0.9, 0.8]], StyleBox[" ", FontSlant->"Italic", Background->RGBColor[1, 0.9, 0.8]], StyleBox["Increase the number when you don\[CloseCurlyQuote]t want to \ include small background dots, decrease the number when multiple nuclei are \ detected as one.", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, 3.7280229973573413`*^9, {3.728023030926941*^9, 3.728023032259941*^9}, { 3.728030489698541*^9, 3.7280306064008045`*^9}, {3.7281929653830853`*^9, 3.728192972150085*^9}, {3.728207887450857*^9, 3.7282078887530575`*^9}}], Cell[BoxData[{ RowBox[{"selectimagenucleus", "=", RowBox[{ RowBox[{ RowBox[{"SelectComponents", "[", RowBox[{"#", ",", "\"\\"", ",", RowBox[{ RowBox[{"#", ">", "200"}], "&"}]}], "]"}], "&"}], "/@", "selectnucleus"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"disTblue", "=", RowBox[{ RowBox[{ RowBox[{"DistanceTransform", "[", "#", "]"}], "&"}], "/@", "selectimagenucleus"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"markerblue", "=", RowBox[{ RowBox[{ RowBox[{"MaxDetect", "[", RowBox[{"#", ",", "5"}], "]"}], "&"}], "/@", "disTblue"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"watershedComponentsblue", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"WatershedComponents", "[", RowBox[{ RowBox[{"ColorNegate", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "*", RowBox[{"ImageData", "[", RowBox[{"#", "[", RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"disTblue", ",", "markerblue", ",", "selectimagenucleus"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"imagenucleus", "=", RowBox[{ RowBox[{ RowBox[{"Colorize", "[", "#", "]"}], "&"}], "/@", "watershedComponentsblue"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsblue", "=", RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsbluelongaxis", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsblueshortaxis", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsblueelongation", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsbluearea", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"componentsblueperimeter", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsblueangle", "=", RowBox[{ RowBox[{"(", RowBox[{"180", "/", "Pi"}], ")"}], "*", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsblue", ",", "disTblue"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}], "]"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"componentsblueangle2", "=", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", "0"}], ",", RowBox[{"180", "-", RowBox[{"Abs", "[", "#", "]"}]}], ",", "#"}], "]"}], "&"}], "/@", "componentsblueangle"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"fitellipsenucleus", "=", RowBox[{ RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "centroid_", ",", "semiAxes_", ",", "orientation_", ",", "maxR_"}], "}"}], "\[RuleDelayed]", RowBox[{"Rotate", "[", RowBox[{ RowBox[{"Disk", "[", RowBox[{"centroid", ",", RowBox[{"{", RowBox[{ RowBox[{"semiAxes", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"semiAxes", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "orientation", ",", "centroid"}], "]"}]}], "}"}]}]}], "}"}], "]"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"selectnucleus", ",", "componentsblue"}], "}"}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"outlinenucleus", "=", RowBox[{ RowBox[{ RowBox[{"EdgeDetect", "[", "#", "]"}], "&"}], "/@", "selectnucleus"}]}]}], "Input", CellChangeTimes->{{3.6695480340082808`*^9, 3.66954806056548*^9}, { 3.6699805257997017`*^9, 3.6699805577938657`*^9}, {3.6749782840760746`*^9, 3.6749782936232743`*^9}, {3.6749783784418745`*^9, 3.6749783923142433`*^9}, {3.677391263101221*^9, 3.6773913151268873`*^9}, { 3.6773913459990897`*^9, 3.677391539219451*^9}, 3.67783025386753*^9, { 3.6778304200855303`*^9, 3.67783043905513*^9}, {3.6778305466327305`*^9, 3.6778305485983305`*^9}, {3.6778308842635303`*^9, 3.6778308872275305`*^9}, 3.67792109842704*^9, {3.6780170511044493`*^9, 3.6780170514164495`*^9}, { 3.678441787238469*^9, 3.6784419164536543`*^9}, 3.6785154876662416`*^9, 3.6785159552101917`*^9, {3.6785160085653443`*^9, 3.6785160095325255`*^9}, { 3.678516059281969*^9, 3.678516060436347*^9}, {3.6785161101306596`*^9, 3.6785161426670356`*^9}, {3.678519719292523*^9, 3.678519719715723*^9}, { 3.678519775600523*^9, 3.678519776179723*^9}, {3.678519823213123*^9, 3.678519823650923*^9}, 3.678701121277849*^9, 3.679825042720335*^9, { 3.680323021328041*^9, 3.680323022591552*^9}, {3.680323055942*^9, 3.6803230567687416`*^9}, {3.6821521196069326`*^9, 3.6821521200593386`*^9}, {3.682230569267116*^9, 3.6822305714978733`*^9}, { 3.6823223760157146`*^9, 3.6823223764681144`*^9}, {3.682658550852079*^9, 3.6826585512732787`*^9}, {3.682658588572879*^9, 3.682658589883279*^9}, { 3.6826586725944786`*^9, 3.6826586738268785`*^9}, {3.6827612080211296`*^9, 3.6827612376141396`*^9}, {3.6839720816949244`*^9, 3.6839721155313244`*^9}, {3.6875818512455425`*^9, 3.687581854256516*^9}, { 3.687682385398725*^9, 3.6876824008115253`*^9}, {3.687682596422305*^9, 3.687682769026237*^9}, {3.687682802036895*^9, 3.687682849212114*^9}, { 3.687684240330776*^9, 3.6876842891743765`*^9}, {3.6876847675993886`*^9, 3.6876847680361967`*^9}, {3.687758467863206*^9, 3.687758468175206*^9}, { 3.6877585379852057`*^9, 3.6877585387184057`*^9}, {3.687860482509118*^9, 3.6878604954591103`*^9}, {3.6878605341068616`*^9, 3.6878605736765485`*^9}, {3.688289188709393*^9, 3.6882891905503893`*^9}, { 3.6882947873447266`*^9, 3.688294787614727*^9}, {3.688295443194003*^9, 3.68829544449399*^9}, {3.688296127784433*^9, 3.688296129029421*^9}, 3.6930511887817125`*^9, 3.693051434034137*^9, {3.6979532563817816`*^9, 3.6979532568185816`*^9}, {3.6979532951945815`*^9, 3.6979533189689817`*^9}, {3.697953717134988*^9, 3.6979537178057833`*^9}, { 3.7274991865542183`*^9, 3.727499204930418*^9}, {3.7275908197531147`*^9, 3.727590830775915*^9}, {3.727591327782915*^9, 3.7275913282081146`*^9}, { 3.728189976451085*^9, 3.728189980182085*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox["Cells", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], ":"}], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Input", CellChangeTimes->{{3.6695479083414803`*^9, 3.6695479137390804`*^9}, { 3.727499387054018*^9, 3.727499389327018*^9}}], Cell[TextData[{ StyleBox["This parts can be used to quantify different properties from all \ the detected cells, such as the elongation, orientation, area. To only \ select individual cells, you can use the command ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["markergreen", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[" ", FontSlant->"Italic", Background->RGBColor[1, 0.9, 0.8]], StyleBox["(0RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593228936515*^9}, {3.727593556861515*^9, 3.7275935944915147`*^9}, {3.7280306206133976`*^9, 3.728030633490949*^9}, { 3.728192847684085*^9, 3.7281929313510847`*^9}, {3.728207903681057*^9, 3.7282079685472574`*^9}, {3.7282080043624573`*^9, 3.7282080186468573`*^9}}], Cell[BoxData[{ RowBox[{"disTgreen", "=", RowBox[{ RowBox[{ RowBox[{"ImageAdjust", "[", RowBox[{"DistanceTransform", "[", "#", "]"}], "]"}], "&"}], "/@", "selectactin"}]}], "\[IndentingNewLine]", RowBox[{"markergreen", "=", RowBox[{ RowBox[{ RowBox[{"MaxDetect", "[", RowBox[{"#", ",", "0.3"}], "]"}], "&"}], "/@", "disTgreen"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"watershedComponentsgreen", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"WatershedComponents", "[", RowBox[{ RowBox[{"ColorNegate", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "*", RowBox[{"ImageData", "[", RowBox[{"#", "[", RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"disTgreen", ",", "markergreen", ",", "selectactin"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"image", "=", RowBox[{ RowBox[{ RowBox[{"Colorize", "[", "#", "]"}], "&"}], "/@", "watershedComponentsgreen"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreen", "=", RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenlongaxis", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenshortaxis", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenelongation", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenarea", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"componentsgreenperimeter", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenangle", "=", RowBox[{ RowBox[{"(", RowBox[{"180", "/", "Pi"}], ")"}], "*", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"watershedComponentsgreen", ",", "disTgreen"}], "}"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}], "]"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"componentsgreenangle2", "=", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", "0"}], ",", RowBox[{"180", "-", RowBox[{"Abs", "[", "#", "]"}]}], ",", "#"}], "]"}], "&"}], "/@", "componentsgreenangle"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Lengthcell", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "&"}], "/@", "watershedComponentsgreen"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"fitellipseactin", "=", RowBox[{ RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "centroid_", ",", "semiAxes_", ",", "orientation_", ",", "maxR_"}], "}"}], "\[RuleDelayed]", RowBox[{"Rotate", "[", RowBox[{ RowBox[{"Disk", "[", RowBox[{"centroid", ",", RowBox[{"{", RowBox[{ RowBox[{"semiAxes", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"semiAxes", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "orientation", ",", "centroid"}], "]"}]}], "}"}]}]}], "}"}], "]"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"selectactin", ",", "componentsgreen"}], "}"}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"outlinecell", "=", RowBox[{ RowBox[{ RowBox[{"EdgeDetect", "[", "#", "]"}], "&"}], "/@", "selectactin"}]}]}], "Input", CellChangeTimes->{{3.6695479350858803`*^9, 3.6695479761544805`*^9}, { 3.669957073273748*^9, 3.669957176651634*^9}, 3.6699573252524714`*^9, { 3.6699575970103445`*^9, 3.669957639363841*^9}, {3.6699576804383783`*^9, 3.6699577195161276`*^9}, {3.6699581827608347`*^9, 3.669958190529585*^9}, { 3.669958279464615*^9, 3.6699582808062067`*^9}, {3.6699583521446095`*^9, 3.6699583535330095`*^9}, {3.6699583910640097`*^9, 3.66995839217161*^9}, { 3.6699584395300097`*^9, 3.6699584412772098`*^9}, {3.66995862708881*^9, 3.6699586282900095`*^9}, {3.6699765363001204`*^9, 3.6699765449579535`*^9}, {3.6699790373658285`*^9, 3.669979041265829*^9}, { 3.669979356379029*^9, 3.669979356800229*^9}, {3.669980148352829*^9, 3.669980152455629*^9}, {3.6699802170864286`*^9, 3.669980263168829*^9}, { 3.677386559149218*^9, 3.677386802172453*^9}, 3.67738685079152*^9, { 3.6773868866614313`*^9, 3.6773868935147*^9}, {3.6773869320711594`*^9, 3.677386956365693*^9}, 3.6773869866353207`*^9, {3.677387039791146*^9, 3.6773872009433155`*^9}, {3.677387267947087*^9, 3.6773873235949497`*^9}, { 3.6773874007143497`*^9, 3.6773874071363497`*^9}, {3.67738891461407*^9, 3.677388916985285*^9}, {3.6773890918758297`*^9, 3.6773890997070303`*^9}, { 3.67738912981703*^9, 3.6773892636532297`*^9}, {3.67738930338843*^9, 3.67738932376403*^9}, {3.67738936682183*^9, 3.6773893674458303`*^9}, { 3.6778273447937136`*^9, 3.6778273738197136`*^9}, {3.6778279262689137`*^9, 3.6778279425219135`*^9}, {3.6778282995599136`*^9, 3.677828303678914*^9}, 3.6778291473238764`*^9, {3.67782935119503*^9, 3.6778293564642305`*^9}, { 3.67782947983043*^9, 3.6778295460224304`*^9}, {3.67782970106143*^9, 3.67782973772903*^9}, {3.67782980582823*^9, 3.6778298464426303`*^9}, { 3.67782996912103*^9, 3.67782997574743*^9}, {3.67783047537193*^9, 3.6778304875555305`*^9}, {3.67783074893353*^9, 3.67783075055593*^9}, { 3.678016943507049*^9, 3.6780169568138494`*^9}, {3.6780905236512346`*^9, 3.678090526755615*^9}, {3.6785073929288874`*^9, 3.678507393408888*^9}, { 3.678510002153869*^9, 3.67851003102791*^9}, {3.6785102924162817`*^9, 3.6785102936562834`*^9}, {3.6785103362833443`*^9, 3.678510387317416*^9}, { 3.6785154264222116`*^9, 3.6785154522239504`*^9}, {3.6785155364780645`*^9, 3.6785155425308256`*^9}, {3.6785156361426244`*^9, 3.678515661040065*^9}, { 3.6785156989790215`*^9, 3.6785156996498175`*^9}, {3.678516173422247*^9, 3.678516173838839*^9}, {3.6785191476935577`*^9, 3.678519182831335*^9}, { 3.6785193394385366`*^9, 3.6785193944584904`*^9}, {3.678519437619375*^9, 3.678519501420988*^9}, {3.678519595282308*^9, 3.678519607575923*^9}, 3.678519815376523*^9, {3.67852066341356*^9, 3.6785206697827597`*^9}, { 3.6785218128538885`*^9, 3.6785218216073203`*^9}, {3.6785218734027243`*^9, 3.678521882590948*^9}, {3.678522814686961*^9, 3.6785228199441276`*^9}, 3.678522896359438*^9, 3.6787011317610493`*^9, 3.678704529591947*^9, { 3.6791359572855854`*^9, 3.679135990676585*^9}, {3.6792885454140224`*^9, 3.679288560135823*^9}, {3.679825060314335*^9, 3.6798250722073345`*^9}, { 3.6798252044413347`*^9, 3.679825204912335*^9}, {3.6798252634613347`*^9, 3.679825263916335*^9}, 3.6798254242443347`*^9, {3.6798254856083345`*^9, 3.679825486048335*^9}, {3.679825702812335*^9, 3.6798257103623347`*^9}, { 3.679825746793335*^9, 3.679825781543335*^9}, {3.6798258408597345`*^9, 3.679825878393735*^9}, {3.679825910695735*^9, 3.679825940486735*^9}, { 3.679825980987735*^9, 3.6798259910577345`*^9}, {3.6804377367352915`*^9, 3.680437762303618*^9}, {3.6804378074032183`*^9, 3.680437824032818*^9}, { 3.680494358458598*^9, 3.6804943700439005`*^9}, {3.6804956701419106`*^9, 3.680495670578705*^9}, 3.6804982043933673`*^9, 3.68052042843396*^9, 3.6808450621075163`*^9, {3.6808451054911165`*^9, 3.6808451068171163`*^9}, { 3.6817271590324945`*^9, 3.681727159282095*^9}, 3.681729571112961*^9, { 3.681729601336961*^9, 3.6817296722929606`*^9}, {3.6817298360929604`*^9, 3.6817298363829603`*^9}, {3.681729871112961*^9, 3.6817298719629602`*^9}, { 3.682058144856574*^9, 3.6820581777713084`*^9}, {3.6820606499396534`*^9, 3.6820606650402603`*^9}, {3.682064351060437*^9, 3.6820643675492144`*^9}, { 3.6820659247279825`*^9, 3.682065987268382*^9}, {3.682070683429693*^9, 3.6820707270940933`*^9}, {3.6821349697679663`*^9, 3.682134972271967*^9}, { 3.682152292309127*^9, 3.6821523018095264`*^9}, {3.682152350481527*^9, 3.682152350902727*^9}, {3.682154526263827*^9, 3.6821545402414265`*^9}, { 3.682154788718927*^9, 3.682154792244527*^9}, {3.6821553654477267`*^9, 3.6821554318257265`*^9}, {3.682159053650673*^9, 3.6821590563182726`*^9}, { 3.682164158517103*^9, 3.682164160108303*^9}, {3.6821643230753517`*^9, 3.682164324744359*^9}, 3.682164407279234*^9, {3.682223983363208*^9, 3.682223990211608*^9}, {3.6822250178462305`*^9, 3.6822250206854124`*^9}, { 3.6822258618651705`*^9, 3.6822258623331738`*^9}, 3.6822297798864937`*^9, { 3.6822307982410035`*^9, 3.6822307988025928`*^9}, {3.6822308638222504`*^9, 3.682230865273032*^9}, {3.6822314087493725`*^9, 3.682231409435768*^9}, 3.6822314432915506`*^9, {3.682233606345031*^9, 3.682233630593188*^9}, { 3.6823224034249144`*^9, 3.6823224038305144`*^9}, {3.682322762167714*^9, 3.6823227652097144`*^9}, {3.682322959403714*^9, 3.6823229601837144`*^9}, { 3.6823240708511715`*^9, 3.682324071537571*^9}, {3.6823289765405626`*^9, 3.682329055804163*^9}, {3.682330392249663*^9, 3.682330392686463*^9}, { 3.6823305143508625`*^9, 3.6823305148032627`*^9}, 3.6824005410765233`*^9, 3.682400651405323*^9, 3.6824007389745235`*^9, {3.682400906233723*^9, 3.682400979566164*^9}, {3.682401010610783*^9, 3.682401011687107*^9}, { 3.682401061962611*^9, 3.6824010625397706`*^9}, {3.682423428352567*^9, 3.6824234290811625`*^9}, {3.682423664220131*^9, 3.6824236911455584`*^9}, { 3.682656974765295*^9, 3.6826569764812727`*^9}, {3.6827568822463837`*^9, 3.6827569303073835`*^9}, {3.6827603499003215`*^9, 3.682760350695922*^9}, { 3.683343174446224*^9, 3.683343174929796*^9}, {3.683343233847597*^9, 3.683343266465315*^9}, {3.6833439851675315`*^9, 3.683344013278371*^9}, 3.6833449629778814`*^9, {3.6833449993412485`*^9, 3.68334500065164*^9}, { 3.6834329916948786`*^9, 3.6834330067644787`*^9}, {3.6834334598410788`*^9, 3.6834334608550787`*^9}, {3.6834338031408787`*^9, 3.6834338041236787`*^9}, {3.6839671257489414`*^9, 3.6839671295085173`*^9}, {3.6871665468016586`*^9, 3.6871665472072587`*^9}, {3.687264052165258*^9, 3.687264078151458*^9}, { 3.687264744156785*^9, 3.687264874752926*^9}, {3.687264928824526*^9, 3.687264948076926*^9}, 3.6875818198401785`*^9, {3.6876824489999247`*^9, 3.6876824520575247`*^9}, {3.6876824821811247`*^9, 3.6876825875300198`*^9}, {3.6876828709430532`*^9, 3.6876828802095127`*^9}, 3.6876829177121525`*^9, {3.6876843510283766`*^9, 3.6876843960967765`*^9}, { 3.6876874218897877`*^9, 3.687687435524188*^9}, {3.687758440438406*^9, 3.6877584431528063`*^9}, 3.687758513820806*^9, {3.6877593813628387`*^9, 3.687759382517231*^9}, {3.687759464050677*^9, 3.6877594644806767`*^9}, { 3.687759532151922*^9, 3.6877595326419163`*^9}, {3.6877595833880653`*^9, 3.687759585213242*^9}, 3.6877597417928348`*^9, {3.687859886544531*^9, 3.687859887199723*^9}, {3.6878606092052135`*^9, 3.687860610671839*^9}, 3.687860727573022*^9, 3.687861857431227*^9, {3.688212840001099*^9, 3.6882128418156414`*^9}, {3.6882129022905064`*^9, 3.688212902727292*^9}, { 3.68821339849487*^9, 3.6882133988848705`*^9}, {3.6882134361688704`*^9, 3.6882134363872705`*^9}, 3.6882891410591726`*^9, {3.690092088373283*^9, 3.690092146120453*^9}, {3.691303330367447*^9, 3.6913033317674465`*^9}, { 3.693047805494296*^9, 3.693047805934292*^9}, {3.6962291809624157`*^9, 3.696229190133252*^9}, {3.6966623780262694`*^9, 3.6966623786342525`*^9}, { 3.6979509394876995`*^9, 3.6979509404080753`*^9}, {3.697952167046312*^9, 3.6979521689806995`*^9}, {3.6979532171009817`*^9, 3.6979532175689816`*^9}, {3.697953274009782*^9, 3.6979532752733817`*^9}, { 3.6979538652464323`*^9, 3.6979538674616184`*^9}, {3.6979549814288816`*^9, 3.697954982786064*^9}, {3.6992533018262167`*^9, 3.6992533036202974`*^9}, 3.6992542558081493`*^9, {3.7199033737718554`*^9, 3.7199033745402503`*^9}, { 3.727499207785618*^9, 3.7274992082536182`*^9}, {3.727499327800418*^9, 3.727499328192418*^9}, {3.7275908687073145`*^9, 3.7275908841667147`*^9}, { 3.727591335780115*^9, 3.727591336706515*^9}, {3.728189986420285*^9, 3.728190000486485*^9}}], Cell[BoxData[ StyleBox[ RowBox[{"Focal", " ", RowBox[{ StyleBox[ RowBox[{"a", StyleBox["d", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], "he", StyleBox["s", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], "io", StyleBox["n", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], StyleBox[ StyleBox["s", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]}]], ":"}]}], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Input", CellChangeTimes->{{3.727518186444869*^9, 3.727518188827069*^9}, { 3.727591384716315*^9, 3.727591386346715*^9}, {3.727591418961915*^9, 3.727591419636715*^9}}], Cell[TextData[{ StyleBox["This part can be used to quantify the different properties from \ the focal adhesions of multiple, such as the elongation, orientation, area, \ etc. FAs smaller than 0.1 um^2 (size can be adjusted in ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["sizefocal)", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[" are excluded to \nensure that background noise is eliminated from \ the analysis.\n", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593149061515*^9}, {3.7275936166505146`*^9, 3.7275936211625147`*^9}, {3.728192552599085*^9, 3.728192676267085*^9}, { 3.7281927890490847`*^9, 3.728192828176085*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"sizefocal", "=", "0.1"}], ";"}], "\[IndentingNewLine]", RowBox[{"selectfocalareanew", "=", RowBox[{ RowBox[{ RowBox[{"SelectComponents", "[", RowBox[{"#", ",", " ", "\"\\"", ",", RowBox[{ RowBox[{ RowBox[{"sizefocal", "/", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}], "<", "#"}], "&"}]}], "]"}], "&"}], "/@", "selectfocal"}]}], "\n", RowBox[{ RowBox[{"shortaxisfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"longaxisfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"centroidfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"elongationfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lengthfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"perimeterfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Areafocalafter", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", " ", "\"\\""}], "]"}], "]"}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Orientationfocal", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"180", "/", "Pi"}], ")"}], "*", RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", " ", "\"\\""}], "]"}], "]"}]}], "&"}], "/@", "selectfocalareanew"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"Orientationfocal2", "=", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", "0"}], ",", RowBox[{"180", "-", RowBox[{"Abs", "[", "#", "]"}]}], ",", "#"}], "]"}], "&"}], "/@", "Orientationfocal"}]}], ";"}], "\n", RowBox[{ RowBox[{"fitellipsefocal", "=", RowBox[{ RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{"#", ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}], "&"}], "/@", "selectfocalareanew"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "centroid_", ",", "semiAxes_", ",", "orientation_", ",", "maxR_"}], "}"}], "\[RuleDelayed]", RowBox[{"Rotate", "[", RowBox[{ RowBox[{"Disk", "[", RowBox[{"centroid", ",", RowBox[{"{", RowBox[{ RowBox[{"semiAxes", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"semiAxes", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "orientation", ",", "centroid"}], "]"}]}], "}"}]}]}], "}"}], "]"}]}], "]"}], "&"}], "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"selectfocalareanew", ",", "fitellipsefocal"}], "}"}], "]"}]}]}], "Input", CellChangeTimes->{{3.7275913765479145`*^9, 3.727591400194915*^9}, { 3.7281283751884828`*^9, 3.728128376585883*^9}, {3.7281317146048856`*^9, 3.7281318071470857`*^9}, 3.7281927639100847`*^9}], Cell[BoxData[ StyleBox[ RowBox[{"Export", ":"}], "Subsubsection", FontColor->RGBColor[1, 0, 0]]], "Input", CellChangeTimes->{{3.6699775226609287`*^9, 3.6699775238621287`*^9}}], Cell[TextData[StyleBox["This part can be used to export the images of the \ detected cells, nuclei and focal adhesions and outlines of the cells and \ nuclei.\nThe extracted data from these cells, nuclei and focal adhesions are \ exported to an excel file. \n", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593149061515*^9}, {3.7275936166505146`*^9, 3.7275936211625147`*^9}, {3.728192552599085*^9, 3.728192676267085*^9}, { 3.7281927890490847`*^9, 3.728192828176085*^9}, {3.7281944206565*^9, 3.728194519291283*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"SetDirectory", "[", "dir", "]"}], ";"}], "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{"StringJoin", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\<.tif\>\""}], "]"}], ",", RowBox[{"selectactin", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", RowBox[{"Length", "[", "selectactin", "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{"StringJoin", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\<.tif\>\""}], "]"}], ",", RowBox[{"selectnucleus", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", RowBox[{"Length", "[", "selectnucleus", "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{"StringJoin", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\<.tif\>\""}], "]"}], ",", RowBox[{"image", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", RowBox[{"Length", "[", StyleBox["image", FontWeight->"Plain"], "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{"StringJoin", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\<.tif\>\""}], "]"}], ",", RowBox[{"selectcell", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", RowBox[{"Length", "[", "selectcell", "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{"StringJoin", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\<.tif\>\""}], "]"}], ",", RowBox[{"outlinecell", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", RowBox[{"Length", "[", "outlinecell", "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{"StringJoin", "[", RowBox[{"\"\\"", ",", RowBox[{"ToString", "[", "n", "]"}], ",", "\"\<.tif\>\""}], "]"}], ",", RowBox[{"outlinenucleus", "[", RowBox[{"[", "n", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", RowBox[{"Length", "[", "outlinenucleus", "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "#", ",", "\"\\""}], "]"}], "&"}], "/@", "removebackground7"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Export", "[", RowBox[{"\"\\"", ",", "#", ",", "\"\\""}], "]"}], "&"}], "/@", "imageadhesions7"}], ";"}]}], "Input", CellChangeTimes->{{3.6784412360096726`*^9, 3.678441236459673*^9}, 3.682227010509815*^9, {3.687687460109788*^9, 3.687687460858588*^9}, 3.696229299339284*^9, {3.6966691315702925`*^9, 3.6966691329742928`*^9}, { 3.6992531494384174`*^9, 3.6992531535568175`*^9}, {3.719900719612254*^9, 3.719900720958802*^9}, {3.727518347759469*^9, 3.7275183544254684`*^9}, { 3.7275909326181145`*^9, 3.727590998678115*^9}, {3.727592630225515*^9, 3.727592631649515*^9}, {3.728191366585085*^9, 3.728191367022085*^9}, { 3.7281931119680853`*^9, 3.728193112389085*^9}, 3.728193779307685*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Actin:", FontSize->16, FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Subsection", CellChangeTimes->{{3.6778300357766304`*^9, 3.67783004463023*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"mytableactin", "=", RowBox[{ RowBox[{"{", RowBox[{ "componentsgreenarea", ",", "componentsgreenlongaxis", ",", "componentsgreenshortaxis", ",", "componentsgreenelongation", ",", "componentsgreenperimeter", ",", "componentsgreenangle2", ",", "Lengthcell"}], "}"}], "//", "Transpose"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"headers", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"dataactin", "=", RowBox[{"Prepend", "[", RowBox[{"mytableactin", ",", "headers"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"Export", "[", RowBox[{"\"\\"", ",", "dataactin"}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.6778282312109137`*^9, 3.6778282770979137`*^9}, { 3.677828479755314*^9, 3.6778286170059137`*^9}, {3.677828838779314*^9, 3.677828879565714*^9}, {3.677828923129914*^9, 3.677828935188714*^9}, { 3.677829049922063*^9, 3.6778290722213197`*^9}, {3.67782926131403*^9, 3.67782927619623*^9}, {3.6778293198792305`*^9, 3.6778293422100306`*^9}, { 3.67782957392803*^9, 3.67782958243343*^9}, {3.67782975510723*^9, 3.67782978438803*^9}, {3.6778298927976303`*^9, 3.6778299318434305`*^9}, { 3.6778314129606304`*^9, 3.67783146765423*^9}, {3.6785229337613983`*^9, 3.678522934853391*^9}, {3.679141200149685*^9, 3.679141212099285*^9}, { 3.679141491812485*^9, 3.679141496632885*^9}, {3.680335596897745*^9, 3.6803356114209723`*^9}, 3.6875818671272583`*^9, {3.687759935277154*^9, 3.6877599602212343`*^9}, {3.688296162414094*^9, 3.688296163392084*^9}, { 3.6900921967208023`*^9, 3.6900922214253035`*^9}, {3.6979510322359076`*^9, 3.6979510373526745`*^9}, {3.719900723499905*^9, 3.719900734301892*^9}, { 3.7274992941970177`*^9, 3.727499294555818*^9}, {3.727518305361269*^9, 3.727518306333469*^9}, {3.7281915189360847`*^9, 3.728191522563085*^9}, { 3.7281931157840853`*^9, 3.728193120775085*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Nucleus:", FontSize->16, FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Subsection", CellChangeTimes->{{3.67783005891763*^9, 3.67783006007403*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"mytablenucleus", "=", RowBox[{ RowBox[{"{", RowBox[{ "componentsbluearea", ",", "componentsbluelongaxis", ",", "componentsblueshortaxis", ",", "componentsblueelongation", ",", "componentsblueperimeter", ",", "componentsblueangle2"}], "}"}], "//", "Transpose"}]}], ";"}], "\n", RowBox[{ RowBox[{"headersnucleus", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"datanucleus", "=", RowBox[{"Prepend", "[", RowBox[{"mytablenucleus", ",", "headersnucleus"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"Export", "[", RowBox[{"\"\\"", ",", "datanucleus"}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.67783142193063*^9, 3.67783146325503*^9}, { 3.6779222657968082`*^9, 3.6779222665630465`*^9}, {3.678441253415698*^9, 3.6784412547657003`*^9}, {3.6784417346813927`*^9, 3.6784417719024467`*^9}, {3.6784422561871443`*^9, 3.678442262955154*^9}, { 3.6823229690445147`*^9, 3.6823229699805145`*^9}, 3.687581869482994*^9, { 3.727592218239515*^9, 3.727592260413515*^9}, {3.727592295324515*^9, 3.727592295953515*^9}, {3.727592484012515*^9, 3.7275925083085146`*^9}, 3.7275928065655146`*^9, {3.728191527838085*^9, 3.728191528819085*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Focal adhesions:", FontSize->16, FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Subsection", CellChangeTimes->{{3.6778300357766304`*^9, 3.67783004463023*^9}, { 3.7275925008885145`*^9, 3.7275925022405148`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"mytablefocal", "=", RowBox[{ RowBox[{"{", RowBox[{ StyleBox["Areafocalafter", "Input"], ",", "longaxisfocal", ",", "shortaxisfocal", ",", "elongationfocal", ",", "Orientationfocal2"}], "}"}], "//", "Transpose"}]}], ";"}], "\n", RowBox[{ RowBox[{"headersfocal", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"datafocal", "=", RowBox[{"Prepend", "[", RowBox[{"mytablefocal", ",", "headersfocal"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"Export", "[", RowBox[{"\"\\"", ",", "datafocal"}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.67783142193063*^9, 3.67783146325503*^9}, { 3.6779222657968082`*^9, 3.6779222665630465`*^9}, {3.678441253415698*^9, 3.6784412547657003`*^9}, {3.6784417346813927`*^9, 3.6784417719024467`*^9}, {3.6784422561871443`*^9, 3.678442262955154*^9}, { 3.6823229690445147`*^9, 3.6823229699805145`*^9}, 3.687581869482994*^9, { 3.727592218239515*^9, 3.727592260413515*^9}, {3.7275923092685146`*^9, 3.7275923260935144`*^9}, {3.7275923628745146`*^9, 3.7275924614185147`*^9}, 3.727592505257515*^9, {3.727592611002515*^9, 3.7275926115305147`*^9}, { 3.7281915320420847`*^9, 3.728191533052085*^9}}], Cell[TextData[StyleBox["Single cell:", FontSize->18, FontColor->RGBColor[1, 0, 0]]], "Text", CellChangeTimes->{{3.7275172859486685`*^9, 3.7275172859642687`*^9}, { 3.7275173366094685`*^9, 3.727517383226269*^9}, {3.727591478890115*^9, 3.7275914824357147`*^9}}], Cell[TextData[StyleBox["To analyze the focal adhesions of one single cell, \ you can select the cell of interest by tracing the cell with a red mask. Once \ you traced the cell of interest, push the buttons \ \[OpenCurlyDoubleQuote]croptotal\[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]binfibronectincrop\[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]cropfocal\[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]cropactin\[CloseCurlyDoubleQuote], \n\ \[OpenCurlyDoubleQuote]cropdapi\[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]binbluecrop\[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]quantifyfocalcrop\[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]binactincrop\[CloseCurlyDoubleQuote] to select the \ cell. \nIn imagenumber you can select the image of interest. ", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593228936515*^9}, 3.728023001087541*^9, { 3.728190239119485*^9, 3.728190352361085*^9}, {3.728190500518085*^9, 3.728190521955885*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"imagenumber", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"actin", "=", RowBox[{"imagesactin", "[", RowBox[{"[", "imagenumber", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nucleus", "=", RowBox[{"imagesnucleus", "[", RowBox[{"[", "imagenumber", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"focal", "=", RowBox[{"imagesfocal", "[", RowBox[{"[", "imagenumber", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"actincropcropsingle", "=", RowBox[{"actincrop", "[", RowBox[{"[", "imagenumber", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nucleuscropsingle", "=", RowBox[{"nucleuscrop", "[", RowBox[{"[", "imagenumber", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"focalcropsingle", "=", RowBox[{"focalcrop", "[", RowBox[{"[", "imagenumber", "]"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.727517421172469*^9, 3.7275174664080687`*^9}, { 3.7275175274024687`*^9, 3.727517538520269*^9}, {3.727517575824669*^9, 3.727517588335469*^9}, {3.7275176202302685`*^9, 3.7275177038658686`*^9}, { 3.728193127354085*^9, 3.728193127797085*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"exppic", "=", RowBox[{"ColorCombine", "[", RowBox[{"{", RowBox[{"focal", ",", "actin", ",", "nucleus"}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"i", "=", "exppic"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"k", "=", "focal"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"l", "=", "actin"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", "nucleus"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", "nucleuscropsingle"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"o", "=", "focalcropsingle"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"p", "=", "actincropcropsingle"}], ";"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{ RowBox[{"parameterscrop", "=", "u"}], ";", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"Show", "[", RowBox[{"i", ",", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"Red", ",", RowBox[{"Opacity", "[", "0.6", "]"}], ",", RowBox[{"Dynamic", "[", RowBox[{"Polygon", "[", "u", "]"}], "]"}]}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "2"}], ",", RowBox[{"Background", "\[Rule]", "White"}]}], "]"}]}], "]"}], ",", RowBox[{"Panel", "[", "result", "]"}]}], "}"}], "]"}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"u", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"100", ",", "100"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"150", ",", "150"}], "}"}], ",", RowBox[{"{", RowBox[{"250", ",", "250"}], "}"}], ",", RowBox[{"{", RowBox[{"300", ",", "300"}], "}"}], ",", RowBox[{"{", RowBox[{"350", ",", "350"}], "}"}], ",", RowBox[{"{", RowBox[{"400", ",", "400"}], "}"}], ",", RowBox[{"{", RowBox[{"450", ",", "450"}], "}"}]}], "}"}]}], "}"}], ",", "Locator", ",", RowBox[{"LocatorAutoCreate", "\[Rule]", "True"}]}], "}"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"result", "=", RowBox[{"crop", "[", RowBox[{"i", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"cropfocalsingle", "=", RowBox[{"crop", "[", RowBox[{"k", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"cropactinsingle", "=", RowBox[{"crop", "[", RowBox[{"l", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"cropdapisingle", "=", RowBox[{"crop", "[", RowBox[{"n", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"cropbinbluesingle", "=", RowBox[{"crop", "[", RowBox[{"n", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"cropquantifyfocalsingle", "=", RowBox[{"crop", "[", RowBox[{"o", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Button", "[", RowBox[{"\"\\"", ",", RowBox[{"cropbinactinsingle", "=", RowBox[{"crop", "[", RowBox[{"p", ",", "u"}], "]"}]}]}], "]"}], ",", RowBox[{"Initialization", "\[RuleDelayed]", RowBox[{"(", RowBox[{ RowBox[{"crop", "[", RowBox[{"i_", ",", "poly_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "mask", "}"}], ",", RowBox[{ RowBox[{"mask", "=", RowBox[{"ColorNegate", "[", RowBox[{"Binarize", "[", RowBox[{"Rasterize", "[", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"Polygon", "[", "poly", "]"}], ",", RowBox[{"PlotRangePadding", "\[Rule]", "0"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"ImageDimensions", "[", "i", "]"}]}], "}"}], "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"ImageDimensions", "[", "i", "]"}]}]}], "]"}], "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"merge", "=", RowBox[{"ImageMultiply", "[", RowBox[{"i", ",", "mask"}], "]"}]}]}]}], "]"}]}], ")"}]}]}], "]"}]}], "Input", CellChangeTimes->{ 3.727517399157669*^9, 3.727517592304269*^9, {3.7275176561050687`*^9, 3.727517660637469*^9}, {3.7275177075976686`*^9, 3.727517709997469*^9}, { 3.727591440742715*^9, 3.7275914412907147`*^9}, {3.7281908678170853`*^9, 3.728190920102085*^9}, {3.7281931309420853`*^9, 3.7281931410670853`*^9}, { 3.728193519083685*^9, 3.728193519819685*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`u$$ = {{812.4000000000001, 708.5}, { 671.4000000000001, 371.5}, {754.4000000000001, 321.5}, {872.4000000000001, 313.5}, {969.4000000000001, 360.5}, {1114.4, 847.5}, {872.4000000000001, 926.5}}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`u$$], {{100, 100}, {150, 150}, {250, 250}, {300, 300}, {350, 350}, {400, 400}, {450, 450}}}, Automatic}, { Hold[ Button[ "Croptotal", $CellContext`result = $CellContext`crop[$CellContext`i, \ $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Button[ "Cropfocal", $CellContext`cropfocalsingle = \ $CellContext`crop[$CellContext`k, $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Button[ "Cropactin", $CellContext`cropactinsingle = \ $CellContext`crop[$CellContext`l, $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Button[ "Cropdapi", $CellContext`cropdapisingle = \ $CellContext`crop[$CellContext`n, $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Button[ "binbluecrop", $CellContext`cropbinbluesingle = \ $CellContext`crop[$CellContext`n, $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Button[ "quantifyfocalcrop", $CellContext`cropquantifyfocalsingle = \ $CellContext`crop[$CellContext`o, $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Button[ "binactincrop", $CellContext`cropbinactinsingle = \ $CellContext`crop[$CellContext`p, $CellContext`u$$]]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = { 1325.5, {1595., 518.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`u$$ = {{100, 100}, {150, 150}, {250, 250}, {300, 300}, {350, 350}, {400, 400}, {450, 450}}}, "ControllerVariables" :> {}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`parameterscrop = $CellContext`u$$; Row[{ Show[$CellContext`i, Graphics[{Red, Opacity[0.6], Dynamic[ Polygon[$CellContext`u$$]]}, PlotRange -> 2, Background -> White]], Panel[$CellContext`result]}]), "Specifications" :> {{{$CellContext`u$$, {{100, 100}, {150, 150}, {250, 250}, {300, 300}, {350, 350}, {400, 400}, {450, 450}}}, Automatic, ControlType -> Locator, LocatorAutoCreate -> True}, Button[ "Croptotal", $CellContext`result = $CellContext`crop[$CellContext`i, \ $CellContext`u$$]], Button[ "Cropfocal", $CellContext`cropfocalsingle = \ $CellContext`crop[$CellContext`k, $CellContext`u$$]], Button[ "Cropactin", $CellContext`cropactinsingle = \ $CellContext`crop[$CellContext`l, $CellContext`u$$]], Button[ "Cropdapi", $CellContext`cropdapisingle = \ $CellContext`crop[$CellContext`n, $CellContext`u$$]], Button[ "binbluecrop", $CellContext`cropbinbluesingle = \ $CellContext`crop[$CellContext`n, $CellContext`u$$]], Button[ "quantifyfocalcrop", $CellContext`cropquantifyfocalsingle = \ $CellContext`crop[$CellContext`o, $CellContext`u$$]], Button[ "binactincrop", $CellContext`cropbinactinsingle = \ $CellContext`crop[$CellContext`p, $CellContext`u$$]]}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{1383., {1191., 1198.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>($CellContext`crop[ Pattern[$CellContext`i, Blank[]], Pattern[$CellContext`poly, Blank[]]] := Module[{$CellContext`mask}, $CellContext`mask = ColorNegate[ Binarize[ Rasterize[ Graphics[ Polygon[$CellContext`poly], PlotRangePadding -> 0, PlotRange -> Transpose[{{0, 0}, ImageDimensions[$CellContext`i]}], ImageSize -> ImageDimensions[$CellContext`i]]]]]; $CellContext`merge = ImageMultiply[$CellContext`i, $CellContext`mask]]; Typeset`initDone$$ = True), SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{3.7281935250336847`*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"crop1", "=", RowBox[{"parameterscrop", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{"crop2", "=", RowBox[{"parameterscrop", "[", RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"crop3", "=", RowBox[{"parameterscrop", "[", RowBox[{"[", "3", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"crop4", "=", RowBox[{"parameterscrop", "[", RowBox[{"[", "4", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"crop5", "=", RowBox[{"parameterscrop", "[", RowBox[{"[", "5", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"crop6", "=", RowBox[{"parameterscrop", "[", RowBox[{"[", "6", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"poly", "=", RowBox[{"ColorNegate", "[", RowBox[{"Binarize", "[", RowBox[{"Rasterize", "[", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"Polygon", "[", RowBox[{"{", RowBox[{ "crop1", ",", "crop2", ",", "crop3", ",", "crop4", ",", "crop5", ",", "crop6"}], "}"}], "]"}], ",", RowBox[{"PlotRangePadding", "\[Rule]", "0"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"ImageDimensions", "[", "i", "]"}]}], "}"}], "]"}]}], ",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"ImageDimensions", "[", "i", "]"}]}]}], "]"}], "]"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{"croptotal", "=", "result"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cropbinactinsingle", "=", "cropbinactinsingle"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cropbinbluesingle", "=", "cropbinbluesingle"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cropquantifyfocalsingle", "=", "cropquantifyfocalsingle"}], ";"}]}], "Input", CellChangeTimes->{{3.727517799247069*^9, 3.7275177996556687`*^9}, 3.728191044546085*^9, {3.728193148366085*^9, 3.728193148893085*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox[ StyleBox["Data", "Subsubsection", FontColor->RGBColor[1, 0, 0]], FontColor->RGBColor[1., 0.5019607843137255, 0.]], StyleBox[" ", FontColor->RGBColor[1., 0.5019607843137255, 0.]], StyleBox[ StyleBox[ RowBox[{ StyleBox["ana", "Subsubsection", FontColor->RGBColor[1, 0, 0]], StyleBox[ StyleBox[ StyleBox["l", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "ysis"}]], FontColor->RGBColor[1, 0, 0]], StyleBox[ StyleBox[" ", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], FontColor->RGBColor[1, 0, 0]], StyleBox["single", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], StyleBox[" ", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], RowBox[{ StyleBox[ RowBox[{ StyleBox["ce", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"], "ll", StyleBox["s", "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"]}]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[1., 0.5019607843137255, 0.]]}]}], "Subsubsection", FontFamily->"Gill Sans MT", FontSize->20, FontWeight->"Plain"]], "Input", CellChangeTimes->{{3.727591504639115*^9, 3.727591505265115*^9}}], Cell[BoxData[ StyleBox[ RowBox[{"Nucleus", ":"}], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Input", CellChangeTimes->{{3.6695480170178804`*^9, 3.6695480181586804`*^9}}], Cell[TextData[{ StyleBox["This part can be used to quantify the different properties from \ the nucleus of one single cells, such as the elongation, orientation, area, \ etc. To only select nuclei and not some small \nbackground dots, you can use \ the command ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["markerblue. ", FontSlant->"Italic", Background->RGBColor[1, 0.9, 0.8]], StyleBox["Just increase the number to not include small background dots.", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593608762515*^9, 3.7275936115305147`*^9}, {3.728192811554085*^9, 3.7281928121450853`*^9}, 3.7281945338955154`*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"selectimagenucleussingle", "=", RowBox[{"SelectComponents", "[", RowBox[{"cropbinbluesingle", ",", "\"\\"", ",", RowBox[{ RowBox[{"#", ">", "500"}], "&"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"disTbluesingle", "=", RowBox[{"ImageAdjust", "[", RowBox[{"DistanceTransform", "[", "selectimagenucleussingle", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"markerbluesingle", "=", RowBox[{"MaxDetect", "[", RowBox[{"disTbluesingle", ",", "0.3"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"watershedComponentsbluesingle", "=", RowBox[{ RowBox[{"WatershedComponents", "[", RowBox[{ RowBox[{"ColorNegate", "[", "disTbluesingle", "]"}], ",", "markerbluesingle"}], "]"}], "*", RowBox[{"ImageData", "[", "selectimagenucleussingle", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"imagenucleussingle", "=", RowBox[{ "Colorize", "[", "watershedComponentsbluesingle", "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsbluesingle", "=", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsbluesingle", ",", "disTbluesingle"}], "}"}], ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsbluecentroidsingle", "=", RowBox[{ RowBox[{"ComponentMeasurements", "[", RowBox[{"watershedComponentsbluesingle", ",", "\"\\""}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsblueelongationsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"watershedComponentsbluesingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsbluelongaxissingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"watershedComponentsbluesingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsblueareasingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"watershedComponentsbluesingle", ",", " ", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Orientationblueanglesingle", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"180", "/", "Pi"}], ")"}], "*", RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ "watershedComponentsbluesingle", ",", " ", "\"\\""}], "]"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"Orientationblueangle2single", "=", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", "0"}], ",", RowBox[{"180", "-", RowBox[{"Abs", "[", "#", "]"}]}], ",", "#"}], "]"}], "&"}], "/@", "Orientationblueanglesingle"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"fitellipsenucleussingle", "=", RowBox[{"Show", "[", RowBox[{"selectimagenucleussingle", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{ RowBox[{"componentsbluesingle", "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "centroid_", ",", "semiAxes_", ",", "orientation_", ",", "maxR_"}], "}"}], "\[RuleDelayed]", RowBox[{"Rotate", "[", RowBox[{ RowBox[{"Disk", "[", RowBox[{"centroid", ",", RowBox[{"{", RowBox[{ RowBox[{"semiAxes", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"semiAxes", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "orientation", ",", "centroid"}], "]"}]}], "}"}]}]}], "}"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.6695480340082808`*^9, 3.66954806056548*^9}, { 3.6699805257997017`*^9, 3.6699805577938657`*^9}, {3.6749782840760746`*^9, 3.6749782936232743`*^9}, {3.6749783784418745`*^9, 3.6749783923142433`*^9}, {3.677391263101221*^9, 3.6773913151268873`*^9}, { 3.6773913459990897`*^9, 3.677391539219451*^9}, 3.67783025386753*^9, { 3.6778304200855303`*^9, 3.67783043905513*^9}, {3.6778305466327305`*^9, 3.6778305485983305`*^9}, {3.6778308842635303`*^9, 3.6778308872275305`*^9}, 3.67792109842704*^9, {3.6780170511044493`*^9, 3.6780170514164495`*^9}, { 3.678441787238469*^9, 3.6784419164536543`*^9}, 3.6785154876662416`*^9, 3.6785159552101917`*^9, {3.6785160085653443`*^9, 3.6785160095325255`*^9}, { 3.678516059281969*^9, 3.678516060436347*^9}, {3.6785161101306596`*^9, 3.6785161426670356`*^9}, {3.678519719292523*^9, 3.678519719715723*^9}, { 3.678519775600523*^9, 3.678519776179723*^9}, {3.678519823213123*^9, 3.678519823650923*^9}, 3.678701121277849*^9, 3.679825042720335*^9, { 3.680323021328041*^9, 3.680323022591552*^9}, {3.680323055942*^9, 3.6803230567687416`*^9}, {3.6821521196069326`*^9, 3.6821521200593386`*^9}, {3.682230569267116*^9, 3.6822305714978733`*^9}, { 3.6823223760157146`*^9, 3.6823223764681144`*^9}, {3.682658550852079*^9, 3.6826585512732787`*^9}, {3.682658588572879*^9, 3.682658589883279*^9}, { 3.6826586725944786`*^9, 3.6826586738268785`*^9}, {3.6827612080211296`*^9, 3.6827612376141396`*^9}, {3.6839720816949244`*^9, 3.6839721155313244`*^9}, {3.6875818512455425`*^9, 3.687581854256516*^9}, { 3.687682385398725*^9, 3.6876824008115253`*^9}, {3.687682596422305*^9, 3.687682769026237*^9}, {3.687682802036895*^9, 3.687682849212114*^9}, { 3.687684240330776*^9, 3.6876842891743765`*^9}, {3.6876847675993886`*^9, 3.6876847680361967`*^9}, {3.687758467863206*^9, 3.687758468175206*^9}, { 3.6877585379852057`*^9, 3.6877585387184057`*^9}, {3.687860482509118*^9, 3.6878604954591103`*^9}, {3.6878605341068616`*^9, 3.6878605736765485`*^9}, {3.688289188709393*^9, 3.6882891905503893`*^9}, { 3.6882947873447266`*^9, 3.688294787614727*^9}, {3.688295443194003*^9, 3.68829544449399*^9}, {3.688296127784433*^9, 3.688296129029421*^9}, 3.6930511887817125`*^9, 3.693051434034137*^9, {3.6979532563817816`*^9, 3.6979532568185816`*^9}, {3.6979532951945815`*^9, 3.6979533189689817`*^9}, {3.697953717134988*^9, 3.6979537178057833`*^9}, { 3.7274991865542183`*^9, 3.727499204930418*^9}, {3.7275908197531147`*^9, 3.727590830775915*^9}, {3.727591327782915*^9, 3.7275913282081146`*^9}, { 3.727591594955115*^9, 3.727591597273915*^9}, {3.727591809693915*^9, 3.727591901890115*^9}, {3.728190764848085*^9, 3.728190765664085*^9}, { 3.728191059143085*^9, 3.728191106387085*^9}, {3.728192317467085*^9, 3.728192348396085*^9}, {3.728192727482085*^9, 3.728192732184085*^9}, { 3.728193610763685*^9, 3.728193635748685*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox["Cells", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], ":"}], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Input", CellChangeTimes->{{3.6695479083414803`*^9, 3.6695479137390804`*^9}, { 3.727499387054018*^9, 3.727499389327018*^9}}], Cell[TextData[StyleBox["This part can be used to quantify the different \ properties from one single cell, such as the elongation, orientation, area, \ etc. ", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593149061515*^9}, {3.7275936166505146`*^9, 3.7275936211625147`*^9}, {3.728192814349085*^9, 3.728192815208085*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"disTgreensingle", "=", RowBox[{"ImageAdjust", "[", RowBox[{"DistanceTransform", "[", "cropbinactinsingle", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"markergreensingle", "=", RowBox[{"MaxDetect", "[", RowBox[{"disTgreensingle", ",", "0.3"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"watershedComponentsgreensingle", "=", RowBox[{ RowBox[{"WatershedComponents", "[", RowBox[{ RowBox[{"ColorNegate", "[", "disTgreensingle", "]"}], ",", "markergreensingle"}], "]"}], "*", RowBox[{"ImageData", "[", "cropbinactinsingle", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"imagesingle", "=", RowBox[{ "Colorize", "[", "watershedComponentsgreensingle", "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreensingle", "=", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsgreensingle", ",", "disTgreensingle"}], "}"}], ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenlongaxissingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsgreensingle", ",", "disTgreensingle"}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenshortaxissingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsgreensingle", ",", "disTgreensingle"}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenelongationsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsgreensingle", ",", "disTgreensingle"}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"componentsgreenareasingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsgreensingle", ",", "disTgreensingle"}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{"componentsgreenperimetersingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ RowBox[{"{", RowBox[{"watershedComponentsgreensingle", ",", "disTgreensingle"}], "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"orientationgreenanglesingle", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"180", "/", "Pi"}], ")"}], "*", RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{ "watershedComponentsgreensingle", ",", " ", "\"\\""}], "]"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"Orientationgreenangle2single", "=", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", "0"}], ",", RowBox[{"180", "-", RowBox[{"Abs", "[", "#", "]"}]}], ",", "#"}], "]"}], "&"}], "/@", "orientationgreenanglesingle"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Lengthcellsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"watershedComponentsgreensingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], "\[IndentingNewLine]", RowBox[{"fitellipseactinsingle", "=", RowBox[{"Show", "[", RowBox[{"cropbinactinsingle", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{ RowBox[{"componentsgreensingle", "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "centroid_", ",", "semiAxes_", ",", "orientation_", ",", "maxR_"}], "}"}], "\[RuleDelayed]", RowBox[{"Rotate", "[", RowBox[{ RowBox[{"Disk", "[", RowBox[{"centroid", ",", RowBox[{"{", RowBox[{ RowBox[{"semiAxes", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"semiAxes", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "orientation", ",", "centroid"}], "]"}]}], "}"}]}]}], "}"}], "]"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.6695479350858803`*^9, 3.6695479761544805`*^9}, { 3.669957073273748*^9, 3.669957176651634*^9}, 3.6699573252524714`*^9, { 3.6699575970103445`*^9, 3.669957639363841*^9}, {3.6699576804383783`*^9, 3.6699577195161276`*^9}, {3.6699581827608347`*^9, 3.669958190529585*^9}, { 3.669958279464615*^9, 3.6699582808062067`*^9}, {3.6699583521446095`*^9, 3.6699583535330095`*^9}, {3.6699583910640097`*^9, 3.66995839217161*^9}, { 3.6699584395300097`*^9, 3.6699584412772098`*^9}, {3.66995862708881*^9, 3.6699586282900095`*^9}, {3.6699765363001204`*^9, 3.6699765449579535`*^9}, {3.6699790373658285`*^9, 3.669979041265829*^9}, { 3.669979356379029*^9, 3.669979356800229*^9}, {3.669980148352829*^9, 3.669980152455629*^9}, {3.6699802170864286`*^9, 3.669980263168829*^9}, { 3.677386559149218*^9, 3.677386802172453*^9}, 3.67738685079152*^9, { 3.6773868866614313`*^9, 3.6773868935147*^9}, {3.6773869320711594`*^9, 3.677386956365693*^9}, 3.6773869866353207`*^9, {3.677387039791146*^9, 3.6773872009433155`*^9}, {3.677387267947087*^9, 3.6773873235949497`*^9}, { 3.6773874007143497`*^9, 3.6773874071363497`*^9}, {3.67738891461407*^9, 3.677388916985285*^9}, {3.6773890918758297`*^9, 3.6773890997070303`*^9}, { 3.67738912981703*^9, 3.6773892636532297`*^9}, {3.67738930338843*^9, 3.67738932376403*^9}, {3.67738936682183*^9, 3.6773893674458303`*^9}, { 3.6778273447937136`*^9, 3.6778273738197136`*^9}, {3.6778279262689137`*^9, 3.6778279425219135`*^9}, {3.6778282995599136`*^9, 3.677828303678914*^9}, 3.6778291473238764`*^9, {3.67782935119503*^9, 3.6778293564642305`*^9}, { 3.67782947983043*^9, 3.6778295460224304`*^9}, {3.67782970106143*^9, 3.67782973772903*^9}, {3.67782980582823*^9, 3.6778298464426303`*^9}, { 3.67782996912103*^9, 3.67782997574743*^9}, {3.67783047537193*^9, 3.6778304875555305`*^9}, {3.67783074893353*^9, 3.67783075055593*^9}, { 3.678016943507049*^9, 3.6780169568138494`*^9}, {3.6780905236512346`*^9, 3.678090526755615*^9}, {3.6785073929288874`*^9, 3.678507393408888*^9}, { 3.678510002153869*^9, 3.67851003102791*^9}, {3.6785102924162817`*^9, 3.6785102936562834`*^9}, {3.6785103362833443`*^9, 3.678510387317416*^9}, { 3.6785154264222116`*^9, 3.6785154522239504`*^9}, {3.6785155364780645`*^9, 3.6785155425308256`*^9}, {3.6785156361426244`*^9, 3.678515661040065*^9}, { 3.6785156989790215`*^9, 3.6785156996498175`*^9}, {3.678516173422247*^9, 3.678516173838839*^9}, {3.6785191476935577`*^9, 3.678519182831335*^9}, { 3.6785193394385366`*^9, 3.6785193944584904`*^9}, {3.678519437619375*^9, 3.678519501420988*^9}, {3.678519595282308*^9, 3.678519607575923*^9}, 3.678519815376523*^9, {3.67852066341356*^9, 3.6785206697827597`*^9}, { 3.6785218128538885`*^9, 3.6785218216073203`*^9}, {3.6785218734027243`*^9, 3.678521882590948*^9}, {3.678522814686961*^9, 3.6785228199441276`*^9}, 3.678522896359438*^9, 3.6787011317610493`*^9, 3.678704529591947*^9, { 3.6791359572855854`*^9, 3.679135990676585*^9}, {3.6792885454140224`*^9, 3.679288560135823*^9}, {3.679825060314335*^9, 3.6798250722073345`*^9}, { 3.6798252044413347`*^9, 3.679825204912335*^9}, {3.6798252634613347`*^9, 3.679825263916335*^9}, 3.6798254242443347`*^9, {3.6798254856083345`*^9, 3.679825486048335*^9}, {3.679825702812335*^9, 3.6798257103623347`*^9}, { 3.679825746793335*^9, 3.679825781543335*^9}, {3.6798258408597345`*^9, 3.679825878393735*^9}, {3.679825910695735*^9, 3.679825940486735*^9}, { 3.679825980987735*^9, 3.6798259910577345`*^9}, {3.6804377367352915`*^9, 3.680437762303618*^9}, {3.6804378074032183`*^9, 3.680437824032818*^9}, { 3.680494358458598*^9, 3.6804943700439005`*^9}, {3.6804956701419106`*^9, 3.680495670578705*^9}, 3.6804982043933673`*^9, 3.68052042843396*^9, 3.6808450621075163`*^9, {3.6808451054911165`*^9, 3.6808451068171163`*^9}, { 3.6817271590324945`*^9, 3.681727159282095*^9}, 3.681729571112961*^9, { 3.681729601336961*^9, 3.6817296722929606`*^9}, {3.6817298360929604`*^9, 3.6817298363829603`*^9}, {3.681729871112961*^9, 3.6817298719629602`*^9}, { 3.682058144856574*^9, 3.6820581777713084`*^9}, {3.6820606499396534`*^9, 3.6820606650402603`*^9}, {3.682064351060437*^9, 3.6820643675492144`*^9}, { 3.6820659247279825`*^9, 3.682065987268382*^9}, {3.682070683429693*^9, 3.6820707270940933`*^9}, {3.6821349697679663`*^9, 3.682134972271967*^9}, { 3.682152292309127*^9, 3.6821523018095264`*^9}, {3.682152350481527*^9, 3.682152350902727*^9}, {3.682154526263827*^9, 3.6821545402414265`*^9}, { 3.682154788718927*^9, 3.682154792244527*^9}, {3.6821553654477267`*^9, 3.6821554318257265`*^9}, {3.682159053650673*^9, 3.6821590563182726`*^9}, { 3.682164158517103*^9, 3.682164160108303*^9}, {3.6821643230753517`*^9, 3.682164324744359*^9}, 3.682164407279234*^9, {3.682223983363208*^9, 3.682223990211608*^9}, {3.6822250178462305`*^9, 3.6822250206854124`*^9}, { 3.6822258618651705`*^9, 3.6822258623331738`*^9}, 3.6822297798864937`*^9, { 3.6822307982410035`*^9, 3.6822307988025928`*^9}, {3.6822308638222504`*^9, 3.682230865273032*^9}, {3.6822314087493725`*^9, 3.682231409435768*^9}, 3.6822314432915506`*^9, {3.682233606345031*^9, 3.682233630593188*^9}, { 3.6823224034249144`*^9, 3.6823224038305144`*^9}, {3.682322762167714*^9, 3.6823227652097144`*^9}, {3.682322959403714*^9, 3.6823229601837144`*^9}, { 3.6823240708511715`*^9, 3.682324071537571*^9}, {3.6823289765405626`*^9, 3.682329055804163*^9}, {3.682330392249663*^9, 3.682330392686463*^9}, { 3.6823305143508625`*^9, 3.6823305148032627`*^9}, 3.6824005410765233`*^9, 3.682400651405323*^9, 3.6824007389745235`*^9, {3.682400906233723*^9, 3.682400979566164*^9}, {3.682401010610783*^9, 3.682401011687107*^9}, { 3.682401061962611*^9, 3.6824010625397706`*^9}, {3.682423428352567*^9, 3.6824234290811625`*^9}, {3.682423664220131*^9, 3.6824236911455584`*^9}, { 3.682656974765295*^9, 3.6826569764812727`*^9}, {3.6827568822463837`*^9, 3.6827569303073835`*^9}, {3.6827603499003215`*^9, 3.682760350695922*^9}, { 3.683343174446224*^9, 3.683343174929796*^9}, {3.683343233847597*^9, 3.683343266465315*^9}, {3.6833439851675315`*^9, 3.683344013278371*^9}, 3.6833449629778814`*^9, {3.6833449993412485`*^9, 3.68334500065164*^9}, { 3.6834329916948786`*^9, 3.6834330067644787`*^9}, {3.6834334598410788`*^9, 3.6834334608550787`*^9}, {3.6834338031408787`*^9, 3.6834338041236787`*^9}, {3.6839671257489414`*^9, 3.6839671295085173`*^9}, {3.6871665468016586`*^9, 3.6871665472072587`*^9}, {3.687264052165258*^9, 3.687264078151458*^9}, { 3.687264744156785*^9, 3.687264874752926*^9}, {3.687264928824526*^9, 3.687264948076926*^9}, 3.6875818198401785`*^9, {3.6876824489999247`*^9, 3.6876824520575247`*^9}, {3.6876824821811247`*^9, 3.6876825875300198`*^9}, {3.6876828709430532`*^9, 3.6876828802095127`*^9}, 3.6876829177121525`*^9, {3.6876843510283766`*^9, 3.6876843960967765`*^9}, { 3.6876874218897877`*^9, 3.687687435524188*^9}, {3.687758440438406*^9, 3.6877584431528063`*^9}, 3.687758513820806*^9, {3.6877593813628387`*^9, 3.687759382517231*^9}, {3.687759464050677*^9, 3.6877594644806767`*^9}, { 3.687759532151922*^9, 3.6877595326419163`*^9}, {3.6877595833880653`*^9, 3.687759585213242*^9}, 3.6877597417928348`*^9, {3.687859886544531*^9, 3.687859887199723*^9}, {3.6878606092052135`*^9, 3.687860610671839*^9}, 3.687860727573022*^9, 3.687861857431227*^9, {3.688212840001099*^9, 3.6882128418156414`*^9}, {3.6882129022905064`*^9, 3.688212902727292*^9}, { 3.68821339849487*^9, 3.6882133988848705`*^9}, {3.6882134361688704`*^9, 3.6882134363872705`*^9}, 3.6882891410591726`*^9, {3.690092088373283*^9, 3.690092146120453*^9}, {3.691303330367447*^9, 3.6913033317674465`*^9}, { 3.693047805494296*^9, 3.693047805934292*^9}, {3.6962291809624157`*^9, 3.696229190133252*^9}, {3.6966623780262694`*^9, 3.6966623786342525`*^9}, { 3.6979509394876995`*^9, 3.6979509404080753`*^9}, {3.697952167046312*^9, 3.6979521689806995`*^9}, {3.6979532171009817`*^9, 3.6979532175689816`*^9}, {3.697953274009782*^9, 3.6979532752733817`*^9}, { 3.6979538652464323`*^9, 3.6979538674616184`*^9}, {3.6979549814288816`*^9, 3.697954982786064*^9}, {3.6992533018262167`*^9, 3.6992533036202974`*^9}, 3.6992542558081493`*^9, {3.7199033737718554`*^9, 3.7199033745402503`*^9}, { 3.727499207785618*^9, 3.7274992082536182`*^9}, {3.727499327800418*^9, 3.727499328192418*^9}, {3.7275908687073145`*^9, 3.7275908841667147`*^9}, { 3.727591335780115*^9, 3.727591336706515*^9}, {3.727591654115715*^9, 3.7275917842015147`*^9}, {3.728190119560885*^9, 3.728190119997685*^9}, { 3.728191128863085*^9, 3.7281911452850847`*^9}, {3.728192735312085*^9, 3.728192739848085*^9}}], Cell[BoxData[ RowBox[{"{", "134.19324325762457`", "}"}]], "Output", CellChangeTimes->{3.728193642870685*^9}] }, Open ]], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox["Focal", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], StyleBox[" ", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], RowBox[{ StyleBox[ RowBox[{ StyleBox["a", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], "dh", StyleBox["e", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], "si", StyleBox["o", "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]], "ns"}]], ":"}]}], "Subsubsection", FontSize->16, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Input", CellChangeTimes->{{3.6695479083414803`*^9, 3.6695479137390804`*^9}, { 3.727499387054018*^9, 3.727499389327018*^9}, {3.7281925433320847`*^9, 3.7281925447250853`*^9}}], Cell[TextData[{ StyleBox["This part is used to quantify the different properties from the \ focal adhesions of one single cell of interest, such as the elongation, \ orientation, area, etc. FAs smaller than 0.1 um^2 (size can be adjusted in ", Background->RGBColor[1, 0.9, 0.8]], StyleBox["sizefocal)", FontSlant->"Italic", FontVariations->{"Underline"->True}, Background->RGBColor[1, 0.9, 0.8]], StyleBox[" are excluded to \nensure that background noise is eliminated from \ the analysis.\n", Background->RGBColor[1, 0.9, 0.8]] }], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593149061515*^9}, {3.7275936166505146`*^9, 3.7275936211625147`*^9}, {3.728192552599085*^9, 3.728192676267085*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"sizefocal", "=", "0.1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"selectfocalareanewsingle", "=", RowBox[{"SelectComponents", "[", RowBox[{"cropquantifyfocalsingle", ",", " ", "\"\\"", ",", RowBox[{ RowBox[{ RowBox[{"sizefocal", "/", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}], "<", "#"}], "&"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"shortaxisfocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"longaxisfocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"centroidfocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"elongationfocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lengthfocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"perimeterfocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", "factor"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"areafocalsingle", "=", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", " ", "\"\\""}], "]"}], "]"}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", RowBox[{"b", "*", RowBox[{"(", RowBox[{"factor", "^", "2"}], ")"}]}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Orientationfocalsingle", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"180", "/", "Pi"}], ")"}], "*", RowBox[{"Flatten", "[", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", " ", "\"\\""}], "]"}], "]"}]}], "/.", RowBox[{ RowBox[{"Rule", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[Rule]", "b"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"Orientationfocal2single", "=", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", "0"}], ",", RowBox[{"180", "-", RowBox[{"Abs", "[", "#", "]"}]}], ",", "#"}], "]"}], "&"}], "/@", "Orientationfocalsingle"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"spatialdistributionfocalsingle", "=", RowBox[{ RowBox[{ RowBox[{"Outer", "[", RowBox[{ "EuclideanDistance", ",", "componentsbluecentroidsingle", ",", "centroidfocalsingle", ",", "1"}], "]"}], "*", "factor"}], "//", "Flatten"}]}], ";"}], "\n", RowBox[{ RowBox[{"fitellipsefocalsingle", "=", RowBox[{"ComponentMeasurements", "[", RowBox[{"selectfocalareanewsingle", ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{"selectfocalareanewsingle", ",", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{ RowBox[{"fitellipsefocalsingle", "[", RowBox[{"[", RowBox[{"All", ",", "2"}], "]"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "centroid_", ",", "semiAxes_", ",", "orientation_", ",", "maxR_"}], "}"}], "\[RuleDelayed]", RowBox[{"Rotate", "[", RowBox[{ RowBox[{"Disk", "[", RowBox[{"centroid", ",", RowBox[{"{", RowBox[{ RowBox[{"semiAxes", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"semiAxes", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "orientation", ",", "centroid"}], "]"}]}], "}"}]}]}], "}"}], "]"}]}], "]"}]}], "Input", CellChangeTimes->{{3.6950382469636765`*^9, 3.695038262766173*^9}, { 3.6950383413584614`*^9, 3.6950383415768576`*^9}, {3.700380881351607*^9, 3.7003808820380116`*^9}, {3.700477220831162*^9, 3.7004772215486975`*^9}, { 3.7033258930246024`*^9, 3.7033258939958024`*^9}, {3.727592027378515*^9, 3.7275920291945148`*^9}, {3.727592124100515*^9, 3.727592128465515*^9}, { 3.7275928395565147`*^9, 3.7275928402375145`*^9}, {3.728191275055085*^9, 3.728191296274085*^9}, {3.728192048647085*^9, 3.728192048863085*^9}}], Cell[BoxData[ StyleBox[ RowBox[{"Export", ":"}], "Subsubsection", FontColor->RGBColor[1, 0, 0]]], "Input", CellChangeTimes->{{3.6699775226609287`*^9, 3.6699775238621287`*^9}}], Cell[TextData[StyleBox["This part can be used to export the images of the \ single cells, nuclei and focal adhesions.\nThe extracted data from these \ cells, nuclei and focal adhesions are exported to an excel file. \n", Background->RGBColor[1, 0.9, 0.8]]], "Text", CellChangeTimes->{{3.683972471320524*^9, 3.683972568929724*^9}, { 3.727593131814515*^9, 3.727593149061515*^9}, {3.7275936166505146`*^9, 3.7275936211625147`*^9}, {3.728192552599085*^9, 3.728192676267085*^9}, { 3.7281927890490847`*^9, 3.728192828176085*^9}, {3.7281944206565*^9, 3.728194552870124*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"SetDirectory", "[", "dir", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "#", ",", "\"\\""}], "]"}], "&"}], "/@", "removebackground7"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Export", "[", RowBox[{"\"\\"", ",", "#", ",", "\"\\""}], "]"}], "&"}], "/@", "imageadhesions7"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "cropbinactinsingle", ",", "\"\\""}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "cropbinbluesingle", ",", "\"\\""}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "selectfocalareanewsingle", ",", "\"\\""}], "]"}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.6784412360096726`*^9, 3.678441236459673*^9}, 3.682227010509815*^9, {3.687687460109788*^9, 3.687687460858588*^9}, 3.696229299339284*^9, {3.6966691315702925`*^9, 3.6966691329742928`*^9}, { 3.6992531494384174`*^9, 3.6992531535568175`*^9}, {3.719900719612254*^9, 3.719900720958802*^9}, {3.727518347759469*^9, 3.7275183544254684`*^9}, { 3.7275909326181145`*^9, 3.727590998678115*^9}, {3.727592630225515*^9, 3.727592631649515*^9}, {3.728191366585085*^9, 3.728191367022085*^9}, { 3.7281916351850853`*^9, 3.728191733852085*^9}, 3.728192006228085*^9, { 3.728193656177685*^9, 3.728193656626685*^9}, {3.728193725936685*^9, 3.7281937627026854`*^9}, {3.728193809380685*^9, 3.728193862714685*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Single cells:", FontSize->16, FontSlant->"Italic", FontColor->RGBColor[1, 0.5, 0]]], "Subsection", CellChangeTimes->{{3.6778300357766304`*^9, 3.67783004463023*^9}, { 3.7275925008885145`*^9, 3.7275925022405148`*^9}, {3.727592604403515*^9, 3.727592608890515*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"actinarea", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "componentsgreenareasingle", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"actinelongation", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "componentsgreenelongationsingle", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"actinelongaxis", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "componentsgreenlongaxissingle", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"actinorientation", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "Orientationgreenangle2single", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{"nucleusarea", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "componentsblueareasingle", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nucleuselongation", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "componentsblueelongationsingle", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nucleuslongaxis", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "componentsbluelongaxissingle", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"nucleusorientation", "=", RowBox[{"PadRight", "[", RowBox[{ RowBox[{"Flatten", "[", "Orientationblueangle2single", "]"}], ",", RowBox[{"Length", "[", "Orientationfocal2single", "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.697457429993184*^9, 3.6974574495061846`*^9}, { 3.6974575550727844`*^9, 3.697457606743984*^9}, {3.6974577037324843`*^9, 3.6974577552280846`*^9}, 3.6974584615784845`*^9, {3.6984073648599815`*^9, 3.6984073944531813`*^9}, 3.698407451767582*^9, {3.7015800989225283`*^9, 3.701580120046116*^9}, {3.728192181062085*^9, 3.7281922181860847`*^9}, 3.728192511306085*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"mytablesinglecells", "=", RowBox[{ RowBox[{"{", RowBox[{ "actinarea", ",", "actinelongation", ",", "actinelongaxis", ",", "actinorientation", ",", "nucleusarea", ",", "nucleuselongation", ",", "nucleuslongaxis", ",", "nucleusorientation", ",", "shortaxisfocalsingle", ",", "longaxisfocalsingle", ",", "elongationfocalsingle", ",", "lengthfocalsingle", ",", "areafocalsingle", ",", "Orientationfocal2single", ",", "spatialdistributionfocalsingle"}], "}"}], "//", "Transpose"}]}], ";"}], "\n", RowBox[{ RowBox[{"headerssinglecells", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", " ", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"datasinglecells", "=", RowBox[{"Prepend", "[", RowBox[{"mytablesinglecells", ",", "headerssinglecells"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Export", "[", RowBox[{ "\"\\"", ",", "datasinglecells", ",", "\"\\""}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.7275926522405148`*^9, 3.7275926585445147`*^9}, { 3.7275927300045147`*^9, 3.7275927993625145`*^9}, {3.727592950939515*^9, 3.7275929796555147`*^9}, 3.7275930340965147`*^9, {3.728191757444085*^9, 3.728191898306085*^9}, {3.728192057045085*^9, 3.7281920571600847`*^9}, 3.7281920948180847`*^9, {3.728192246095085*^9, 3.728192262059085*^9}, { 3.7281923773440847`*^9, 3.728192410371085*^9}, {3.728192445959085*^9, 3.728192488097085*^9}}] }, Open ]] }, WindowSize->{1904, 1118}, WindowMargins->{{-8, Automatic}, {Automatic, 0}}, FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (September 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 546, 7, 49, "Text"], Cell[1107, 29, 225, 5, 69, "Input"], Cell[1335, 36, 354, 9, 44, "Input"], Cell[1692, 47, 417, 6, 30, "Text"], Cell[CellGroupData[{ Cell[2134, 57, 2653, 45, 50, "Input"], Cell[4790, 104, 2478, 46, 107, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7305, 155, 165, 2, 49, "Subsection"], Cell[7473, 159, 893, 20, 49, "Text"], Cell[8369, 181, 8694, 167, 183, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[17100, 353, 420, 6, 49, "Subsection"], Cell[17523, 361, 448, 7, 30, "Text"], Cell[17974, 370, 2620, 74, 278, "Input"], Cell[20597, 446, 1382, 42, 44, "Input"], Cell[21982, 490, 428, 6, 30, "Text"], Cell[22413, 498, 7123, 127, 126, "Input"], Cell[29539, 627, 1468, 46, 44, "Input"], Cell[31010, 675, 873, 19, 30, "Text"], Cell[31886, 696, 2127, 69, 126, "Input"], Cell[CellGroupData[{ Cell[34038, 769, 208, 3, 39, "Subsubsection"], Cell[34249, 774, 1300, 25, 87, "Text"], Cell[35552, 801, 10555, 166, 126, "Input"], Cell[46110, 969, 9985, 173, 145, "Input"], Cell[56098, 1144, 2430, 80, 44, "Input"], Cell[58531, 1226, 246, 7, 38, "Input"], Cell[58780, 1235, 1089, 23, 49, "Text"], Cell[59872, 1260, 11416, 298, 297, "Input"], Cell[71291, 1560, 428, 13, 38, "Input"], Cell[71722, 1575, 1023, 20, 49, "Text"], Cell[72748, 1597, 17616, 382, 297, "Input"], Cell[90367, 1981, 1180, 37, 38, "Input"], Cell[91550, 2020, 803, 16, 68, "Text"], Cell[92356, 2038, 6132, 183, 259, "Input"], Cell[98491, 2223, 181, 4, 42, "Input"], Cell[98675, 2229, 619, 9, 68, "Text"], Cell[99297, 2240, 3979, 104, 202, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[103325, 2350, 185, 4, 43, "Subsection"], Cell[103513, 2356, 2203, 43, 88, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[105753, 2404, 184, 4, 43, "Subsection"], Cell[105940, 2410, 1484, 33, 88, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[107461, 2448, 248, 5, 43, "Subsection"], Cell[107712, 2455, 1440, 32, 88, "Input"], Cell[109155, 2489, 266, 5, 35, "Text"], Cell[109424, 2496, 1073, 16, 68, "Text"], Cell[110500, 2514, 1258, 30, 145, "Input"], Cell[CellGroupData[{ Cell[111783, 2548, 5195, 134, 278, "Input"], Cell[116981, 2684, 5107, 116, 2406, "Output"] }, Open ]], Cell[122103, 2803, 2327, 63, 240, "Input"], Cell[124433, 2868, 1805, 60, 44, "Input"], Cell[126241, 2930, 246, 7, 38, "Input"], Cell[126490, 2939, 708, 14, 49, "Text"], Cell[127201, 2955, 7865, 180, 259, "Input"], Cell[135069, 3137, 428, 13, 38, "Input"], Cell[135500, 3152, 419, 6, 30, "Text"], Cell[CellGroupData[{ Cell[135944, 3162, 14816, 287, 278, "Input"], Cell[150763, 3451, 110, 2, 30, "Output"] }, Open ]], Cell[150888, 3456, 1149, 37, 38, "Input"], Cell[152040, 3495, 767, 15, 68, "Text"], Cell[152810, 3512, 6084, 166, 278, "Input"], Cell[158897, 3680, 181, 4, 42, "Input"], Cell[159081, 3686, 578, 8, 68, "Text"], Cell[159662, 3696, 1821, 40, 145, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[161520, 3741, 294, 6, 43, "Subsection"], Cell[161817, 3749, 2586, 63, 202, "Input"], Cell[164406, 3814, 2044, 42, 126, "Input"] }, Open ]] } ] *)