You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' @param view_angles list of strings. See \code{\link{get.view.angle.names}} for all valid strings.
309
309
#'
310
-
#' @param rgloptions option list passed to \code{\link{par3d}}. Example: \code{rgloptions = list("windowRect"=c(50,50,1000,1000))}.
310
+
#' @param rgloptions option list passed to \code{\link[rgl]{par3d}}. Example: \code{rgloptions = list("windowRect"=c(50,50,1000,1000))}.
311
311
#'
312
312
#' @param rglactions named list. A list in which the names are from a set of pre-defined actions. The values can be used to specify parameters for the action.
313
313
#'
314
-
#' @param style character string, a rendering style, e.g., 'default', 'shiny' or 'semitransparent'. Alternatively, a named list of style parameters (see \code{\link{material3d}}), e.g., \code{list("shininess"=50, specular="black", alpha=0.5)}. Use the magic word 'from_mesh' to use the 'style' field of each coloredmesh instead of a single, global style. In that case, you will have to make sure your meshes have such a field, if not, the style 'default' is used as a fallback for those which don't.
314
+
#' @param style character string, a rendering style, e.g., 'default', 'shiny' or 'semitransparent'. Alternatively, a named list of style parameters (see \code{\link[rgl]{material3d}}), e.g., \code{list("shininess"=50, specular="black", alpha=0.5)}. Use the magic word 'from_mesh' to use the 'style' field of each coloredmesh instead of a single, global style. In that case, you will have to make sure your meshes have such a field, if not, the style 'default' is used as a fallback for those which don't.
315
315
#'
316
316
#' @param output_img string, path to the output file. Defaults to "fsbrain_arranged.png"
Copy file name to clipboardExpand all lines: R/cbar.R
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
#' @title Draw colorbar into background of current plot.
4
4
#'
5
-
#' @description Requires a rgl 3d visualisation to be open that already contains a rendered object. Uses \code{\link{bgplot3d}} to add a colorbar in the background of the plot using \code{\link[fields]{image.plot}}. Experimental.
5
+
#' @description Requires a rgl 3d visualisation to be open that already contains a rendered object. Uses \code{\link[rgl]{bgplot3d}} to add a colorbar in the background of the plot using \code{\link[fields]{image.plot}}. Experimental.
6
6
#'
7
7
#' @param coloredmeshes fs.coloredmesh as returned by the coloredmesh.from.* functions.
#' @title Create rglactions list, suitable to be passed as parameter to vis functions.
316
316
#'
317
-
#' @note List of all available rglactions: (1) `snapshot_png=filepath` takes a screenshot in PNG format and saves it in at `filepath`. (2) `trans_fun=function` uses the transformation function trans_fun to the data before mapping data values to colors and plotting. Popular transformation functions are \code{\link{limit_fun}}, \code{\link{limit_fun_na}}, and \code{\link{clip_fun}}. (3) `text=arglist` calls \code{\link{text3d}} with the given args after plotting. (4) `snapshot_vec=filepath` takes a screenshot in vector format and saves it in at `filepath`. You also need to set the format via `snapshot_vec_format`, valid entries are one of "ps", "eps", "tex", "pdf", "svg", "pgf" (default is 'eps'). This is experimental and may take a while.
317
+
#' @note List of all available rglactions: (1) `snapshot_png=filepath` takes a screenshot in PNG format and saves it in at `filepath`. (2) `trans_fun=function` uses the transformation function trans_fun to the data before mapping data values to colors and plotting. Popular transformation functions are \code{\link{limit_fun}}, \code{\link{limit_fun_na}}, and \code{\link{clip_fun}}. (3) `text=arglist` calls \code{\link[rgl]{text3d}} with the given args after plotting. (4) `snapshot_vec=filepath` takes a screenshot in vector format and saves it in at `filepath`. You also need to set the format via `snapshot_vec_format`, valid entries are one of "ps", "eps", "tex", "pdf", "svg", "pgf" (default is 'eps'). This is experimental and may take a while.
318
318
#'
319
319
#' @return named list, an example `rlgactions` instance that will save a screenshot of the plot produced by the vis function in the current working directory (see \code{getwd}), under the name 'fsbrain_out.png'.
Copy file name to clipboardExpand all lines: R/vis.R
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
#'
18
18
#' @param views list of strings. Valid entries include: 'si': single interactive view. 't4': tiled view showing the brain from 4 angles. 't9': tiled view showing the brain from 9 angles.
19
19
#'
20
-
#' @param rgloptions option list passed to \code{\link{par3d}}. Example: \code{rgloptions = list("windowRect"=c(50,50,1000,1000))}.
20
+
#' @param rgloptions option list passed to \code{\link[rgl]{par3d}}. Example: \code{rgloptions = list("windowRect"=c(50,50,1000,1000))}.
21
21
#'
22
22
#' @param rglactions named list. A list in which the names are from a set of pre-defined actions. The values can be used to specify parameters for the action. The following example clips outliers in the data before plotting and writes a screenshot in PNG format: \code{rglactions = list("snapshot_png"="~/fsbrain.png", "clip_data"=c(0.05, 0.95))}. See \code{\link{rglactions}}.
23
23
#'
@@ -27,7 +27,7 @@
27
27
#'
28
28
#' @param style character string, a rendering style, e.g., 'default', 'shiny' or 'semitransparent'.
29
29
#'
30
-
#' @param makecmap_options named list of parameters to pass to \code{\link{makecmap}}. Must not include the unnamed first parameter, which is derived from 'measure'. Should include at least a colormap function as name 'colFn'.
30
+
#' @param makecmap_options named list of parameters to pass to \code{\link[squash]{makecmap}}. Must not include the unnamed first parameter, which is derived from 'measure'. Should include at least a colormap function as name 'colFn'.
31
31
#'
32
32
#' @param bg a background definition. Can be a surface color layer or a character string like 'curv_light' to select a pre-defined layer, see \code{\link[fsbrain]{collayer.bg}} for valid strings.
Copy file name to clipboardExpand all lines: R/vis_meshes.R
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
#'
12
12
#' @param style a named list of style parameters or a string specifying an available style by name (e.g., 'shiny'). Defaults to 'default', the default style.
13
13
#'
14
-
#' @param rgloptions option list passed to \code{\link{par3d}}. Example: \code{rgloptions = list("windowRect"=c(50,50,1000,1000))};
14
+
#' @param rgloptions option list passed to \code{\link[rgl]{par3d}}. Example: \code{rgloptions = list("windowRect"=c(50,50,1000,1000))};
15
15
#'
16
16
#' @param rglactions named list. A list in which the names are from a set of pre-defined actions. Defaults to the empty list.
#' @param style a named list of style parameters or a string specifying an available style by name (e.g., 'shiny'). Defaults to 'default', the default style.
174
174
#'
175
-
#' @param x rotation x axis value, passed to \code{\link{spin3d}}. Defaults to 0.
175
+
#' @param x rotation x axis value, passed to \code{\link[rgl]{spin3d}}. Defaults to 0.
176
176
#'
177
-
#' @param y rotation y axis value, passed to \code{\link{spin3d}}. Defaults to 1.
177
+
#' @param y rotation y axis value, passed to \code{\link[rgl]{spin3d}}. Defaults to 1.
178
178
#'
179
-
#' @param z rotation z axis value, passed to \code{\link{spin3d}}. Defaults to 0.
179
+
#' @param z rotation z axis value, passed to \code{\link[rgl]{spin3d}}. Defaults to 0.
180
180
#'
181
-
#' @param rpm rotation rpm value, passed to \code{\link{spin3d}}. Defaults to 15.
181
+
#' @param rpm rotation rpm value, passed to \code{\link[rgl]{spin3d}}. Defaults to 15.
182
182
#'
183
-
#' @param duration rotation duration value, passed to \code{\link{spin3d}}. Defaults to 20.
183
+
#' @param duration rotation duration value, passed to \code{\link[rgl]{spin3d}}. Defaults to 20.
184
184
#'
185
-
#' @param rgloptions option list passed to \code{\link{par3d}}. Example: rgloptions = list("windowRect"=c(50,50,1000,1000));
185
+
#' @param rgloptions option list passed to \code{\link[rgl]{par3d}}. Example: rgloptions = list("windowRect"=c(50,50,1000,1000));
186
186
#'
187
187
#' @param rglactions named list. A list in which the names are from a set of pre-defined actions. Defaults to the empty list.
#' @param coloredmeshes list of renderables. A coloredmesh is a named list as returned by the coloredmesh.from.* functions. It has the entries 'mesh' of type tmesh3d, a 'col', which is a color specification for such a mesh.
230
230
#'
231
-
#' @param rotation_angle angle in radians. Passed to \code{\link{rotate3d}}.
231
+
#' @param rotation_angle angle in radians. Passed to \code{\link[rgl]{rotate3d}}.
232
232
#'
233
-
#' @param x x value passed to \code{\link{rotate3d}}.
233
+
#' @param x x value passed to \code{\link[rgl]{rotate3d}}.
234
234
#'
235
-
#' @param y y value passed to \code{\link{rotate3d}}.
235
+
#' @param y y value passed to \code{\link[rgl]{rotate3d}}.
236
236
#'
237
-
#' @param z z value passed to \code{\link{rotate3d}}.
237
+
#' @param z z value passed to \code{\link[rgl]{rotate3d}}.
238
238
#'
239
239
#' @param style a named list of style parameters or a string specifying an available style by name (e.g., 'shiny'). Defaults to 'default', the default style.
#' @param style A style definition. Can be a character string like 'shiny' or 'from_mesh', or already a named list of material properties (which will be returned as-is).
311
311
#'
312
-
#' @return a style, resolved to a parameter list compatible with \code{\link{material3d}}.
312
+
#' @return a style, resolved to a parameter list compatible with \code{\link[rgl]{material3d}}.
#' @title Get the default visualization style parameters as a named list.
366
366
#'
367
-
#' @description The default rendering style, which is is rather plain. Does not look super fancy, but allows for clear data visualization without distractions. Hint: Run \code{\link{material3d}} without arguments to see valid style keywords to create new styles.
367
+
#' @description The default rendering style, which is is rather plain. Does not look super fancy, but allows for clear data visualization without distractions. Hint: Run \code{\link[rgl]{material3d}} without arguments to see valid style keywords to create new styles.
368
368
#'
369
-
#' @return named list, style parameters that can be passed to \code{\link{shade3d}} via \code{\link{do.call}}.
369
+
#' @return named list, style parameters that can be passed to \code{\link[rgl]{shade3d}} via \code{\link{do.call}}.
#' @title Get the semi-transparent visualization style parameters as a named list.
378
378
#'
379
-
#' @description Semitransparent rendering style. This style has a very negative impact on rendering performance (in interactive mode). Hint: Run \code{\link{material3d}} without arguments to see valid style keywords to create new styles.
379
+
#' @description Semitransparent rendering style. This style has a very negative impact on rendering performance (in interactive mode). Hint: Run \code{\link[rgl]{material3d}} without arguments to see valid style keywords to create new styles.
380
380
#'
381
-
#' @return named list, style parameters that can be passed to \code{\link{shade3d}} via \code{\link{do.call}}.
381
+
#' @return named list, style parameters that can be passed to \code{\link[rgl]{shade3d}} via \code{\link{do.call}}.
#' @title Get the glass visualization style parameters as a named list.
402
402
#'
403
-
#' @description Glass-brain rendering style. This style has a very negative impact on rendering performance (especially in interactive mode). Hint: Run \code{\link{material3d}} without arguments to see valid style keywords to create new styles.
403
+
#' @description Glass-brain rendering style. This style has a very negative impact on rendering performance (especially in interactive mode). Hint: Run \code{\link[rgl]{material3d}} without arguments to see valid style keywords to create new styles.
404
404
#'
405
-
#' @return named list, style parameters that can be passed to \code{\link{shade3d}} via \code{\link{do.call}}.
405
+
#' @return named list, style parameters that can be passed to \code{\link[rgl]{shade3d}} via \code{\link{do.call}}.
#' @title Get the glass2 visualization style parameters as a named list.
414
414
#'
415
-
#' @description Glass-brain rendering style. This style has a very negative impact on rendering performance (especially in interactive mode). Hint: Run \code{\link{material3d}} without arguments to see valid style keywords to create new styles.
415
+
#' @description Glass-brain rendering style. This style has a very negative impact on rendering performance (especially in interactive mode). Hint: Run \code{\link[rgl]{material3d}} without arguments to see valid style keywords to create new styles.
416
416
#'
417
-
#' @return named list, style parameters that can be passed to \code{\link{shade3d}} via \code{\link{do.call}}.
417
+
#' @return named list, style parameters that can be passed to \code{\link[rgl]{shade3d}} via \code{\link{do.call}}.
#' @description A shiny or glossy rendering style. Looks a bit more modern, but the resulting highlights may make the interpretation of the plotted data a bit harder in some areas. Hint: Run \code{\link{material3d}} without arguments to see valid style keywords to create new styles.
427
+
#' @description A shiny or glossy rendering style. Looks a bit more modern, but the resulting highlights may make the interpretation of the plotted data a bit harder in some areas. Hint: Run \code{\link[rgl]{material3d}} without arguments to see valid style keywords to create new styles.
428
428
#'
429
-
#' @return named list, style parameters that can be passed to to \code{\link{shade3d}} via \code{\link{do.call}}.
429
+
#' @return named list, style parameters that can be passed to to \code{\link[rgl]{shade3d}} via \code{\link{do.call}}.
Copy file name to clipboardExpand all lines: R/vis_volume.R
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -723,7 +723,7 @@ normalize <- function(x) {
723
723
724
724
#' @title Return triangles for a 3D cube or cuboid.
725
725
#'
726
-
#' @description Each row of the returned matrix encodes a point (the x, y, and z coordinates), and 3 consecutive rows encode a triangle. Obvisouly, a point will occur several times (as part of several triangles). The result can be passed to \code{\link{triangles3d}} to render a 3D box. The defaults for the parameters will create a cube with edge length 1 centered at (0, 0, 0).
726
+
#' @description Each row of the returned matrix encodes a point (the x, y, and z coordinates), and 3 consecutive rows encode a triangle. Obvisouly, a point will occur several times (as part of several triangles). The result can be passed to \code{\link[rgl]{triangles3d}} to render a 3D box. The defaults for the parameters will create a cube with edge length 1 centered at (0, 0, 0).
Copy file name to clipboardExpand all lines: R/vis_volume_3d.R
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
#'
12
12
#' @param voxelcol character string or a *voxel coloring*. A *voxel coloring* can be specified in three ways: 1) the string 'from_intensity' will compute colors based on the intensity values of the foreground voxels in the volume, applying normalization of the intensity values if needed. 2) an array of RGB color strings: will be used to retrieve the colors for all foreground vertices, at their CRS indices. 3) A vector with length identical to the number of foreground voxels in the volume: will be applied directly. Obvisouly, you should not pass a color material parameter (see `...`) when using this.
13
13
#'
14
-
#' @param ... material properties, passed to \code{\link{triangles3d}}. Example: \code{color = "#0000ff", lit=FALSE}.
14
+
#' @param ... material properties, passed to \code{\link[rgl]{triangles3d}}. Example: \code{color = "#0000ff", lit=FALSE}.
#' @description Draw 3D boxes at all given coordinates using rgl, analogous to \code{\link{spheres3d}}. Constructs the coordinates for triangles making up the boxes, then uses \code{\link{triangles3d}} to render them.
342
+
#' @description Draw 3D boxes at all given coordinates using rgl, analogous to \code{\link[rgl]{spheres3d}}. Constructs the coordinates for triangles making up the boxes, then uses \code{\link[rgl]{triangles3d}} to render them.
343
343
#'
344
344
#' @param centers numerical matrix with 3 columns. Each column represents the x, y, z coordinates of a center at which to create a cube.
345
345
#'
346
346
#' @param r numerical vector or scalar, the cube edge length. This is the length of the axis-parallel edges of the cube. The vector must have length 1 (same edge length for all cubes), or the length must be identical to the number of rows in parameter `centers`.
347
347
#'
348
348
#' @param voxelcol vector of rgb color strings for the individual voxels. Its length must be identical to \code{nrow(centers)} if given.
349
349
#'
350
-
#' @param ... material properties, passed to \code{\link{triangles3d}}. Example: \code{color = "#0000ff", lit=FALSE}.
350
+
#' @param ... material properties, passed to \code{\link[rgl]{triangles3d}}. Example: \code{color = "#0000ff", lit=FALSE}.
351
351
#'
352
352
#' @param do_show logical, whether to visualize the result in the current rgl scene
0 commit comments