List Operations

Assigned to Julian

This page discusses lists and operations that can be performed on them.

Filtering lists using regular expressions

Regular expressions are powerful ways to match patterns in text and are the main way lists are filtered in PyReconstruct. Please refer to the regular expressions explainer on this wiki to learn more.

Opening the regex filter option (Filter>Regex filter...) allows you to enter one or more regex filters to apply to the list.

The regex filter is inclusive; if multiple regex filters are being used, all names that fit any of the regex filters will be included in the list.

List Menu

Export

Each list has an export option that allows you to export the current state of the list as a CSV file (List>Export...). Beware of using commas in any custom fields (tags, groups, comments), as this may split a single column into multiple.

Set columns

Some lists (object, trace, and flag) allow you to set which columns are displayed in the table (List>Set columns...). Simply check the names of the columns you wish to display. The column checklists are also available from the Series Options dialog.

Object List

The object list allows you to view and modify the attributes of all objects in the series. Remember that an object refers to all traces in a series with the same name.

Columns

Start, End (Range)

The first and last section in which the object appears.

Count

The number of traces the object contains.

Flat Area

The area of a 2D plane represented by the object.

Open and closed traces contribute differently to the flat area:

  • Open: The length of the trace multiplied by its section's thickness
  • Closed: The area of the traces

These contributions are summed to get the flat area of the object.

Volume

The volume of the 3D object, obtained by summing the area of each closed trace multiplied by its section's thickness.

Groups

The groups associated with the object.

Trace tags

All tags associated with any trace in the object.

Last user

The name of the user who modified the object most recently.

CR, Status, User, Date

The curation checkbox, status, associated user, and date of the object's curation (see Curation).

Alignment

The name of the object's associated alignment (see Misc Object Attributes).

Comment

The object's comment (see Misc Object Attributes).

Filters

In addition to the regex filter, the object list can be filtered by group, tag, and curation. Using multiple types of filters is exclusive; for example, if both a regex and group filter are used, only objects that fit both criteria will be included.

Group

Opening the group filter option (Filter>Group filter...) allows you to enter one or more group name(s) to filter the list. Remember that a group is an identifier that applies to a full object (and not just the individual traces).

The group filter is inclusive; if multiple groups are entered into the filter, all objects within any of the groups will be included in the list.

Tag

Opening the tag filter option (Filter>Tag filter...) allows you to enter one or more tag name(s) to filter the list. Remember that a tag is an identifier that is applied only to a single trace. Any object that contains at least one trace with the desired tag will be included in the list.

The tag filter is inclusive; if multiple tags are entered into the filter, all objects that contain traces with any of the tags will be included in the list.

Curation


Opening the curation filter option (Filter>Curation filter...) allows you to filter the list by both curation status and user.

For the curation status filter, you have three options:

  • Blank
  • Needs Curation
  • Curated

Only objects with a checked status will be displayed; by default, all three are checked. For example, if you want to view only objects that need curation, you would uncheck the Blank and Curated options and leave Needs Curation checked.

For the curation user filter, you can enter one or more user(s) by which to filter the list. Using multiple users is inclusive; any object with a curation under any user in the filter will be included.

Interaction between the curation status filter and curation user filter is exclusive; only objects that have both a desired curation status and a desired user will be displayed in the list.

Find

There are multiple ways you can find objects in the field.

Double-clicking on an object will bring you to the first section in which the object appears.

The same effect can be achieved by selecting Find>First.

To go to the last section in which an object appears, select Find>Last.

Modifying Groups

Remember that a group (also referred to as an "object group") is an identifier that applies to a full object and NOT the individual traces.

You can add objects to groups by right-clicking on one or more selected object(s) in the list and then selecting Group>Add to group...

You can remove objects from groups by right-clicking on one or more selected object(s) in the list and then selecting Group>Remove from group... or Group>Remove from all groups...

You can modify the name of groups or delete groups from the object list menubar (Groups>Rename group... or Groups>Delete group...).

Modifying Associated Traces

All of the traces under an object can be bulk-edited through the object list. The following options are accessed by right-clicking the selected object(s) you would like to modify.

Edit attributes...

This allows you to modify the name, color, tags, and fill mode of the associated traces over a specified section range.

When modifying tags through this menu, you can only add tags to every affected trace (it is not suggested to modify tags through the object list).

Remove all tags

This will clear the tags on every trace associated with the object(s).

Hide / Unhide

This will hide or unhide every trace associated with the object(s).

Delete

This will delete every trace associated with the object(s), effectively deleting the object(s).

Stamp attributes

The options in the stamp attributes menu should only be used on objects that consist solely of stamps.

Edit radius allows you to modify the radius of all stamps associated with the object(s). The radius is the distance from the centroid to the farthest point on the trace away from the centroid.

Edit shape allows you to modify the shape of all stamps associated with the object(s). The radius of each trace is individually preserved.

Creating a Z-Trace

You can create a z-trace by right-clicking on a selected object and moving to the Create ztrace menu option.

Z-traces are created two different ways:

On contour midpoints

This is the suggested way to create a z-trace for a cross-sectioned object.

