Localization Part 3 - veeninglab/BactMAP GitHub Wiki
We can view the cells & spots by plotting them using
plotRaw()
.
plotRaw()
has many input options; we'll go through
the basics below using the Staphylococcus aureus dataset as an example. First,
we will use it to do basic plotting of the segmentation over the image, then we'll modify the plot.
Try it yourself using the other datasets!
To plot a simple projection, specify the tiffdata
, meshdata
and/or spotdata
. Note that you can also plot
only one or two of these three datasets using plotRaw()
! Next to the data input, specify which frame of the image
stack you want to plot by setting frameN
(default = 1).
plotRaw(tiffdata=stack_Staph,
meshdata=mesh_Staph$mesh,
spotdata=spots_Staph$spotframe,
frameN=1)
You can zoom in by changing the x
and y
-limits of the plot. Do this
by setting xrange
and yrange
to a set of pixels, for instance:
xrange = c(200, 600)
to show only the pixels on the x axis between 200
and 600.
You can also change the contrast by setting the range of values shown.
Do this by setting valuerange
to a different
number. For this, it is useful to first get an idea of the distribution
of your intensity values. The easiest way to achieve this is by setting
legend
to TRUE
in plotRaw()
:
plotRaw(tiffdata=stack_Staph,
meshdata=mesh_Staph$mesh,
spotdata=spots_Staph$spotframe,
frameN=1,
legend=TRUE)
Here you see that the image is black, which is in the range of
0-~0.025. Changing the valuerange
to 0-0.025 will change the color distribution
so we can see the cells better. At the same time, let's change xrange
and yrange
so we can zoom in:
plotRaw(tiffdata=stack_Staph,
meshdata=mesh_Staph$mesh,
spotdata=spots_Staph$spotframe,
xrange=c(1000,1200),
yrange=c(500,800),
valuerange=c(0, 0.025))
To see the fluorescent spots better, you might need to play around with
the valuerange
a bit more. Try this for the S. aureus image as well
as for the other two image stacks!
⬅️ Localization Part 2: Data Import | ▪️ | Localization part 4: Using CreatePlotList ➡️ |
---|