of 24
1
Instructions for Running the DTC M
orphometrics
Macro
Things to know:
Macros
w
ere
tested with
live
anesthetized
worms mounted on standard agar pads.
Images were
single channel fluorescence
acquired
at
0.5 μm
Z
-
step
s
with
a Nikon
W1
spinning disk
confocal
microscope with
a 60X N.A. 1.4 lens to produce
0.22 μm pixels
with an Ander EMCCD camera. Files were saved
as
“.nd2”
to preserve metadata
.
Alternative microscopy setups can be used; see additional information below under “
Plugins >
Macros > Rotate
based on straight line
Fiji bundles BioFormat plugins with ImageJ which can read proprietary formats of most, if not all, microscopes
.
Image data
must have the correct spatial scaling as the macros report results in the scale and units provided in
the files.
Laser scanning confocal images may need to be very low noise to work with the
background subtraction and
gamma settings
(see comments in macro code)
.
If using detectors with offset,
it
is critical that the offset is not set to make the background uniformly zero as this
excludes low intensity voxels which are necessary to retain.
The macros rename images during processing, but it is a b
est
practice
to save the original raw images in a folder
separate from
processed images and
subsequent measurements.
Things you need:
Single channel
Z
-
stacks from
a confocal microscope
ImageJ or Fiji
1.54i
open
-
source image processing program on your computer
o
https://fiji.sc/
o
Schindelin, J.; Arganda
-
Carreras, I. & Frise, E. et al. (2012), “Fiji: and open
-
source platform for biological
-
image analysis”,
Nature methods
9(7)
: 676
-
682, PMID 22743772, doi: 10.1038/nmeth.2019
Installing ImageJ:
1.
Download ImageJ/Fiji on your computer
(
https://imagej.net/software/fiji/
or
https://fiji.sc/
)
.
Unless you have full administrative permissions, do not install in the Programs Files directory or Applications (on
Mac).
Also,
we
recommend do not install on
to the
desktop, especially if your computer has a home drive on a
network, unless you specifically want to be able to access from
multiple computers
.
Recommended: install in your documents folder. If you are on a network, make sure this is the local documents
folder (unless you specifically want it on the network).
Installation is just copying a folder containing a bunch of files to your computer. It's this simple. You can even
keep it on a USB key to run it anywhere USB drives work.
2.
Make sure that ImageJ is updated to 1.54i or later. This is important since the macros will not run on previous
versions of ImageJ. This update only needs to be done once.
a.
Open ImageJ/Fiji
; this
tool bar appears
(the buttons at the right may look a little different on your
system)
:
2
b.
Go to the Help option on the Menu bar:
c.
C
lick on “Update ImageJ...”
and use the pull down menu to select “daily build.”
Help > Update ImageJ... > daily build
3.
Every Time You Run Fiji:
Install the
DTC Morphometrics
macro to your
ImageJ/Fiji:
a.
On ImageJ/Fiji
menu bar, click
Plugins > Macros > Install...
3
b.
Select
“DTCmeasurements_
v21
7
.ijm”
macro file and click ‘Open’
c.
In the tool
bar,
you will see new buttons along the lower right row.
C
lick
on
Plugins > Macros
to
see
another route to these added functions along with additional
options:
Many of these may also be accessed by right clicking on an open image
which will result in a
pull
-
down
menu
.
4
d.
Now you are ready to collect measurements from your image
s!
NOTE:
To automatically install the package every time ImageJ is launched, replace StartupMacros.fiji.ijm
in the Fiji.app macros folder with DTC_measurements_v
217.
ijm.
DTC
markup and
measurements step
-
by
-
step guide:
Goal: To mark location
,
length
,
displacement
,
of various features
and record the values in a table
that links the values
unambiguously to the image file
.
I.
Image optimization component
:
Preparing a DTC image for measurements
The images
/stacks
you collect on the spinning disk may have
a wide dynamic range making it difficult to see dim
fluorescence without blowing out brighter features,
random orientation, and
/or a
curved path of DTC extensions.
Ideally, we want DTC images such that
distal is
to the left and
proximal is
to the right. We also
need
the DTC and its
processes to
be
linear
, as distance
measurements
are
from the distal end.
While
DTCs vary with respect to gonad
curvature
,
straightening the image generates linear measurements
that are
r
obustly comparable across samples
.
This
also allows for more uniform qualitative comparisons and ease of presentation.
S
tep
-
by
-
step
and purpose
of
each command
in the image optimization component
.
A.
“Max project and change contrast”
does two things:
i.
Given
a stack, it automatically creates a maximum projection
. It
can also be run on a
previously obtained maximum projection file
.
ii.
It
applies a non
-
linear
gamma
contrast transformation to visualize very low signal features and
very bright features in a very similar intensity range.
NOTE:
Images collected with a different type of microscope may require different contrast adjustment; see
notes in macro code.
NOTE:
Worms
in images below
bear the
qIs57
[
lag
-
2
p
::GFP] transgene (Seigfried et al., 2004)
.
5
B.
“Rotate based on straight line”
rotates the image so that the cell body of the DTC
(distal)
is on the left
-
hand side
and the extensions
(reaching proximally)
are on the right
-
hand side
.
NOTE
:
T
his
method is used when the DTC is straight; that is, when a straight line can be drawn that defines the
distal
-
proximal position of the entire cell. See below
“Rotate and straighten based on curved line”
for an alternative
method if the DTC is not straight.
BEFORE
AFTER
6
i.
On the ImageJ/Fiji toolbar, right click on the ‘line tool’ icon, and select the ‘Straight Line’
option:
ii.
C
lick on the distal end of the
gonad
(approximately in the center) and drag a straight line on
the axis
about which
you want your image to be rotated.
NOTE:
To obtain a final properly
-
rotated image (with distal to the left, a position from which subsequent
measurements are made), it
is important
to
draw the line starting from the distal end of the
gonad
and
drag it
proximally (
towards the direction of the extending processes
in the adult)
.
NOTE
:
L
eave
a
gap beyond
(distal to)
the DTC cell body before clicking and dragging the line segment
. If
you start the line on the DTC itself, the DTC will be cropped
. Also, drag the line segment far enough
to
capture the full length of the desired
x
-
axis.
iii.
Plugins
>
Macros > Rotate based on straight line
The image rotates to standard orientation and a box sized 1000 x 250 pixels appears,
which
can be dragged and placed to frame the DTC in the center of the image. This step is done to
standardize each DTC image
.
The resulting image
is
shown below.
7
NOTE:
Th
e rectangular box
size i
s
based on
the size of the largest cell we would measure as
imaged with
our microscope
. Users may need to specify
an
alternative box
size
for different
pixel and cell sizes
.
This may be changed in the macro code
(see comments in code)
.
The box
size would be set larger than the maximum possible biological feature you would ever
measure.
The macros will work with other single channel 16 bits Z series from a variety of
confocal
systems
.
Listed below are the
three tested
microscopes
(
and
different detectors) and seven
lenses. Those lenses with N.A. ranging from 1.2 to 1.49 gave outstanding images; N.A. less
than 1.0 did not provide sufficient detail.
LSM800
40X N.A. 1.3 oil lens
(requires larger box size in macro; can be calculated from pixel size)
GaAsP detector
LSM700
40X N.A. 1.2 water lens
PMT detector
Crest X3 on Nikon Ti2
60X N.A. 1.4 oil Ph3
100X N.A. 1.35 silicone (too big for straighten command)
100X TIRF N.A. 1.49 oil (too big for straighten command)
40X N.A. 1.25 silicone
20X N.A. 0.95 water
Kinetix sCMOS camera
8
NOTE:
T
he box
should be placed
such that the DTC cell body is aligned on the
center
left with a gap from the
margin; this ensures
inclusion of all
DTC fragments and processes that extend on the right
-
hand side. You may
also click and drag on one of the small white square boxes
(red arrows)
on the perimeter of the rectangle to
adjust the size
if necessary.
NOTE:
Do not resize the box while moving it.
iv.
Once you have the rectangular box properly placed on the image,
Image > Crop
Your Image will now be aligned
, cropped
and sized properly as shown above.
9
C.
“Rotate and straighten based on curved line”
.
NOTE
: this
method is used when the DTC is not straight as it allows the user to place multiple anchors along the
DTC to define its path
for subsequent straightening
.
An
example of such a curved DTC morphology
is
shown below:
v.
Click on the “Segmented Line”
button on the ImageJ/Fiji toolbar:
vi.
L
eft click beyond the distal end of the DTC (you don’t have to drag) and keep clicking over the
curvature of the DTC
(see
picture below
)
.
These
clicks
should be made
throughout the extent
of the DTC
to prevent
distortion.
NOTE:
Make sure that you leave at least gap beyond (distal to) the DTC cell body before clicking
creating
the line segments
. If you start on the DTC itself, the DTC will be cropped. Also,
make the line
long
enough to capture the full length of the desired x
-
axis.
10
vii.
Once you
reach the
desired
end
point
,
make
last click
with a
right click (marked with a red
arrow in the picture below) to release the segmented line. The outcome should look like this
viii.
Plugins
> Macros > Rotate and straighten based on curved line
11
ii.
The
result
will
be a straightened DTC
.
iii.
Once the
curved
line has been drawn, click on the ‘Plugins’ option on the menu bar, and then
Macros > ‘Rotate
and straighten
based on
curved
line’.
The image rotates to standard
orientation and a box sized 1000 x 250 pixels appears, that can be dragged and placed to
frame the DTC in the center of the image. This step is done to standardize each DTC image
.
(see section IB above
Rotate based on straight line
regarding the box)
NOTE:
Images should be saved as Tiff... to preserve metadata and bit depth.
File > Save as... >
Tiff...
***
To use this image for DTC
manual markup
, proceed to
section II
.
***
To use this image for Sholl analysis, proceed to
section
III
.
12
II.
DTC
manual markup:
A.
Setup for DTC manual markup
I
mages
from the section above will be
in TIFF format
,
contrast adjusted, straightened
,
and cropped to 1000 x
25
0
pixels
.
To open an image, d
rag
and drop
it
on the ImageJ/Fiji toolbar
or
desktop icon
or use
File > Open...
i.
T
he ‘ROI Manager’ window pops up
(shown below)
. T
his window will keep
t
rack of
measurements
on the left
-
hand panel (all the markups).
NOTE:
For all the manual markup features below, t
he ‘Delete’ option is very useful
. If
you mark
some
thing
unintentionally/incorrectly
,
click on the incorrect entry
in
the left
column of the ROI Manager
and then click the ‘Delete’ button on the right
side to
remove it.
13
B.
Features
The following
features
can be
measured (counted/positioned
)
relative to the distal end
center point.
User
-
placed marks can
be made to quantify the following (see details below):
Distal end: The d
istal end center point is specified using a circle of 20 μm drawn with the left side
, placed
such that the
intersection of the distal end of the gonad with the inner arc of
the
circle
.
This point is the left
-
most
point
on
the circle and is the 0 point for subsequent distance/position measur
ements.
Nucleus
:
A
smaller circle is centered and placed over the
DTC
nucleus
, recording the center of which as a
distance along the x axis
from the distal end center point
.
End point
:
M
arks record
the length of
DTC
processes
(as defined by the user)
from the distal end
.
Branch point
: M
arks record
the distance of each branchpoint from the distal end.
Puncta
:
M
arks record
the distance of the isolated dot
-
like fragments from the distal end.
Line segment
: Marks record the start and end points of isolated DTC fragments, as well as the total distance
across a segmented line or across a straight line from start to end.
a.
“Mark Distal End”
. T
his will be first thing to mark since all the measurements are from this reference
. There can
be only one distal end
;
you will receive an error message if you try to mark more than one DTC distal end (same
with marking the nucleus).
i.
Plugins
> Macros > Mark Dista
l End
(or right click in pull down menu)
A
circle appears on the image
along with a popup saying ‘Position circle and click ok’.
ii.
Hover
over the circle on
the image,
and the
pointer
will appear
as an arrow
. C
lick and
drag the
circle
such that the
distal end of the gonad
aligns
with the inner arc of
the
circle
(distal end of
gonad; see
2
nd
note below)
on the left side.
14
NOTE:
Only drag the
pointer
when
you see the arrow
(you may see a ‘+’ crosshair or a hand
), o
therwise you
may
inadvertently change
the size of the specified circle.
J
ust hover over the center of the circle to get the arrow
pointer and
then
drag it.
NOTE:
F
or cases where the distal end of the gonad is not clearly coincident with the distal end of the DTC, or
where the distal end of the gonad is
not clearly outlined by the DTC cell body, we recommend collecting
DIC
images
in addition
to determine how to properly designate the distal end of the gonad
.
iii.
The position of the distal end
registers an entry on the ROI Manager window
iv.
Alternatively, you may right click on the image
, select ‘Mark Distal’
, and the circle
that
pop
s
up
,
can be
drag
ged into p
osition as described above.
NOTE
:
The
perpendicular tangent drawn on the
left side of this circle (
indicated by the
red line
in the figure
below
, but which will not appear in the image you see
) will be the reference from which
feature
distances
(
e.g.,
end points
a,b,c
in figure below
)
will be measured
. The distance is measured relative to the x axis along the
bottom of the image as indicated by intersection with the
green lines
in the figure below
.
15
b.
“Mark Nucleus”
.
The nucleus is
marked
with a small
er
circle
to measure
any
nuclear displacement relative to the
distal end.
NOTE:
The nucleus
will
be
marked with an oval that is
smaller than the
distal end
circle
;
you should aim to place
the center of
the smaller
circle at the center of the nucleus.
i.
Plugins > Macros > Mark Nucleus
(or right click in pull down menu)
A
circle of a specific size appears on the image
along with a popup saying ‘Place oval centered
over the nucleus and click ok’.
ii.
Drag and drop the circle centered over the nucleus
.
iii.
Once the
nucleus
circle is positioned, click
ok
on the popup.
iv.
Alternatively, right click on the image, select ‘Mark Nucleus’, and the smaller circle
will
pop up,
which you can drag and position as described above.
16
v.
T
he position of the nucleus relative to the distal end
will appear as an
entry on the ROI
Manager window.
NOTE
:
The ROI Manager window stays open throughout the markup
as
this is where all the markups
are
recorded (red arrow
on figure below
).
c.
“ENDPTS”
(endpoints)
. T
here are several processes emanating from the
adult hermaphrodite
DTC cell body.
The goal of this markup is to mark the end points of
th
e
se
processes.
For purposes
here
we are marking only
the ends of apparently
contiguous processes
(CPs)
.
i.
Click on the ‘ENDPTS’ button on your toolbar.
ii.
Click the end points of
each process
on the image.
NOTE:
Alternatively, function keys
for this and other markups below
can be used while hovering over the
position for the markup.
iii.
The
‘ENDPTS’
markup
s
will appear as a tiny hollow circle
s
on the image and the position will
be recorded on the ROI Manager each time you click to mark an end point.
17
iv.
If you incorrectly position an end point, just click on the ‘Delete’ button on the toolbar
(as
noted previously)
this will delete the most recent marked point on the image.
Alternatively,
you may select an erroneous endpoint on the ROI Manager window by clicking on it and then
clicking ‘Delete’ option on the right
-
hand. You will see the corresponding tiny circle marking
the end point disappear on the image.
v.
Once you are done marking the end points, press the
“ALL OFF” button on the toolbar before
performing any other functions.
d.
BRANCH
(branch points):
i.
Branch points can be marked in a manner similar to End Points, above, but
using the “Mark
branch point” button on the tool bar.
e.
PUNCTA
(puncta):
i.
Puncta can be marked in a manner similar to End Points, above, but using the “Puncta” button
on the tool bar.
f.
“Line
S
egment”
:
disconnected
segments of DTC processes can also be measured.
i.
Segments can be marked by
click
ing
the ‘line tool’ (red circle) on the Fiji dashboard
18
ii.
S
tarting from the distal side,
click
on the path of this
segment
iii.
Go to Plugins > Macros > Mark Line Segment [F8]
iv.
The segment will be registered
into the ROI manager and will be measured once the
desired markups on the image are complete and the “Measure all markups” command
is used
(see below)
.
19
v.
The results window will look like below, with the parameters pertaining to this “fallen
-
off DTC process” on the extreme right columns
-
vi.
The column titles are described below
“lines_start” shows the linear distance from where the line segment begins
relative to the
distal
end.
“length”
is
the total length of the entire line segment that you manually dr
e
w
over the segment
.
This
is
the
sum
of all the lengths between each anchor dot that you mark along the path of the
segment
.
“netlength”
is
the linear length measurement between the first and the last anchor point of the
segment. Note that
this parameter does not consider how curved or convoluted the
segement
is.
NOTE:
For all features,
it is important to
specify scoring criteria among users for each feature. Different transgenes
will also accentuate different DTCs features.
g.
“Save Markups”
:
Once all
desired markups are made,
you
must
save all these markups.
i.
Plugins > Macros > Save Markups
20
ii.
You will be prompted to enter your initials
/name
and click OK
NOTE:
This feature is particularly useful to allow for independ
ent
users to mark up similar images and
compare the
ir choices
.
User
initials
are appended to the file name
.
iii.
Once you click OK, the following popup appears displaying the file path of the saved markups
the markups
should be
saved in a zip file in the same folder that contains the
corresponding
image. Click OK.
These files are paired so that markups may be edited later and measurements may be
performed later.
h.
“Measure all markups”
:
i.
Plugins > Macros > Measure all markups
(or right click pull down menu)