Commit 870f1f9
committed
BUG: Manually create pixel of proper length
Use the generalized NumericTraits::SetLength method to create a output
pixel type of the proper length.
The prior approach was producing a segmentation fault with the RLE
filter when used with VectorImages and an image with dimension 64x64x1
due to the neighborhood operator exceeding the size of the image in
the z-direction.
Additionally, this usage in complicated with the C++11 implementation
using a "move" assignment/constructor, where the vector may be
pointing to the same pixel in the output buffer for the duration of
the method.1 parent 45368ed commit 870f1f9
File tree
2 files changed
+2
-7
lines changed- include
2 files changed
+2
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 154 | | |
160 | 155 | | |
161 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
0 commit comments