File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Modules/Core/Common/include Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -295,16 +295,24 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator
295295 return (m_Buffer + m_Offset) > (it.m_Buffer + it.m_Offset );
296296 }
297297
298- /* * Get the index. This provides a read only reference to the index.
299- * This causes the index to be calculated from pointer arithmetic and is
300- * therefore an expensive operation.
298+ /* * Computes the index. Internally calls ImageBase::ComputeIndex, which may be a relatively expensive operation.
301299 * \sa SetIndex */
302300 [[nodiscard]] IndexType
303- GetIndex () const
301+ ComputeIndex () const
304302 {
305303 return m_Image->ComputeIndex (m_Offset);
306304 }
307305
306+ /* * Computes and returns the index. This may be a relatively expensive operation.
307+ * \note It is often preferable for users to call ComputeIndex() directly, to make it more clear that this function
308+ * may be expensive.
309+ * \sa ComputeIndex */
310+ [[nodiscard]] IndexType
311+ GetIndex () const
312+ {
313+ return this ->ComputeIndex ();
314+ }
315+
308316 /* * Set the index. No bounds checking is performed.
309317 * \sa GetIndex */
310318 virtual void
You can’t perform that action at this time.
0 commit comments