For every section containing the object, a single point is placed at the midpoint of all the traces [(xmax - xmin) / 2, (ymax-ymin) / 2].

The points are then connected from the lowest to highest section to create the final z-trace.

From trace sequence

This is a more complicated way to create a z-trace.

For every section containing the object, a point is created from the midpoint of each trace on the section. A segment is then created by linking the points together in order of trace creation.

The segments are then connected from the lowest to highest section to create the final z-trace.

3D Scene

These options are accessed by right-clicking on selected object(s) and navigating to the 3D menu option.

Add to scene / Remove from scene

This allows you to add and remove objects from the 3D scene. If no 3D scene exists, adding an object or objects to the scene will create a scene centered on the objects.

Edit 3D Settings

This allows you to modify the 3D surface type and opacity of the object in the scene.

There are three types of 3D surfaces:

  • Surface: this is the classic mesh created from the traces. The color of the object matches the color of the first trace in the series.
  • Spheres: this creates a sphere in the 3D scene from each trace in the object. Each sphere will have a color and radius that matches its corresponding trace.
  • Contours: this creates a "ribbon" for every trace in the object. Each ribbon contour will have a color that matches its corresponding trace.

Curation

The curation columns can be displayed or hidden through the default shortcut Ctrl+Shift+C.

In the "CR" column, there is a checkbox that allows you to toggle through the three curation statuses (in the following order):

  • Blank: When an object is not marked with any curation or user.
  • Needs curation: When an object is not curated and needs to be curated. When an object is first marked as needing curation, you will be prompted to assign the curation to a username; you can enter a username or simply leave the user field blank. The curation cells for this object will be highlighted yellow when it needs curation.
  • Curated: When an object has been fully curated. When you mark an object as curated, your username will be stored as part of the curation. The curation cells for this object will be highlighted cyan when it is curated.

The date of the last change to curation status is also stored and displayed in the list.

In addition to the checkbox in the CR column, you can modify the curation status of one or more objects by right-clicking on the selected object(s) and navigating to the Curation menu option.

Misc Object Attributes

All of the following options are accessible by right-clicking one or more selected object(s):

Comment

This allows you to create a custom comment for one or more object(s) that is displayed in the object list (if the appropriate column is displayed).

Change Object Alignment

This allows you to change the associated alignment of an object.

The associated alignment of an object is the alignment that is used when calculating the volume and flat area of the object.

If this option is left blank, the current alignment being used in the field will be used.

View history

This allows you to view the history associated with the selected object(s). More specifically, any entry in the history log that is explicitly marked as associated with any of the selected object(s) will be displayed.

Trace list / tags

The trace list allows you to view and modify the attributes of traces in a single section.

Columns

Index

The index of the trace on the section (its place in the contour).

Tags

The tags that the trace contains.

Length

The length of the trace.

Area

The area of the trace.

Radius

The radius of the trace (the distance from its centroid to the furthest point from the centroid).

Export All

In addition to the regular export option, there is also an export all traces in series option that allows you to export the trace data for every individual trace in the series as a CSV file. This file will have an extra column "section" that indicates the section number where the trace exists.

Filter

In addition to the regex filter, you can filter traces by group and tag. Using multiple types of filters is exclusive; for example, if both a regex and group filter are used, only traces that fit both criteria will be included.

Group

Opening the group filter option (Filter>Group filter...) allows you to enter one or more group name(s) to filter the list. Remember that a group is an identifier that applies to a full object (and not just the individual traces).

The group filter is inclusive; if multiple groups are entered into the filter, all traces within any of the groups will be included in the list.

Tag

Opening the tag filter option (Filter>Tag filter...) allows you to enter one or more tag name(s) to filter the list. Remember that a tag is an identifier that is applied only to a single trace.

The tag filter is inclusive; if multiple tags are entered into the filter, all traces that contain any of the tags in the filter will be included in the list.

Find

Double-clicking on a trace will locate the trace in the field. Additionally, selecting the trace, right-clicking it, and selecting Find will have the same effect.

Modify Trace

Many options in the right-click menu allow you to edit the attributes of one or more trace(s).

Edit

This allows you to edit the name, color, tags, and fill mode of the selected trace(s).

Hide / Unhide

This allows you to hide or unhide the selected trace(s) from display in the field.

Stamp attributes

The options in the stamp attributes menu should only be used on traces that are stamps.

Edit radius allows you to modify the radius of the selected trace(s). The radius is the distance from the centroid to the farthest point on the trace away from the centroid.

Edit shape allows you to modify the shape of the selected trace(s). The radius of each trace is individually preserved.

Delete

This allows you to delete the trace.

Flag List

The flag list allows you to view and modify the attributes of all the flags in the series.

Columns

Section

The section containing the flag.

Color

The color of the flag.

Flag

The name of the flag.

Resolved

The resolved status of the flag.

Last Comment

The most recent comment of the flag.

Filter

In addition to the regex filter, you can filter flags by resolved status, color, and comment text. Using multiple types of filters is exclusive; for example, if both a regex and color filter are used, only flags that fit both criteria will be included.

Resolved status

