@@ -93,19 +93,19 @@ Also, `fillvalue` can be extrapolation schemes: `Flat()`, `Periodic()` and `Refl
9393way to understand these schemes is perhaps try it with small example:
9494
9595```jldoctest
96- using ImageTransformations, TestImages, Interpolations
97- using OffsetArrays: IdOffsetRange
96+ julia> using ImageTransformations, TestImages, Interpolations
9897
99- img = testimage("lighthouse")
98+ julia> using OffsetArrays: IdOffsetRange
10099
101- imgr = imrotate(img, π/4; fillvalue=Flat()) # zero extrapolation slope
102- imgr = imrotate(img, π/4; fillvalue=Periodic()) # periodic boundary
103- imgr = imrotate(img, π/4; fillvalue=Reflect()) # mirror boundary
100+ julia> img = testimage("lighthouse");
104101
105- axes( imgr)
102+ julia> imgr = imrotate(img, π/4; fillvalue=Flat()); # zero extrapolation slope
106103
107- # output
104+ julia> imgr = imrotate(img, π/4; fillvalue=Periodic()); # periodic boundary
108105
106+ julia> imgr = imrotate(img, π/4; fillvalue=Reflect()); # mirror boundary
107+
108+ julia> axes(imgr)
109109(IdOffsetRange(values=-196:709, indices=-196:709), IdOffsetRange(values=-68:837, indices=-68:837))
110110```
111111
@@ -116,16 +116,15 @@ axes(imgr)
116116pixels in `img`.
117117
118118```jldoctest
119- using ImageTransformations, TestImages, Interpolations
119+ julia> using ImageTransformations, TestImages, Interpolations
120+
121+ julia> img = testimage("lighthouse");
120122
121- img = testimage("lighthouse")
122- imgr = imrotate(img, π/4)
123- imgr_cropped = imrotate(img, π/4, axes(img))
123+ julia> imgr = imrotate(img, π/4);
124124
125- # No need to manually calculate the offsets
126- imgr[axes(img)...] == imgr_cropped
125+ julia> imgr_cropped = imrotate(img, π/4, axes(img));
127126
128- # output
127+ julia> imgr[axes(img)...] == imgr_cropped # No need to manually calculate the offsets
129128true
130129```
131130
@@ -142,17 +141,20 @@ true
142141Rotate around the center of `img`:
143142
144143```jldoctest
145- using ImageTransformations, CoordinateTransformations, Rotations, TestImages, OffsetArrays
146- using OffsetArrays: IdOffsetRange
147- img = testimage("lighthouse") # axes (1:512, 1:768)
144+ julia> using ImageTransformations, CoordinateTransformations, Rotations, TestImages, OffsetArrays
145+
146+ julia> using OffsetArrays: IdOffsetRange
147+
148+ julia> img = testimage("lighthouse");
148149
149- tfm = recenter(RotMatrix(-pi/4), center( img) )
150- imgw = warp(img, tfm )
150+ julia> axes( img)
151+ (Base.OneTo(512), Base.OneTo(768) )
151152
152- axes(imgw)
153+ julia> tfm = recenter(RotMatrix(-pi/4), center(img));
153154
154- # output
155+ julia> imgw = warp(img, tfm);
155156
157+ julia> axes(imgw)
156158(IdOffsetRange(values=-196:709, indices=-196:709), IdOffsetRange(values=-68:837, indices=-68:837))
157159```
158160
0 commit comments