Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Custom delayed operations

Open
#127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
r
Domain
data

Research direction

Start by reading the showtree and .rec_showtree methods, then trace how getArrayElement handles DelayedOp subclasses. Reproduce the example with DelayedAffineSeed and DelayedTranslateSeed, including the subset operation on the temporary Zarr array. Done means external classes containing DelayedOp can participate in the requested delayed-operation inspection or access flow without the reported missing-method error.

Written by the indexing model from the issue text.

Description

Dear @hpages,

I am working on devising lazy image transformations for https://github.com/HelenaLC/SpatialData/issues/162.

I was wondering if it is possible to use showtree or .rec_showtree methods (or similar methods) for external classes that facilitate delayed operations.

I have tried below, but it requires me to define additional methods for these classes that contain DelayedOp:

setClass(
  "DelayedAffineSeed",
  contains = "DelayedOp",
  slots = c(
    seed = "ANY",
    dim = "integer",
    dimnames = "list",
    m = "matrix",
    axes = "character",
    filter = "character",
    bg.col = "character",
    antialias = "logical",
    trace = "logical"
  )
)

setClass(
  "DelayedTranslateSeed",
  contains = "DelayedOp",
  slots = c(
    seed = "ANY",
    dim = "integer",
    dimnames = "list",
    shift = "numeric",
    axes = "character"
  )
)
# save as zarr
td <- tempfile(fileext = ".zarr")
delayed_img <- writeZarrArray(x = EBImage::imageData(img), zarr_path = td) 

# affine
rotated_delayed_img <- lazy_affine(delayed_img, m = m, filter = "bilinear")

# translate
translate_delayed_img <- lazy_translate(rotated_delayed_img, shift = c(100,200))

# subset
subset_delayed_img <- translate_delayed_img[100:200, 100:200]
> subset_delayed_img@seed
101x101 double: Subset
└─ 1024x512 double: DelayedTranslateSeed object
Error: unable to find an inherited method for function ‘getArrayElement’ for signature ‘x = "DelayedTranslateSeed"’
Dominant language
R
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Bioconductor/DelayedArray

All issues in Bioconductor/DelayedArray

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.