(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 50350, 1486] NotebookOptionsPosition[ 46109, 1408] NotebookOutlinePosition[ 47107, 1438] CellTagsIndexPosition[ 47064, 1435] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["\<\ ReadImage/: ReadImage[filename_, n_] := ReadList[filename, Table[Number, {n}]] DispIt/: DispIt[t_] := ListPlot3D[t, Lighting -> False, Mesh -> False, AspectRatio -> 3, ViewPoint -> {0, 0, -1000}, Axes -> False] DispIt/: DispIt[t_, a_] := ListPlot3D[t, Lighting -> False, Mesh -> False, AspectRatio -> a, ViewPoint -> {0, 0, -1000}, Axes -> False] EpsOut/: EpsOut[which_] := Display[\"!psfix -epsf > out.ps\", which] SetOptions[ListPlot, PlotJoined -> True]; \ \>", "Text", Evaluatable->True, ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"c0b1aa38-089b-4b5d-b773-486cbcf380af"], Cell[BoxData[ TemplateBox[{ "SetOptions","optnf", "\"\\!\\(\\*RowBox[{\\\"PlotJoined\\\"}]\\) is not a known option for \ \\!\\(\\*RowBox[{\\\"ListPlot\\\"}]\\).\"",2,5,1,26665207920329746693,"Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{ 3.7257064592184734`*^9},ExpressionUUID->"9a4b05c0-6d2e-44f4-8f88-\ 379bdcccd709"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "synthesise", " ", "a", " ", "simple", " ", "3", "D", " ", "image"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"nptsz", " ", "=", " ", RowBox[{"nptsy", " ", "=", " ", RowBox[{"nptsx", " ", "=", " ", "32"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ims", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"50", " ", RowBox[{"Random", "[", "]"}]}], ",", RowBox[{"{", "nptsx", "}"}]}], "]"}], ",", RowBox[{"{", "nptsy", "}"}]}], "]"}], ",", RowBox[{"{", "nptsz", "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"zstart", "=", RowBox[{"Floor", "[", FractionBox["nptsz", "4"], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ystart", "=", RowBox[{"Floor", "[", FractionBox["nptsy", "4"], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"xstart", "=", RowBox[{"Floor", "[", FractionBox["nptsx", "4"], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"zw", "=", RowBox[{"Floor", "[", FractionBox["nptsz", "4"], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"yw", "=", RowBox[{"Floor", "[", FractionBox["nptsy", "4"], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"xw", "=", RowBox[{"Floor", "[", FractionBox["nptsx", "4"], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"zcen", "=", RowBox[{"Floor", "[", FractionBox[ RowBox[{"3", " ", "nptsz"}], "4"], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ycen", "=", RowBox[{"Floor", "[", FractionBox[ RowBox[{"3", " ", "nptsy"}], "4"], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"xcen", "=", RowBox[{"Floor", "[", FractionBox[ RowBox[{"3", " ", "nptsx"}], "4"], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{ RowBox[{"ims", "\[LeftDoubleBracket]", RowBox[{"m", ",", "n", ",", "p"}], "\[RightDoubleBracket]"}], "+=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"m", "-", "ycen"}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"n", "-", "xcen"}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"p", "-", "zcen"}], ")"}], "2"]}], "<", RowBox[{"0.8", " ", SuperscriptBox["xw", "2"]}]}], ",", "200", ",", "0"}], "]"}]}], ";"}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "zw"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "yw"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "xw"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"ims", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"ystart", "+", "m"}], ",", RowBox[{"xstart", "+", "n"}], ",", RowBox[{"zstart", "+", "p"}]}], "\[RightDoubleBracket]"}], "+=", "100"}]}], "]"}]}], "]"}]}], "]"}], ";"}]}]}]], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"51fef20c-c3c2-4807-87dc-afb82d91d5d2"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Use", " ", "synthetic", " ", "image"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"im", " ", "=", " ", "ims"}], ";"}]}]], "Input",ExpressionUUID->\ "15a3ef0a-f6ee-4f3c-a272-28aac592a3b8"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"{", RowBox[{"nptsx", ",", "nptsy", ",", "nptsz"}], "}"}], "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"im", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{"0", ",", "350"}], "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"73661879-1ebc-4122-87f4-61a726ba3245"], Cell[BoxData[ RowBox[{"{", RowBox[{"32", ",", "32", ",", "32"}], "}"}]], "Output", CellChangeTimes->{ 3.7257064597030907`*^9},ExpressionUUID->"e6473a7a-c88c-4c51-8634-\ 2f9d23a62cb0"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{ "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], "*", "\[IndentingNewLine]", "Now", " ", "the", " ", "Fourier", " ", "Versions"}], " ", "\[IndentingNewLine]", "*******************************************************)"}], RowBox[{"(*", " ", RowBox[{ "this", " ", "function", " ", "rotates", " ", "quadrants", " ", "of", " ", "a", " ", "2", "D", " ", "image"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"RotImage2D", "[", "im_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"nptsx", ",", "nptsy"}], "}"}], ",", RowBox[{ RowBox[{"nptsy", "=", RowBox[{"Length", "[", "im", "]"}]}], ";", RowBox[{"nptsx", "=", RowBox[{"Length", "[", RowBox[{ "im", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}]}], ";", RowBox[{"RotateLeft", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"RotateLeft", "[", RowBox[{ RowBox[{"Transpose", "[", "im", "]"}], ",", RowBox[{"Floor", "[", RowBox[{ FractionBox["nptsx", "2"], "+", "1"}], "]"}]}], "]"}], "]"}], ",", RowBox[{"Floor", "[", RowBox[{ FractionBox["nptsy", "2"], "+", "1"}], "]"}]}], "]"}]}]}], "]"}]}], "\[IndentingNewLine]"}], RowBox[{"(*", " ", RowBox[{"inverse", " ", "of", " ", "the", " ", "above"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"IRotImage2D", "[", "im_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"nptsx", ",", "nptsy"}], "}"}], ",", RowBox[{ RowBox[{"nptsy", "=", RowBox[{"Length", "[", "im", "]"}]}], ";", RowBox[{"nptsx", "=", RowBox[{"Length", "[", RowBox[{"im", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}]}], ";", RowBox[{"RotateRight", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"RotateRight", "[", RowBox[{ RowBox[{"Transpose", "[", "im", "]"}], ",", RowBox[{"Floor", "[", RowBox[{ FractionBox["nptsx", "2"], "+", "1"}], "]"}]}], "]"}], "]"}], ",", RowBox[{"Floor", "[", RowBox[{ FractionBox["nptsy", "2"], "+", "1"}], "]"}]}], "]"}]}]}], "]"}]}]}]}]], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"987160d4-2633-4a23-8474-ae7b7de0c2e7"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"j", "+", RowBox[{"Floor", "[", RowBox[{"nptsz", "/", "2"}], " ", "]"}]}], ",", "nptsz"}], "]"}], "+", "1"}], ",", RowBox[{"{", RowBox[{"j", ",", "nptsz"}], "}"}]}], "]"}]], "Input",ExpressionUUID->\ "cc39ec17-86a1-4231-a8dd-900c18785bb1"], Cell[BoxData[ RowBox[{"{", RowBox[{ "18", ",", "19", ",", "20", ",", "21", ",", "22", ",", "23", ",", "24", ",", "25", ",", "26", ",", "27", ",", "28", ",", "29", ",", "30", ",", "31", ",", "32", ",", "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",", "8", ",", "9", ",", "10", ",", "11", ",", "12", ",", "13", ",", "14", ",", "15", ",", "16", ",", "17"}], "}"}]], "Output", CellChangeTimes->{ 3.7257064605730057`*^9},ExpressionUUID->"8f9c67ba-5dab-42f7-a8c3-\ 9940d0853e81"] }, Open ]], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"RotImage3D", "[", "im_", "]"}], " ", ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"RotImage2D", "[", RowBox[{"im", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"j", "+", RowBox[{"Floor", "[", RowBox[{"nptsz", "/", "2"}], " ", "]"}]}], ",", "nptsz"}], "]"}], "+", "1"}], "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "nptsz"}], "}"}]}], "]"}]}]}]], "Input",ExpressionUUID\ ->"72a638bf-0724-4b00-b187-0fcfc119e6dd"], Cell[BoxData[{ RowBox[{ RowBox[{"fim", "=", RowBox[{"Fourier", "[", "im", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{"fim2", "=", RowBox[{"RotImage", "[", "fim", "]"}]}], ";", "\n", RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"Re", "[", RowBox[{"Log", "[", "fim2", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";", "\n", RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"Im", "[", RowBox[{"Log", "[", "fim2", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", "*)"}]}]}], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"76a70a5b-bb97-4425-ace9-3f12495ca1b4"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "now", " ", "form", " ", "derivative", " ", "of", " ", "Gaussian", " ", "edge", " ", "filters"}], " ", "*)"}]}]], "Input",ExpressionUUID->\ "2afa6a17-18f8-4a75-87e8-88d570c3c0b1"], Cell[BoxData[{ RowBox[{ RowBox[{"G", "[", RowBox[{"x_", ",", "s_"}], "]"}], ":=", FractionBox[ SuperscriptBox["\[ExponentialE]", RowBox[{"-", FractionBox[ SuperscriptBox["x", "2"], RowBox[{"2", " ", SuperscriptBox["s", "2"]}]]}]], SqrtBox[ RowBox[{"2", " ", "\[Pi]"}]]]}], "\n", RowBox[{ RowBox[{"Gx", "[", RowBox[{"x_", ",", "s_"}], "]"}], ":=", RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "xx"], RowBox[{"G", "[", RowBox[{"xx", ",", "s"}], "]"}]}], "/.", "\[InvisibleSpace]", RowBox[{"xx", "\[Rule]", "x"}]}]}], "\n", RowBox[{ RowBox[{"Gxx", "[", RowBox[{"x_", ",", "s_"}], "]"}], ":=", RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", RowBox[{"{", RowBox[{"xx", ",", "2"}], "}"}]], RowBox[{"G", "[", RowBox[{"xx", ",", "s"}], "]"}]}], "/.", "\[InvisibleSpace]", RowBox[{"xx", "\[Rule]", "x"}]}]}]}], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"30691906-f23e-46a9-a500-bb9be57916ac"], Cell[BoxData[{ RowBox[{ RowBox[{"xmaskim", "=", RowBox[{"Table", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", "nptsx", "}"}]}], "]"}], ",", RowBox[{"{", "nptsy", "}"}], ",", RowBox[{"{", "nptsz", "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zmaskim", " ", "=", " ", RowBox[{"ymaskim", " ", "=", " ", "xmaskim"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zzmaskim", " ", "=", " ", RowBox[{"yymaskim", " ", "=", RowBox[{"xxmaskim", " ", "=", " ", "xmaskim"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zxmaskim", " ", "=", " ", RowBox[{"zymaskim", " ", "=", " ", RowBox[{"xymaskim", " ", "=", " ", "xmaskim"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"ycen", "=", FractionBox["nptsy", "2"]}], ";"}], "\n", RowBox[{ RowBox[{"xcen", "=", FractionBox["nptsx", "2"]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zcen", "=", FractionBox["nptsz", "2"]}], ";"}], "\n", RowBox[{ RowBox[{"sx", "=", "1.5"}], ";"}], "\n", RowBox[{ RowBox[{"sy", "=", "1.5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sz", " ", "=", "1.5"}], ";"}], "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"xmaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"G", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"Gx", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"xmaskim", "[", RowBox[{"[", RowBox[{"xcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"ymaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"G", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"Gx", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"ymaskim", "[", RowBox[{"[", RowBox[{"ycen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"zmaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"Gx", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zmaskim", "[", RowBox[{"[", RowBox[{"zcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\n"}], RowBox[{"(*", " ", RowBox[{"2", "nd", " ", "derivative", " ", "images"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"xxmaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"G", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"Gxx", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"xxmaskim", "[", RowBox[{"[", RowBox[{"xcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"yymaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"G", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"Gxx", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"yymaskim", "[", RowBox[{"[", RowBox[{"ycen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"zzmaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"Gxx", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zzmaskim", "[", RowBox[{"[", RowBox[{"zcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"xymaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"G", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"Gx", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"Gx", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"xymaskim", "[", RowBox[{"[", RowBox[{"zcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"zxmaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"Gx", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"Gx", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zxmaskim", "[", RowBox[{"[", RowBox[{"zcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"m", "=", "1"}], ",", RowBox[{"m", "\[LessEqual]", "nptsy"}], ",", RowBox[{"m", "++"}], ",", RowBox[{"For", "[", RowBox[{ RowBox[{"n", "=", "1"}], ",", RowBox[{"n", "\[LessEqual]", "nptsx"}], ",", RowBox[{"n", "++"}], ",", RowBox[{ RowBox[{"zymaskim", "\[LeftDoubleBracket]", RowBox[{"p", ",", "m", ",", "n"}], "\[RightDoubleBracket]"}], "=", RowBox[{ RowBox[{"Gx", "[", RowBox[{ RowBox[{"p", "-", "zcen"}], ",", "sz"}], "]"}], " ", RowBox[{"Gx", "[", RowBox[{ RowBox[{"m", "-", "ycen"}], ",", "sy"}], "]"}], " ", RowBox[{"G", "[", RowBox[{ RowBox[{"n", "-", "xcen"}], ",", "sx"}], "]"}]}]}]}], "]"}]}], "]"}]}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zymaskim", "[", RowBox[{"[", RowBox[{"zcen", "//", "Floor"}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}], ";"}], "\[IndentingNewLine]"}]}], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"5282cb61-77f6-4d12-b6e0-aee663258f48"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"xmaskim", "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "1"}], "]"}], "]"}], "//", "N"}]], "Input",Exp\ ressionUUID->"e85441a9-29a2-4ba0-9122-961890854241"], Cell[BoxData["3.0371528767555977`*^-66"], "Output", CellChangeTimes->{ 3.7257064826831512`*^9},ExpressionUUID->"c577f68f-3980-4d15-9f03-\ 938e076ef1e2"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"dim", " ", "=", " ", "zymaskim"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"max", " ", "=", " ", RowBox[{"-", RowBox[{"10", "^", RowBox[{"(", "6", ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"min", " ", "=", " ", RowBox[{"-", "max"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"max", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", ">", " ", "max"}], ",", "#", ",", "max"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "dim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"min", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", " ", "min"}], ",", "#", ",", "min"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "dim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}], "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "Input",ExpressionUUID->"1bd497a0-a786-410a-\ beec-bae87069bb41"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", "0.008479028082118954`"}], ",", "0.008479028082118954`"}], "}"}]], "Output", CellChangeTimes->{ 3.7257064828298674`*^9},ExpressionUUID->"4e460d56-48ca-419f-a259-\ 6402141d5846"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"1", "st", " ", "derivatives"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"fxmaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "xmaskim", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"fymaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "ymaskim", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"fzmaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "zmaskim", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], RowBox[{"(*", " ", RowBox[{"2", "nd", " ", "derivatives"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"fxxmaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "xxmaskim", "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"fyymaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "yymaskim", "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"fzzmaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "zzmaskim", "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"fxymaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "xymaskim", "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"fzxmaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "zxmaskim", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"fzymaskim", "=", RowBox[{"Fourier", "[", RowBox[{"N", "[", "zymaskim", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}]}]}]], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"cd7d5636-4a8e-48c7-8ce7-c5a8418ca34c"], Cell[BoxData[ RowBox[{"\n", RowBox[{ RowBox[{ RowBox[{"xfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fxmaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"xfiltimf", "[", RowBox[{"[", "xcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"yfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fymaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"yfiltimf", "[", RowBox[{"[", "ycen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fzmaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zfiltimf", "[", RowBox[{"[", "zcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], RowBox[{"(*", " ", RowBox[{"2", "nd", " ", "derivatives"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"xxfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fxxmaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"xxfiltimf", "[", RowBox[{"[", "xcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"yyfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fyymaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"yyfiltimf", "[", RowBox[{"[", "ycen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zzfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fzzmaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zzfiltimf", "[", RowBox[{"[", "zcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"xyfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fxymaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"xyfiltimf", "[", RowBox[{"[", "xcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zyfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fzymaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zyfiltimf", "[", RowBox[{"[", "ycen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zxfiltimf", "=", RowBox[{ RowBox[{"Chop", "[", RowBox[{"InverseFourier", "[", RowBox[{"N", "[", RowBox[{"fim", " ", "fzxmaskim"}], "]"}], "]"}], "]"}], "//", "RotImage3D"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"zxfiltimf", "[", RowBox[{"[", "zcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]}]], "Input", ImageRegion->{{0, 1}, {0, 1}},ExpressionUUID->"433e5f73-9da1-443b-9d6b-12f4b742bd5b"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"dim", " ", "=", " ", "zzfiltimf"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"max", " ", "=", " ", RowBox[{"-", RowBox[{"10", "^", RowBox[{"(", "6", ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"min", " ", "=", " ", RowBox[{"-", "max"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"max", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", ">", " ", "max"}], ",", "#", ",", "max"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "dim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"min", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", " ", "min"}], ",", "#", ",", "min"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "dim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}], "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "Input",ExpressionUUID->"338e8c4e-7ea6-43f3-\ ba33-be495e707b11"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", "0.37183984491867483`"}], ",", "0.3577495712290653`"}], "}"}]], "Output", CellChangeTimes->{ 3.725706483898699*^9},ExpressionUUID->"122edfb1-71ba-44da-8ce8-\ 738fcfd405e4"] }, Open ]], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Form", " ", "Gradient", " ", "and", " ", "Laplacian", " ", "images"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"gradim", " ", "=", " ", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"xfiltimf", "^", "2"}], " ", "+", " ", RowBox[{"yfiltimf", "^", "2"}], " ", "+", " ", RowBox[{"zfiltimf", "^", "2"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"laplim", " ", "=", " ", RowBox[{ RowBox[{"xxfiltimf", "^", "2"}], " ", "+", " ", RowBox[{"yyfiltimf", "^", "2"}], " ", "+", " ", RowBox[{"zzfiltimf", "^", "2"}]}]}], ";"}]}]}]], "Input",ExpressionUUID-\ >"097ae38a-e532-46d9-bea4-bdb71fad734a"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"max", " ", "=", " ", RowBox[{"-", RowBox[{"10", "^", RowBox[{"(", "6", ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"min", " ", "=", " ", RowBox[{"-", "max"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"max", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", ">", " ", "max"}], ",", "#", ",", "max"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "gradim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"min", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", " ", "min"}], ",", "#", ",", "min"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "gradim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}], "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"gradim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "max"}], "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "Input",ExpressionUUID->"10917e3d-1419-4727-\ aa37-e84c83baefd8"], Cell[BoxData[ RowBox[{"{", RowBox[{"0.0005999106154053347`", ",", "1.0027435013836201`"}], "}"}]], "Output", CellChangeTimes->{ 3.725706484644902*^9},ExpressionUUID->"e750dcca-5a91-46a0-a207-\ bd4d6fbf30a4"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"max", " ", "=", " ", RowBox[{"-", RowBox[{"10", "^", RowBox[{"(", "6", ")"}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{"min", " ", "=", " ", RowBox[{"-", "max"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"max", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", ">", " ", "max"}], ",", "#", ",", "max"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "laplim", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"min", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", " ", "min"}], ",", "#", ",", "min"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "laplim", "]"}]}], ";"}], "\n", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}], "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"laplim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]"}]}]}]], "Input",Expre\ ssionUUID->"759cb92f-e8a9-462c-be78-0c2fccefe31c"], Cell[BoxData[ RowBox[{"{", RowBox[{"1.203130620127073`*^-7", ",", "0.17833442698476543`"}], "}"}]], "Output", CellChangeTimes->{ 3.7257064854446025`*^9},ExpressionUUID->"42a739c8-8e52-4aa2-9a9a-\ 46e3007c014d"] }, Open ]], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Form", " ", "the", " ", "Canny", " ", "image"}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"cannyim", " ", "=", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"xfiltimf", "^", "2"}], " ", "xxfiltimf"}], " ", "+", " ", RowBox[{ RowBox[{"yfiltimf", "^", "2"}], " ", "yyfiltimf"}], "+", " ", RowBox[{ RowBox[{"zfiltimf", "^", "2"}], " ", "zzfiltimf"}], "+", " ", RowBox[{"2", " ", "xfiltimf", " ", "yfiltimf", " ", "xyfiltimf"}], " ", "+", RowBox[{"2", " ", "xfiltimf", " ", "zfiltimf", " ", "zxfiltimf"}], " ", "+", " ", RowBox[{"2", " ", "zfiltimf", " ", "yfiltimf", " ", "zyfiltimf"}]}], " ", ")"}], "/", RowBox[{"(", RowBox[{ RowBox[{"xfiltimf", "^", "2"}], " ", "+", " ", RowBox[{"yfiltimf", "^", "2"}], " ", "+", " ", RowBox[{"zfiltimf", "^", "2"}]}], ")"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input",ExpressionUUID->\ "a1a4908c-a3df-4450-a295-36da365b8664"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"max", " ", "=", " ", RowBox[{"-", RowBox[{"10", "^", RowBox[{"(", "6", ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"min", " ", "=", " ", RowBox[{"-", "max"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"max", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", ">", " ", "max"}], ",", "#", ",", "max"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "cannyim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"min", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"#", "<", " ", "min"}], ",", "#", ",", "min"}], "]"}]}], ")"}], "&"}], "/@", RowBox[{"Flatten", "[", "cannyim", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}]}], "Input",ExpressionUUID->"14a9df9f-\ 825f-4a9e-ae9b-06e0b5423b8b"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", "0.4113109649879204`"}], ",", "0.41353220066904417`"}], "}"}]], "Output", CellChangeTimes->{ 3.725706486229598*^9},ExpressionUUID->"61eb896f-5593-4685-afe9-\ 66cf4a687d0a"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"cannyim", "[", RowBox[{"[", "zcen", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}]}]}], "]"}], ";"}]], "Input",Expressio\ nUUID->"4a4da449-b0fa-4d93-8e0a-ba5d6d2f202c"], Cell[BoxData[ RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "\[LessEqual]", "nptsz"}], ",", RowBox[{"p", "++"}], ",", "\n", RowBox[{ RowBox[{"ListDensityPlot", "[", RowBox[{ RowBox[{"cannyim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"min", ",", "max"}], "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]], "Input",ExpressionUUID->"bc5f3bf0-5289-4b60-\ a463-53119efefbc6"] }, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{1016, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingPageRange->{Automatic, Automatic}, PrintingOptions->{"Magnification"->1, "PaperOrientation"->"Portrait", "PaperSize"->{612, 792}, "PostScriptOutputFile":>FrontEnd`FileName[{ "cs", "research", "medim", "images3", "starship", "ucacarr", "teaching", "3c72", "math"}, "edge2.nb.ps", CharacterEncoding -> "ISO8859-1"]}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, ShowCellLabel->True, ShowCellTags->False, FrontEndVersion->"11.2 for Microsoft Windows (64-bit) (September 10, 2017)", StyleDefinitions->"Default.nb", PrivateNotebookOptions -> {"ColorPalette" -> {RGBColor, -1}}, RenderingOptions -> {"ObjectDithering" -> True}, RenderingOptions -> {"RasterDithering" -> False} ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 621, 15, 254, "Text",ExpressionUUID->"c0b1aa38-089b-4b5d-b773-486cbcf380af", Evaluatable->True], Cell[1204, 39, 352, 8, 21, "Message",ExpressionUUID->"9a4b05c0-6d2e-44f4-8f88-379bdcccd709"] }, Open ]], Cell[1571, 50, 4324, 125, 454, "Input",ExpressionUUID->"51fef20c-c3c2-4807-87dc-afb82d91d5d2"], Cell[5898, 177, 265, 7, 48, "Input",ExpressionUUID->"15a3ef0a-f6ee-4f3c-a272-28aac592a3b8"], Cell[CellGroupData[{ Cell[6188, 188, 696, 19, 86, "Input",ExpressionUUID->"73661879-1ebc-4122-87f4-61a726ba3245"], Cell[6887, 209, 190, 5, 32, "Output",ExpressionUUID->"e6473a7a-c88c-4c51-8634-2f9d23a62cb0"] }, Open ]], Cell[7092, 217, 2791, 75, 253, "Input",ExpressionUUID->"987160d4-2633-4a23-8474-ae7b7de0c2e7"], Cell[CellGroupData[{ Cell[9908, 296, 384, 12, 28, "Input",ExpressionUUID->"cc39ec17-86a1-4231-a8dd-900c18785bb1"], Cell[10295, 310, 519, 10, 32, "Output",ExpressionUUID->"8f9c67ba-5dab-42f7-a8c3-9940d0853e81"] }, Open ]], Cell[10829, 323, 637, 18, 48, "Input",ExpressionUUID->"72a638bf-0724-4b00-b187-0fcfc119e6dd"], Cell[11469, 343, 793, 21, 124, "Input",ExpressionUUID->"76a70a5b-bb97-4425-ace9-3f12495ca1b4"], Cell[12265, 366, 268, 6, 48, "Input",ExpressionUUID->"2afa6a17-18f8-4a75-87e8-88d570c3c0b1"], Cell[12536, 374, 1032, 34, 115, "Input",ExpressionUUID->"30691906-f23e-46a9-a500-bb9be57916ac"], Cell[13571, 410, 14003, 405, 974, "Input",ExpressionUUID->"5282cb61-77f6-4d12-b6e0-aee663258f48"], Cell[CellGroupData[{ Cell[27599, 819, 200, 5, 28, "Input",ExpressionUUID->"e85441a9-29a2-4ba0-9122-961890854241"], Cell[27802, 826, 155, 3, 32, "Output",ExpressionUUID->"c577f68f-3980-4d15-9f03-938e076ef1e2"] }, Open ]], Cell[CellGroupData[{ Cell[27994, 834, 1589, 48, 181, "Input",ExpressionUUID->"1bd497a0-a786-410a-beec-bae87069bb41"], Cell[29586, 884, 239, 7, 32, "Output",ExpressionUUID->"4e460d56-48ca-419f-a259-6402141d5846"] }, Open ]], Cell[29840, 894, 1740, 53, 238, "Input",ExpressionUUID->"cd7d5636-4a8e-48c7-8ce7-c5a8418ca34c"], Cell[31583, 949, 4789, 145, 447, "Input",ExpressionUUID->"433e5f73-9da1-443b-9d6b-12f4b742bd5b"], Cell[CellGroupData[{ Cell[36397, 1098, 1590, 48, 181, "Input",ExpressionUUID->"338e8c4e-7ea6-43f3-ba33-be495e707b11"], Cell[37990, 1148, 234, 7, 32, "Output",ExpressionUUID->"122edfb1-71ba-44da-8ce8-738fcfd405e4"] }, Open ]], Cell[38239, 1158, 789, 21, 86, "Input",ExpressionUUID->"097ae38a-e532-46d9-bea4-bdb71fad734a"], Cell[CellGroupData[{ Cell[39053, 1183, 1509, 46, 162, "Input",ExpressionUUID->"10917e3d-1419-4727-aa37-e84c83baefd8"], Cell[40565, 1231, 217, 6, 32, "Output",ExpressionUUID->"e750dcca-5a91-46a0-a207-bd4d6fbf30a4"] }, Open ]], Cell[CellGroupData[{ Cell[40819, 1242, 1614, 49, 200, "Input",ExpressionUUID->"759cb92f-e8a9-462c-be78-0c2fccefe31c"], Cell[42436, 1293, 220, 6, 35, "Output",ExpressionUUID->"42a739c8-8e52-4aa2-9a9a-46e3007c014d"] }, Open ]], Cell[42671, 1302, 1208, 29, 162, "Input",ExpressionUUID->"a1a4908c-a3df-4450-a295-36da365b8664"], Cell[CellGroupData[{ Cell[43904, 1335, 992, 31, 105, "Input",ExpressionUUID->"14a9df9f-825f-4a9e-ae9b-06e0b5423b8b"], Cell[44899, 1368, 234, 7, 32, "Output",ExpressionUUID->"61eb896f-5593-4685-afe9-66cf4a687d0a"] }, Open ]], Cell[45148, 1378, 376, 10, 28, "Input",ExpressionUUID->"4a4da449-b0fa-4d93-8e0a-ba5d6d2f202c"], Cell[45527, 1390, 578, 16, 67, "Input",ExpressionUUID->"bc5f3bf0-5289-4b60-a463-53119efefbc6"] } ] *) (* End of internal cache information *)