In the Filter menu at the top of the list, you can toggle a Display resolved flags option. This option is off by default, meaning that resolved flags will not be displayed in the list.

Color

The Filter>Color Filter menu allows you to filter the flags by a single color.

You can also set the color filter from a selected flag by right-clicking on it and selecting Use as color filter.

Comment text

The Filter>Comment text option allows you to filter the list by flags with a comment that contains the string of text entered by you.

Modify Flags

You can modify a flag by right-clicking on the selected flag.

View / Edit

This allows you to view and modify the name, color, comments, and resolved status of the flag.

Resolve

This menu allows you to mark one or more flag(s) as resolved or unresolved.

Delete

This allows you to delete one or more flag(s).

Delete flags with this name

This allows you to bulk-delete every flag with the name of the selected flag.

Section List

The section list allows you to view and modify the attributes of sections as well as add, remove, and reorder sections.

Columns

Section

The section number (will also contain "(calgrid)" if the section is marked as being a calibration grid).

Thickness

The thickness of the section in microns.

Locked

The locked status of the section ("Locked" or "Unlocked").

Brightness, Contrast

The brightness and contrast of the section, represented a integers between -100 and 100.

Image Source

The name of the image file for the section.

Filter

There are no filters for the section list.

Add, Remove, and Reorder Sections

Insert

Right-clicking on a selected section in the list and navigating to the Insert submenu will allow you to insert a section above or below the selected section.

Delete

Right-clicking on one or more selected section(s) will allow you to delete them.

Reorder sections

Selecting Modify>Reorder sections from the top of the section list will order all sections so that the sections start at zero and count up by one, with the last section number being one less than the total number of sections.

Locking and Unlocking

Many section operations cannot be performed until a section is unlocked. Right-clicking on one or more selected section(s) allows you to lock or unlock them.

Section Thickness

Section thickness can be set by right-clicking on one or more selected section(s) and selecting Edit thickness.

Image Source

The image source is how the section locates the images to display–it is was is searched for in the image directory.

Modify single section

Right-clicking on a selected section and selecting Edit image source will allow you to change the name of the image source.

Modify all sections

Selecting Modify>Section image sources allows you to modify all section image sources at once. This should be used if you have image file names that all match except for the section number.

For example, if your images are named "Image_000.tif", with the last three characters before the file extension representing the section number, you can bulk-modify the section numbers by entering "Image_#.tif" after selecting Modify>Section image sources.

Modify brightness and contrast

Brightness and contrast can be modified in two ways, both accessible by right-clicking the selected section(s) and navigating to the Brightness/contrast submenu.

Set brightness/contrast

This allows you to set the brightness and contrast of the selected section(s) by entering an integer between -100 and 100 for both.

Match brightness/contrast to section in view

This sets the brightness and contrast of the selected section(s) to the brightness and contrast of the section in your viewing field.

Z-trace list

The z-trace list allows you to view and modify the attributes of all z-traces in the series. Remember that a z-trace refers to a curve defined by points in the 3D space. For creating z-traces, see Creating a Z-trace in the Object List section.

Columns

Name

The name of the z-trace. Note that z-trace names are unique–there cannot be two z-traces of the same name in a series.

Start / End

The first/last section in which the z-trace appears.

Distance

The length of the z-trace.

Groups

The groups to which the z-trace belongs.

Alignment

The alignment used to calculate the distance of the z-trace.

Filters

In addition to the regex filter, the object list can be filtered by z-trace group. Using multiple types of filters is exclusive; for example, if both a regex and group filter are used, only objects that fit both criteria will be included.

Group

Opening the group filter option (Filter>Group filter...) allows you to enter one or more group name(s) to filter the list. Remember that a z-trace group is an identifier that applies to a z-trace.

The group filter is inclusive; if multiple groups are entered into the filter, all z-traces within any of the groups will be included in the list.

Modifying a Z-trace

Edit attributes

Right-clicking on a z-trace and selecting Edit attributes allows you to edit the name and color of a z-trace.

Smooth

Right-clicking on a z-trace and selecting Smooth will allow you to smooth a z-trace, making it less jagged. Upon selecting this, you are prompted for a smoothing factor; a higher factor will result in a smoother z-trace. Additionally, you are asked if you would like to create a new z-trace. Unchecking this option will smooth the selected z-trace in place.

Z-trace Groups

Z-trace groups work identically to object groups.

You can add z-traces to groups by right-clicking on one or more selected z-trace(s) in the list and then selecting Group>Add to group...

You can remove z-traces from groups by right-clicking on one or more selected z-trace(s) in the list and then selecting Group>Remove from group... or Group>Remove from all groups...

3D Scene

These options are accessed by right-clicking on selected z-trace(s) and navigating to the 3D submenu option.

Add to scene / Remove from scene

This allows you to add and remove z-traces from the 3D scene. If no 3D scene exists, adding a z-trace or z-traces to the scene will create a scene centered on the z-trace(s).

Change Object Alignment

This allows you to change the associated alignment of a z-trace.

The associated alignment of a z-trace is the alignment that is used when calculating the distance of the z-trace.

If this option is left blank, the current alignment being used in the field will be used.





← Back to user guide home