starfish icon indicating copy to clipboard operation
starfish copied to clipboard

Add pad/crop pipeline component

Open shanaxel42 opened this issue 5 years ago • 4 comments

I order to properly register images, a preprocessing step of either padding or cropping your stack to make may be required

shanaxel42 avatar Jun 13 '19 22:06 shanaxel42

This would definitely be nice to have!

  1. Will it be possible to pad an ImageStack, do spot-finding, and then 'crop' the resulting spot table (IntensityTable)?

To give context: The trackpy localmaxpeakfinder avoids doing spot finding along ImageStack edges, so being able to pad the ImageStack (x, y, z dimensions), find spots, and then crop everything back to original dimensions would be nice for recovering those edge spots.

  1. Will this essentially be bringing numpy's pad to starfish?

njmei avatar Jun 13 '19 22:06 njmei

The way I has originally been thinking about it was that someone would pad/crop their list of alignedImagestacks so that they could be transformed into one object instead of a list. And then maybe run that object through registration. But your use case sounds equally valid! I was planning on using numpy.pad so I will try and build it in a way that can be used for both use cases

shanaxel42 avatar Jun 14 '19 16:06 shanaxel42

I could see changing the dimensions of ImageStacks potentially opening up a can of worms though so if it doesn't work out, no worries.

njmei avatar Jun 14 '19 16:06 njmei

Are there other edge effects that arise from padding with zeros?

The biggest challenge here is probably that we'll be doing a lot of copying.

ttung avatar Jun 14 '19 19:06 ttung