kabasset / Linx

Extensible ND image laboratory
Apache License 2.0
3 stars 0 forks source link

Study the possibility to bind a domain to a raster in addition to its shape #24

Closed kabasset closed 9 months ago

kabasset commented 9 months ago

Would make the creation of kernels simpler, and the rows and sections could know their position in the parent.

kabasset commented 9 months ago

Could be done with a contiguous patch instead, which would also be useful for rows and sections, so that they know their location in the parent raster. This way, all views would be patches by default, and method is_contiguous() may move to Patch.

for (auto row : rows(raster)) {
  // row is a contiguous Patch<Line<0>>
  assert(row.is_contiguous());
  // Use row.domain()
}

for (auto section : sections(raster)) {
  // section is a contiguous Patch<Box<M>>
  assert(section.is_contiguous());
  // Use section.domain()
}