Stardist not creating proper Cell objects?

Hi

I’ve been using stardist successfully for a while but there is a problem I can’t figure out:

If I run a plain cell detection and select a cell then I can see a lot of properties about the nucleus, cytoplasm, etc.

However if I start with stardist and select a cell then it doesn’t have the same cell properties, only a few more generic ones.

It seems like the plain cell detection and stardist produce different objects even though getCellObjects() lists Cells for both.

As a result I can’t view measurements or do further training on objects created by stardist.

Does anyone know how to get around this?

Thanks
Gina

Hi @Gina_Puska ,

From your problem description, I assume that you’re using StarDist within QuPath?

In the QuPath documentation you can see that you have to define cellExpansion(value) and you can ask to measureShape() and to measureIntensity() .

def stardist = StarDist2D.builder(pathModel)
        .threshold(0.5)              // Probability (detection) threshold
        .channels('DAPI')         // Select detection channel
        .normalizePercentiles(1, 99) // Percentile normalization
        .pixelSize(0.5)              // Resolution for detection
        .tileSize(1024)              // Specify width & height of the tile used for prediction
        .cellExpansion(5.0)       // Approximate cells based upon nucleus expansion
        .measureShape()              // Add shape measurements
        .measureIntensity()          // Add cell measurements (in all compartments)

What are the parameters you’re using?

And concerning:

@petebankhead and @Research_Associate might bring more insight on this question.

Cheers,

Romain

2 Likes

Hi @Gina_Puska, I think @romainGuiet has identified the issue – you need to make sure cellExpansion is used to create cell objects (otherwise you get plain old detection objects), and also requires that measurements are made with measureShape() and measureIntensity().

The resulting measurements using QuPath + StarDist won’t be identical to the ones you get with QuPath’s default Cell detection command (which works a completely different way), but they are similar.

2 Likes

Hi Romain and Pete,

Thank you very much for your help! I didn’t use measureShape and measureIntensity, but now it works properly.

Many thanks & best wishes,

Gina

Pete via Image.sc Forum <imagej@discoursemail.com> ezt írta (időpont: 2021. ápr. 1., Cs, 13:59):

1 Like