You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands, colocr is functional but switching the main dependency from imager to magick has been proposed ropensci/software-review#243 (comment). The two main changes would include:
Changing the S3cimg/pixset class to the magick-image
Applying the morphological operations using image_morphology()
The data structures
I am currently using two S3 classes from imager. These are cimg and pixset. Both are layers over arrays of numeric or logical values. The advantage here is that the two classes can be transformed from one to the other and math operations can be directly applied to them. magick-image is an externalptr and I think would relace cimg(I am not sure what to do about the pixset, or whether an equivalent would be needed at all). I am having a hard time getting data in and out of magick-image. This certainly needs more work on my part. I wish there were more information in the magick's vignette on how to manipulate the image objects.
These changes will obviously affect all the functions in colocr as which objects they dispatch on, the way the manipulations are done and the return value.
Applying morphological operations
The main functions I use from imager are grow, shrink, fill and clean. In the development version of magick there is image_morphology() which can these operations and more ropensci/software-review#243 (comment). These changes would mainly affect roi_select().
Other
Two other functions I use from imager and still don't see how to replace them are
label to label each pixel for the region they belong to
highlight to highlight the selected area on the image
The text was updated successfully, but these errors were encountered:
Summary
As it stands,
colocr
is functional but switching the main dependency fromimager
tomagick
has been proposed ropensci/software-review#243 (comment). The two main changes would include:cimg
/pixset
class to themagick-image
image_morphology()
The data structures
I am currently using two S3 classes from
imager
. These arecimg
andpixset
. Both are layers over arrays ofnumeric
orlogical
values. The advantage here is that the two classes can be transformed from one to the other and math operations can be directly applied to them.magick-image
is anexternalptr
and I think would relacecimg
(I am not sure what to do about thepixset
, or whether an equivalent would be needed at all). I am having a hard time getting data in and out ofmagick-image
. This certainly needs more work on my part. I wish there were more information in themagick
's vignette on how to manipulate the image objects.These changes will obviously affect all the functions in
colocr
as which objects they dispatch on, the way the manipulations are done and the return value.Applying morphological operations
The main functions I use from
imager
aregrow
,shrink
,fill
andclean
. In the development version ofmagick
there isimage_morphology()
which can these operations and more ropensci/software-review#243 (comment). These changes would mainly affectroi_select()
.Other
Two other functions I use from
imager
and still don't see how to replace them arelabel
to label each pixel for the region they belong tohighlight
to highlight the selected area on the imageThe text was updated successfully, but these errors were encountered: