Differences between revisions 20 and 21
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
||Up to TkSurferGuide||Back to [:../TkSurferScriptingReference: TkSurferScriptingReference]||Continue to [:TkSurferGuide/TkSurferReference: TkSurferReference]|| ||Up to TkMeditGuide||Back to [:../TkMeditScripting: TkMeditScripting]||Continue to [:../TkMeditSampleScreenshotScript: TkMeditSampleScreenshotScript]||
Line 9: Line 10:
Most of TkSurfer's functions have Tcl bindings. As you have probably noticed, the interface is just a Tk/Tix window. You can look at the interface script, tksurfer.tcl, to see how most of the functionality is used. Following is a list of Tcl commands defined by TkSurfer. You can use these commands in your own scripts and call them with the -tcl command line option to execute them on startup. TkSurfer can run in a kind of batch mode in this fashion, although it still requires X and has to be able to open its main window.

You can also enter these script commands from the shell that TkSurfer was launched in. You can use the Tcl source command to load a script file from the Tcl shell as well.

This list is provided for reference. If you can figure out something that works, great, but it is not officially a feature of TkSurfer.
Most of TkMedit's functions have Tcl bindings. As you have probably noticed, the interface is just a Tk/Tix window. You can look at the interface script, TkMedit.tcl, to see how most of the functionality is used. Following is a list of Tcl commands defined by TkMedit. You can use these commands in your own scripts and call them with the -tcl command line option to execute them on startup. TkMedit can run in a kind of batch mode in this fashion, altho it still requires X and has to be able to open its main window.

You can also enter these script commands from the shell that TkMedit was launched in. You can use the Tcl source command to load a script file from the Tcl shell as well.

This list is provided for reference. If you can figure out something that works, great, but it is not officially a feature of TkMedit.
Line 19: Line 20:
[[Anchor(align_sphere)]]
''align_sphere''

 Given two marked points on the spherical surface, the first will specify the z-axis (the 1st pole of the sphere), and the second the x-axis (the orientation of the vertical meridian).

[[Anchor(clear_all_vertex_marks)]]
''clear_all_vertex_marks''

 Unmarks all vertices (necessary if the array of marked vertices and the vertex fields' marked status gets out of sync, e.g. you set marked fields directly).

[[Anchor(clear_curvature)]]
''clear_curvature''

 Sets all curvature values to 0.

[[Anchor(clear_ripflags)]]
''clear_ripflags''

 Unrips all vertices.

[[Anchor(clear_vertex_marks)]]
''clear_vertex_marks''

 Unmarks the marked vertices.

[[Anchor(close_marked_vertices)]]
''close_marked_vertices''

 Adds the first marked vertex to the end of the list of marked vertices.

[[Anchor(compute_curvature)]]
''compute_curvature''

 Computes the curvature based on vertex positions.

[[Anchor(curv_to_val)]]
''curv_to_val''

 Copies the curvature values into the first overlay values.

[[Anchor(cut_line)]]
''cut_line'' '''''closed'''''

 Creates a line of ripped vertices on the surface between marked vertices in the order that they were marked. '''closed''' should be 0 for an open line, and 1 for a closed line.

[[Anchor(cut_plane)]]
''cut_plane''

 Cuts a plane based on four marked vertices: three to define the plane, and one to indicate which area to not cut.

[[Anchor(dilate_ripped)]]
''dilate_ripped''

 Dilates ripped areas, increasing their size by a vertex.

[[Anchor(do_lighting_model)]]
''do_lighting_model'' '''''light0 light1 light2 light3 offset'''''

 Changes the lighting setup for the scene. '''light0''' through '''light3''' are light levels from different positions and '''offset''' is overal ambient light. All values are floating points from 0-1.

[[Anchor(draw_cursor)]]
''draw_cursor'' '''''vertexNumber on'''''

 Draws the specified vertex in blue if '''on,''' or in the background color if not '''on'''.

[[Anchor(dump_vertex)]]
''dump_vertex'' '''''vertexNumber'''''

 Prints information about the specified vertex. '''vertexNumber''' is an integer.

[[Anchor(f_to_t)]]
''f_to_t''

 Squares and takes the absolute value for every overlay value field in the vertices.

[[Anchor(find_orig_vertex_coordinates)]]
''find_orig_vertex_coordinates''

 Performs the '''Save Cursor''' function. Writes the current cursor location to the ''edit.dat'' file.

[[Anchor(fix_nonzero_vals)]]
''fix_nonzero_vals''

 Sets the fixedval value for each vertex to 1 if the overlay value for that vertex is not 0, and to 0 if the value is 0.

[[Anchor(flip_normals)]]
''flip_normals'' '''''axes'''''

 Flips all the normal vectors at the vertices, changing the sign of the component values. '''axes''' is a string containing x, y, or z, or any combination, specifying which vector components to flip.

[[Anchor(func_clear_selection)]]
''func_clear_selection''

 Clears the functional time course selection.

[[Anchor(func_graph_timecourse_selection)]]
''func_graph_timecourse_selection''

 Plots the graph for the time course. If more than one vertices are selected by the time course, will plot the average of the values.

[[Anchor(func_load_timecourse)]]
''func_load_timecourse'' '''''fileName registrationType registrationFileName'''''

 Loads a time course from '''fileName'''. You must also specify a '''registrationType''', which should be 0 to find a registration file in the same directory as the data, 1 to use an identity registration, and 2 to specify a file. If 2 is the '''registrationType''', use '''registrationFileName''' to specify the file. The time course will be displayed in a new window.

'''registrationFileName''' is necessary only of '''registrationType''' is file.

[[Anchor(func_load_timecourse_offset)]]
''func_load_timecourse_offset'' '''''fileName registrationType registrationFileName'''''

 Loads a time course offset from '''fileName'''. You should already have a time course loaded. You must also specify a '''registrationType''', which should be 0 to find a registration file in the same directory as the data, 1 to use an identity registration, and 2 to specify a file. If 2 is the '''registrationType''', use '''registrationFileName''' to specify the file.

'''registrationFileName''' is necessary only of '''registrationType''' is file.

[[Anchor(func_print_timecourse_selection)]]
''func_print_timecourse_selection'' '''''fileName'''''

 Prints a text file summarizing the data selected in the functional time course.

[[Anchor(func_select_label)]]
''func_select_label''

 Selects the vertices in the current label for the functional time course. Needs a call to ''func_graph_timecourse_selection'' to plot the graph.

[[Anchor(func_select_marked_vertices)]]
''func_select_marked_vertices''

 Selects the marked vertices in the surface for the functional time course. Needs a call to ''func_graph_timecourse_selection'' to plot the graph.

[[Anchor(invert_face)]]
''invert_face'' '''''faceNumber'''''

 Inverts the face normal at the numbered face. '''faceNumber''' is an integer.

[[Anchor(fill_flood_from_cursor)]]
''fill_flood_from_cursor'' '''''dontCrossPath dontCrossLabel dontFillUnlabeled dontCrossCuravature dontCrossThreshold multipleSeeds action argument'''''

 Initiates a flood fill starting at the cursor. '''dontCrossPath''' should be 1 or 0, specifying whether the fill should cross paths. '''dontCrossLabel''' should be 1 or 0, specifying whether the fill should cross into labels or only stay in unlabeled vertices. '''dontFillUnlabeled''' should be 1 or 0 and specifies whether the fill should fill unlabeled vertices. '''dontCrossCurvature''' should be 1 or 0, specifying whether the fill should fill vertices that have a different curvature sign than the first vertex. '''dontCrossThreshold''' should be 1 or 0, specifying whether vertices with overlay values below the functional threshold should be field. '''multipleSeeds''' should be 1 or 0, specfifying whether or not to use all marked vertices as new seeds. '''action''' should be one of the following:

||0||No action, just mark filled vertices. '''argument''' is ignored.||
||1||Make the filled vertices a new label. '''argument''' is ignored.||
||2||Add the filled vertices to an existing label. '''argument''' should be the index of the label to add vertices to.||
||3||Remove the filled vertices from an existing label. '''argument''' should be the index of the label to remove from.||

[[Anchor(get_marked_vnos)]]
''get_marked_vnos''

 Returns a list of marked vertices.

[[Anchor(get_selected_path_vnos)]]
''get_selected_path_vnos''

 Returns a list of vertices in the selected path.

[[Anchor(invert_surface)]]
''invert_surface''

 Inverts the vertex normals for all unripped vertices in the surface, but not the faces.

[[Anchor(invert_vertex)]]
''invert_vertex'' '''''vertexNumber'''''

 Inverts the vertex normal at the numbered vertex. '''vertexNumber''' is an integer.

[[Anchor(label_to_stat)]]
''label_to_stat'' '''''overlayField'''''

 Creates a new overlay layer with the values in the current label in overlay field '''overlayField'''.

[[Anchor(labl_dilate)]]
''labl_dilate'' '''''label'''''

 Expands a label by adding all vertices immediately adjacent to the label. '''label''' should be a valid label index.

[[Anchor(labl_erode)]]
''labl_erode'' '''''label'''''

 Shrinks a label by excluding all border vertices in the label. '''label''' should be a valid label index.

[[Anchor(labl_export_annotation)]]
''labl_export_annotation'' '''''fileName'''''

 Exports all labels marked as structures to an annotation.

[[Anchor(labl_import_annotation)]]
''labl_import_annotation'' '''''fileName'''''

 Important an annotation file as a series of label.

[[Anchor(labl_load)]]
''labl_load'' '''''fileName'''''

 Loads the label in '''fileName''' and adds it to the Labels window.

[[Anchor(labl_load_color_table)]]
''labl_load_color_table'' '''''fileName'''''

 Loads a color table for labels to use from '''fileName'''.

[[Anchor(labl_mark_vertices)]]
''labl_mark_vertices'' '''''label'''''

 Marks the vertices in a label. '''label''' should be a valid label index.

[[Anchor(labl_new_from_marked_vertices)]]
''labl_new_from_marked_vertices''

 Creates a new label from the marked vertices.

[[Anchor(labl_print_list)]]
''labl_print_list''

 Prints a list of label information to the shell

[[Anchor(labl_print_table)]]
''labl_print_table''

 Prints the color table to the shell.

[[Anchor(labl_remove)]]
''labl_remove'' '''''label'''''

 Deletes a label. '''label''' should be a valid label index.

[[Anchor(labl_remove_all)]]
''labl_remove_all''

 Deletes all labels.

[[Anchor(labl_save)]]
''labl_save'' '''''label fileName'''''

 Saves a label to '''fileName'''. '''label''' should be a valid label index.

[[Anchor(labl_save_all)]]
''labl_save_all'' '''''prefix'''''

 Saves all labels with a given prefix directory location.

[[Anchor(labl_select)]]
''labl_select'' '''''label'''''

 Marks the vertices in a label. '''label''' should be a valid label index.

[[Anchor(labl_select_label_by_vno)]]
''labl_select_label_by_vno'' '''''vertexNumber'''''

 Selects a label containing the given vertex number. If there are multiple labels occupying this vertex, successive calls to this function with the same vertex number will cycle through those labels. '''vertexNumber''' should be a valid vertex index.

[[Anchor(labl_set_color)]]
''labl_set_color'' '''''label red green blue'''''

 Sets the color for a label. '''label''' should be a valid label index. '''red''', '''green''', and '''blue''' should be integers from 0-255.

[[Anchor(labl_set_info)]]
''labl_set_info'' '''''label name structureIndex visibility'''''

 Sets information for a label. '''label''' should be a valid label index. '''name''' is a text string that will show up in the Label window and in the label display. '''structureIndex''' should be -1 if it's a free label or a valid index in the current lookup table if it's a structure label. '''visibility''' should be 1 or 0.

[[Anchor(labl_set_name_from_table)]]
''labl_set_name_from_table'' '''''label'''''

 Sets a label's name from its structure index from the lookup table. '''label''' should be a valid label index.

[[Anchor(left_click)]]
''left_click'' '''''x y'''''

 Simulates a click at the given window position. '''x''' and '''y''' should be integers.

[[Anchor(make_lateral_view)]]
''make_lateral_view''

 Changes the view to show the surface laterally.

[[Anchor(mark_annotation)]]
''mark_annotation'' '''''vertexNumber'''''

 Will mark all vertices with the same annotation value as the annotation value at the specified vertex. '''vertexNumber''' is an integer.

[[Anchor(mark_contiguous_vertices_over_thresh)]]
''mark_contiguous_vertices_over_thresh''

 Performs a flood fill from the cursor, marking all vertices that have overlay values above the threshold. (This is the '''Fill Stats''' tool.)

[[Anchor(mark_contiguous_vertices_with_similar_curvature)]]
''mark_contiguous_vertices_with_similar_curvature''

 Performs a flood fill from the cursor, marking all vertices that have curvature values the same sign as the curvature at the seed. (This is the '''Fill Curvature''' tool.)

[[Anchor(mark_face)]]
''mark_face'' '''''faceNumber'''''

 Marks all vertices in the specified face. '''faceNumber''' is an integer.

[[Anchor(mark_faces)]]
''mark_faces'' '''''vertexNumber'''''

 Marks all vertices in the face to which the specified vertex belongs. '''vertexNumber''' is an integer.

[[Anchor(mark_vertex)]]
''mark_vertex'' '''''vertexNumber on'''''

 Marks or unmarks a specified vertex. '''vertexNumber''' is an integer, and '''on''' is 0 for off and 1 for on.

[[Anchor(mask_label)]]
''mask_label'' '''''labelFileName'''''

 This reads and marks a label file, and then for every vertex not marked, clears the overlay values.

[[Anchor(move_window)]]
''move_window'' '''''x y'''''

 Moves the window to a new location. '''x''' and '''y''' are integers and are global screen coordinates, with 0,0 in the top left corner of the screen.

[[Anchor(path_new_path_from_marked_vertices)]]
''path_new_path_from_marked_vertices''

 Creates a new path using the marked vertices. Connects the marked vertices in the order they were marked to create the path.

[[Anchor(path_remove_selected_path)]]
''path_remove_selected_path''

 Deletes the selected path.

[[Anchor(path_select)]]
''path_select'' '''''path'''''

 Selects the specified path. '''path''' should be a valid path index.

[[Anchor(plot_curv)]]
''plot_curv'' '''''closed'''''

 Draws a curve between marked vertices, and generates a summary file of all vertices on that curve, including values of all the overlay layers and the distance form the first point. '''closed''' should be 0 for an open curve, and 1 for a closed curve. The file is called surfer_curv.dat.

[[Anchor(read_annotations)]]
''read_annotations'' '''''fileName'''''

 Deprecated, replaced by ''labl_import_annotation''. '''fileName''' is an annotation file name, usually ending in .annot.

[[Anchor(read_binary_curv)]]
''read_binary_curv''

 Loads a curvature file into the surface. Reads the file name from '''curv'''.

[[Anchor(read_binary_decimation)]]
''read_binary_decimation''

 Reads decimation values onto the surface from a file. Reads the file name from '''dec'''.

[[Anchor(read_binary_dipoles)]]
''read_binary_dipoles''

 Reads dipole balues onto the surface from a file. Reads the file name from '''dip'''.

[[Anchor(read_binary_patch)]]
''read_binary_patch''

 Reads a patch file into the surface. Will read the file name from '''patch'''.

[[Anchor(read_binary_sulc)]]
''read_binary_sulc''

 Reads a sulcus file into the curvature display. Reads the file name from '''sulc'''.

[[Anchor(read_binary_surf)]]
''read_binary_surf''

 Loads the main surface from a surface file. Reads the file name from '''insurf'''.

[[Anchor(read_binary_values)]]
''read_binary_values''

 Deprecated, replaced by ''sclv_read_from_dotw''. Will read the value file from '''val'''.

[[Anchor(read_binary_values_frame)]]
''read_binary_values_frame''

 Deprecated, replaced by ''sclv_read_from_dotw_frame''. Will read the value file from '''val'''.

[[Anchor(read_canon_vertex_coordinates)]]
''read_canon_vertex_coordinates'' '''''fileName'''''

 Reads the vertex coordinates from a file into the canonical vertex set.

[[Anchor(read_curv_to_val)]]
''read_curv_to_val'' '''''fileName'''''

 Reads a curvature file into the first overlay layer.

[[Anchor(read_fieldsign)]]
''read_fieldsign''

 Reads field sign values from a file. Will read the file name from '''fs'''.

[[Anchor(read_fsmask)]]
''read_fsmask''

 Reads the field sign mask from a file. Will read the file name from '''fm'''.

[[Anchor(read_imag_vals)]]
''read_imag_vals'' '''''fileName'''''

 Reads imaginary values from '''fileName'''.

[[Anchor(read_labeled_vertices)]]
''read_labeled_vertices''

 Deprecated, replaced by ''labl_load''. Will read the file name from '''label'''.

[[Anchor(read_orig_vertex_coordinates)]]
''read_orig_vertex_coordinates''

 Reads the vertex coordinates from a file into the orig vertex set. Reads the file name from '''origcoords'''.

[[Anchor(read_pial_vertex_coordinates)]]
''read_pial_vertex_coordinates''

 Reads the vertex coordinates from a file called ''?h.pial where'' where ? is the current hemisphere into the pial vertex set.

[[Anchor(read_really_matrix)]]
''read_really_matrix''

 Reads a matrix to transform the surface vertices. Reads the file name from '''subjtmpdir'''.

[[Anchor(read_surface_vertex_set)]]
''read_surface_vertex_set'' '''''field fileName'''''

 Reads a set of vertices from the fle in '''fileName'''. '''field''' should be one of the following:

||0||Main vertices||
||1||Inflated vertices||
||2||White vertices||
||3||Pial vertices||
||4||Orig vertices||

[[Anchor(read_view_matrix)]]
''read_view_matrix''

 Reads a view matrix from a file. Reads the file name from '''subjtmpdir'''.

[[Anchor(read_white_vertex_coordinates)]]
''read_white_vertex_coordinates''

 Reads the vertex coordinates from a file called ''?h.white'' where ? is the current hemisphere into the original vertex set.

[[Anchor(really_center_brain)]]
''really_center_brain''

 Translates the surface coordinates to an average of all vertex coordinates.

[[Anchor(really_rotate_brain_x)]]
''really_rotate_brain_x'' '''''degrees'''''

 Rotates the surface vertices around the x axis. '''degrees''' is a floating point number.

[[Anchor(really_rotate_brain_y)]]
''really_rotate_brain_y'' '''''degrees'''''

 Rotates the surface vertices around the y axis. '''degrees''' is a floating point number.

[[Anchor(really_rotate_brain_z)]]
''really_rotate_brain_z'' '''''degrees'''''

 Rotates the surface vertices around the z axis. '''degrees''' is a floating point number.

[[Anchor(really_translate_brain)]]
''really_translate_brain'' '''''rightLeftDistance anteriorPosteriorDistance superiorInferiorDistance'''''

 Translates the surface vertices along the specified axes. All distances are in millimeters and can be floating point.

[[Anchor(redraw)]]
''redraw''

 Redraws the graphics window. It is necessary to call this after using other script commands to change the viewing state.

[[Anchor(resend_to_subject)]]
''resend_to_subject''

 Calls ''send_to_subject'' with the sam subject name used in the previous send_to_subject call.

[[Anchor(resize_brain)]]
''resize_brain''

 Scales the brain according to the surface area to total area ratio.

[[Anchor(resize_window)]]
''resize_window'' '''''size'''''

 Resizes the graphics window. '''size''' is an integer. The new window size will be sqaure with '''''size''''' x '''''sizedimensions'''''.

[[Anchor(restore_ripflags)]]
''restore_ripflags'' '''''mode'''''

 This will swap a set field vertex rip fields, and then rip the surface. If '''mode''' is 1, will swap the oripflag and ripflag fields. If '''mode''' is 2, will set the oripflag field from the ripflag field and the ripflag field from the origripflag field. After the rip, all vertices will be unmarked.

[[Anchor(restore_initial_position)]]
''restore_initial_position''

 Restores the view to a medial view.

[[Anchor(restore_zero_position)]]
''restore_zero_position''

 Restores the view to a medial view.

[[Anchor(rip_all_vertices_except_contiguous_upripped)]]
''rip_all_vertices_except_contiguous_upripped''

 Performs a flood fill from the cursor, ripping all other vertices that are not contiguous to the seed point. (This is the '''Fill Uncut Area''' tool.)

[[Anchor(rotate_brain_x)]]
''rotate_brain_x'' '''''degrees'''''

 Rotates the view around the x axis. '''degrees''' should be a floating point number.

[[Anchor(rotate_brain_y)]]
''rotate_brain_y'' '''''degrees'''''

 Rotates the view around the y axis. '''degrees''' should be a floating point number.

[[Anchor(rotate_brain_z)]]
''rotate_brain_z'' '''''degrees'''''

 Rotates the view around the z axis. '''degrees''' should be a floating point number.

[[Anchor(save_rgb)]]
''save_rgb''

 Saves the contents of the view to a file in RGB format. Reads the file name from '''rgb'''.

[[Anchor(save_rgb_cmp_frame)]]
''save_rgb_cmp_frame''

 Reads the file name from '''rgb'''. Write an rgb frame file to be composed into a movie later.

[[Anchor(save_tiff)]]
''save_tiff'' '''''fileName'''''

 Saves the current graphics contents as a TIFF file.

[[Anchor(scale_brain)]]
''scale_brain'' '''''zoomFactor'''''

 Zooms the view. '''zoomFactor''' is a floating point number; values greater than 1 make the brain appear larger, and from 0 to 1, smaller.

[[Anchor(sclv_copy_all_view_settings_from_current_field)]]
''sclv_copy_all_view_settings_from_current_field''

 Copies the settings from the current overlay to all other overlay layers.

[[Anchor(sclv_copy_view_settings_from_current_field)]]
''sclv_copy_view_settings_from_current_field'' '''''field'''''

 Copies the overlay settings from the current layer to another. '''field''' should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(sclv_copy_view_settings_from_field)]]
''sclv_copy_view_settings_from_field'' '''''tofield toField'''''

 Copies the overlay settings from one layer to another. '''toField''' and '''fromField''' should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(sclv_get_normalized_color_for_value)]]
''sclv_get_normalized_color_for_value'' '''''value'''''

 Converts an overlay value in the current field to an rgb color triple, returned as a list of floats. '''value''' should be a valid value in the current overlay layer.

[[Anchor(sclv_load_label_value_file)]]
''sclv_load_label_value_file'' '''''fileName field'''''

 Reads a label value file from '''fileName''' in an overlay field. '''field''' should be one of the field values in ''sclv_read_from_dotw''. The label value file is a list of lines specifying a label name (such as an anatomical label from an LUT), a value, and a hemisphere.

[[Anchor(sclv_read_bfile_values)]] ''sclv_read_bfile_values''

 Deprecated, replaced by ''sclv_read_from_volume''.

[[Anchor(sclv_read_binary_values)]]
''sclv_read_binary_values''

 Deprecated, replaced by ''sclv_read_from_dotw''.

[[Anchor(sclv_read_binary_values_frame)]]
''sclv_read_binary_values_frame'' '''''fileName field'''''

 Deprecated, replaced by ''sclv_read_from_dotw_frame''.

[[Anchor(sclv_read_from_dotw)]]
''sclv_read_from_dotw'' '''''fileName field'''''

 Reads an overlay layer from the file specified in dotw format. '''field''' should be one of the following:

||'''field'''||Vertex field name||Description||
||0||val||Overlay layer 0||
||1||val2||Overlay layer 1||
||2||valbak||Overlay layer 2||
||3||val2bak||Overlay layer 3||
||4||stat||Overlay layer 4||
||5||imag_val||Overlay layer 5||
||6||mean||Overlay layer 6||
||7||mean_imag||Overlay layer 7||
||8||std_error||Overlay layer 8||

[[Anchor(sclv_read_from_volume)]]
''sclv_read_from_volume'' '''''field fileName registrationType [registrationFileName]'''''

 Reads an overlay layer from a volume file. The volume can either be a full 3D volume of overlay data, or a volume encoded value file. For the former, a registration file must be provided. '''field''' must be an overlay field, see '''sclv_read_from_dotw''' for values. '''registrationType''' should be one of the following:

||0||Get registration from a file, and specify file in '''regitrationFileName'''||
||1||Look for a file named {{{register.dat}}} in the same directory as the volume.||
||2||Calculate an identity registration using the orig volume (must be present in subject's {{{mri}}} directory.||

 If the '''registrationType''' is 0, then '''registrationFileName''' must be provided, otherwise it can be omitted.

[[Anchor(sclv_send_histogram)]]
''sclv_send_histogram'' '''''field'''''

 Tells tksurfer to resend the histogram information for a layer. Might be done after the overlay layer has changed, to force an update. '''field''' should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(sclv_send_current_field_info)]]
''sclv_send_current_field_info''

 Tells tksurfer to resend the overlay information for a layer. Might be done after the overlay layer has changed, to force an update. '''field''' should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(sclv_set_current_field)]]
''sclv_set_current_field'' '''''field'''''

 Sets the current overlay field. '''field''' should be should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(sclv_set_current_threshold_from_percentile)]]
''sclv_set_current_threshold_from_percentile'' '''''min mid max'''''

 Sets the current layer's threshold based on a percentile of values. '''min''', '''mid''', and '''max''' should be floating numbers from 0-100 representing percentages which will be mapped to overlay values to be used to set the threshold.

[[Anchor(sclv_set_current_threshold_using_fdr)]]
''sclv_set_current_threshold_using_fdr'' '''''rate markedOnly'''''

 Sets the current overlay's threshold using false discovery rate. '''rate''' is a floating point number representing the rate, and '''markedOnly''' should be 1 or 0 specifying whether to only calculate over marked vertices.

[[Anchor(sclv_set_current_timepoint)]]
''sclv_set_current_timepoint'' '''''timePoint condition'''''

 Sets the time point and condition for the current overlay field. '''timePoint''' and '''condition''' should be integer values in the range of the current overlay's number of time pooints and conditions.

[[Anchor(sclv_set_overlay_alpha)]]
''sclv_set_overlay_alpha'' '''''alpha'''''

 Sets the overlay alpha. This controls the translucency for overlay display. '''alpha''' should be from 0 - 1, with 1 being opaque.

[[Anchor(sclv_smooth)]]
''sclv_smooth'' '''''numberOfSteps field'''''

 Smooths an overlay layer. '''numberOfSteps''' is an integer. '''field''' should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(sclv_write_dotw)]]
''sclv_write_dotw'' '''''field'''''

 Writes the given overlay field to a dotw file. Reads the file name '''val'''. '''field''' should be one of the field values in ''sclv_read_from_dotw''.

[[Anchor(select_orig_vertex_coordinates)]]
''select_orig_vertex_coordinates''

 Performs the '''Read Cursor''' function. Reads the cursor location from the ''edit.dat'' file.

[[Anchor(select_talairach_point)]]
''select_talairach_point'' '''''x y z'''''

 Takes the given talairach coordinate, writes it to the ''edit.dat'' file, and then sets the cursor to that point. '''x''' '''y''' and '''z''' are floating point talairach values.

[[Anchor(select_vertex_by_vno)]]
''select_vertex_by_vno'' '''''vertexNumber'''''

 Selects the given vertex as the cursor. '''vertexNumber''' is an integer.

[[Anchor(send_current_labels)]]
''send_current_labels''

 Sends all the current information in the cursor and mouseover labels. Useful if you just set the cursor or if the vertex information under the cursor just changed, and want to force an update of the information.

[[Anchor(send_spherical_point)]]
''send_spherical_point'' '''''subjectName canonicalFileName origFileName'''''

 Converts the cursor to a cross-subject spherical point, then remaps it to a different subject's surface, and writes it to their ''edit.dat'' cursor file, so that subject use the '''Read Cursor''' command to get this cursor. '''subjectName''' is the subject for whom to write the cursor fiel. '''canonicalFileName''' is the file from which to read the canonical vetex positions. '''origFileName''' is the file from which to read the original vetex positions. Those filenames are relative to the '''subjectName.'''

[[Anchor(send_to_subject)]]
''send_to_subject'' '''''subjectName'''''

 Calls ''send_spheric[[Anchor(curv_to_val)]]
''curv_to_val''

 Copies the curvature values into the first overlay values.

al_point'' with standard file names for '''canonicalFileName''' and '''origFileName'''.

[[Anchor(set_current_vertex_set)]]
''set_current_vertex_set'' '''''field'''''

 Sets the current vertex set (the one being displayed) to the named field. '''field''' should be one of the values in ''read_surface_vertex_set''.

[[Anchor(show_flat_regions)]]
''show_flat_regions'' '''''surfaceFileName threshold'''''

 Reads vertex positions from '''surfaceFileName.''' For every vertex normal with a component longer than '''threshold,''' will set the overlay value at that vertex to the value of that component, otherwise sets the value to 0. '''threshold''' is a floating point number.

[[Anchor(show_surf)]]
''show_surf'' '''''vertexSet'''''

 Moves the specified vertex set into the main vertex set position. '''vertexSet''' is white, pial, or inflate.

[[Anchor(shrink)]]
''shrink'' '''''numberOfSteps'''''

 Inflates the surface by the number of steps given. '''numberOfSteps''' should be an integer.

[[Anchor(smooth_curv)]]
''smooth_curv'' '''''numberOfSteps'''''

 Smooths the curvature values by '''numberOfSteps''', an integer

[[Anchor(stat_to_val)]]
''stat_to_val''

 Copies the values of the stat field to the overlay value field.

[[Anchor(swap_vertex_fields)]]
''swap_vertex_fields'' '''''field field'''''

 A more general way of swaping vertex fields. '''field''' should be one of the following:

||'''field'''||Vertex field name||Description||
||0||curv||Curvature display||
||1||curvbak||Backup curvature (not displayed||
||2||val||Overlay layer 0||
||3||imag_val||Overlay layer 5||
||4||val2||Overlay layer 1||
||5||valbak||Overlay layer 2||
||6||val2bak||Overlay layer 3||
||7||stat||Overlay layer 4||

[[Anchor(transform_brain)]]
''transform_brain''

 Recenters the brain.

[[Anchor(translate_brain_x)]]
''translate_brain_x'' '''''distance'''''

 Translates the view along the x axis. '''distance''' should be a floating point number and is in millimeters.

[[Anchor(translate_brain_y)]]
''translate_brain_y'' '''''distance'''''

 Translates the view along the x axis. '''distance''' should be a floating point number and is in millimeters.

[[Anchor(translate_brain_z)]]
''translate_brain_z'' '''''distance'''''

 Translates the view along the x axis. '''distance''' should be a floating point number and is in millimeters.

[[Anchor(undo_last_action)]]
''undo_last_action''

 Undoes the last action.

[[Anchor(val_to_curv)]]
''val_to_curv''

 Copies the first overlay values into the curvature values.

[[Anchor(val_to_mark)]]
''val_to_mark''

 Will mark all vertices with overlay values greater than the overlay threshold.

[[Anchor(val_to_stat)]]
''val_to_stat''

 Copies the values of the overlay value field to the stat field.

[[Anchor(write_binary_curv)]]
''write_binary_curv''

 Saves the curvature values to a new file. Will read the file name from '''curv'''.

[[Anchor(write_binary_dipoles)]]
''write_binary_dipoles''

 Write the dipoles to a file. Will read the file name from '''dip'''.

[[Anchor(write_binary_patch)]]
''write_binary_patch''

 Saves the current surface as a patch. Will read the file name from '''patch'''.

[[Anchor(write_binary_sulc)]]
''write_binary_sulc''

 Saves the sulcus values (if loaded in the curvature set) to a new file. Will read the file name from '''sulc'''.

[[Anchor(write_binary_surface)]]
''write_binary_surface''

 Saves the surface to a new file. Will read the file name from '''outsurf'''.

[[Anchor(write_fieldsign)]]
''write_fieldsign''

 Saves the field sign values to a new file. Will read the file name from '''fs'''.

[[Anchor(write_fsmask)]]
''write_fsmask''

 Saves the field sign mask to a new file. Will read the file name from '''fm'''.

[[Anchor(write_labeled_vertices)]]
''write_labeled_vertices''

 Saves all marked values to a label file. Will fill in the stat value of the file with the current overlay field's value. Will read the file name from '''label'''.

[[Anchor(write_really_matrix)]]
''write_really_matrix''

 Writes the matrix used to transform the surface vertices. Reads the file name from '''subjtmpdir'''.

[[Anchor(write_view_matrix)]]
''write_view_matrix''

 Write the current view matrix to a file. Reads the file name from '''subjtmpdir'''.

[[Anchor(write_vrml)]]
''write_vrml'' '''''mode'''''

 Writes a VRML version of the surface. Will read the file name from '''vrmlsurf.''' '''mode''' is 0 for pts, 1 for gray, and 2 for curv.
[[Anchor(AverageSurfaceVertexPositions)]]
''Average``Surface``Vertex``Positions'' '''''numberOfAverages'''''

 Averages the vertex positions of the Main surface '''numberOfAverages''' times.
[[Anchor(ClearSelection)]]
''Clear``Selection''

 Clears the current voxel selection.

[[Anchor(ClearUndoVolume)]]
''Clear``Undo``Volume''

 Clears the undoable voxels.

[[Anchor(DebugPring)]]
''Debug``Print'' '''''string'''''

 Prints '''string''' to debugging output (either the {{{xdebug_TkMedit.txt}}} file or the screen).

[[Anchor(ExportChangedSegmentationVolume)]]
''Export``Changed``Segmentation``Volume'' '''''volume [destinationDirectory]'''''

 Saves the segmentation '''volume''' in its original location (overwriting the original), or a new location if '''destinationDirectory''' is specified. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

[[Anchor(FlipVolume)]]
''Flip``Volume'' '''''xAxis yAxis zAxis'''''

 Flips the Main anatomical volume over an axis. Specify 0 or 1 for '''xAxis''', '''yAxis''', and '''zAxis''' to not flip or flip, respectively, on that axis. Axes are in anatomical index coordinate space.

[[Anchor(GetSubjectDir)]]
''Get``Subject``Dir'' '''''volume'''''

 Returns the subject directory path. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume.

[[Anchor(GetSubjectName)]]
''Get``Subject``Name'' '''''volume'''''

 Returns the subject name. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume.

[[Anchor(GotoMainVertex)]]
''Goto``Main``Vertex'' '''''vertexNumber'''''

 Sets the cursor to the location of the numbered vertex in the Main surface. '''vertexNumber''' should be between 0 and the number of vertices in the surface.

[[Anchor(GotoOriginalVertex)]]
''Goto``Original``Vertex'' '''''vertexNumber'''''

 Sets the cursor to the location of the numbered vertex in the Original surface. '''vertexNumber''' should be between 0 and the number of vertices in the surface.

[[Anchor(GotoPialVertex)]]
''Goto``Pial``Vertex'' '''''vertexNumber'''''

 Sets the cursor to the location of the numbered vertex in the Pial surface. '''vertexNumber''' should be between 0 and the number of vertices in the surface.

[[Anchor(GraphSelectedRegion)]]
''Graph``Selected``Region''

 Graphs the average timecourse for the selected voxels.

[[Anchor(ImportSurfaceAnnotationToSegmentation)]]
''Import``Surface``Annotation``To``Segmentation'' '''''surface annotationFileName colorTableFileName'''''

 Loads '''annotationFileName''' into a surface, creates a new segmentation volume, and goes through the surface, mapping a vertex location to a voxel in the segmentation volume. For each, it looks up a label value from the RGB color stored in the annotation value using '''colorTableFileName''' and sets the segmentation value to the label value. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface.

[[Anchor(LoadAuxVolume)]]
''Load``Aux``Volume'' '''''volumeFileName'''''

Loads '''volumeFileName''' as the Aux volume.

[[Anchor(LoadDTIVolumes)]]
''Load``DTI``Volumes'' '''''vectorVolumeFileName intensityVolumeFileName redAxis greenAxis blueAxis'''''

 Loads a DTI volume using '''vectorVolumeFileName''' as the volume containing the vectors, and '''intensityVolumeFileName''' as the volume containing the scaling factor. The former should be a three frame volume and the latter should be a one frame volume. The '''redAxis''', '''greenAxis''', and '''blueAxis''' parameters should be x, y, or z, indicating which value in the vector volume corresponds to which color.

[[Anchor(LoadFunctionalOverlay)]]
''Load``Functional``Overlay'' '''''volumeFileName registrationType [registrationFileName]'''''

 Loads a functional overlay volume from '''volumeFileName'''. You must also specify a '''registrationType''', which should be 0 to find a registration file in the same directory as the data, 1 to use an identity registration, and 2 to specify a file. If 2 is the '''registrationType''', use '''registrationFileName''' to specify the file. The overlay will be displayed in the graphics widnow.

[[Anchor(LoadFunctionalTimeCourse)]]
''Load``Functional``Time``Course'' '''''volumeFileName registrationType [registrationFileName]'''''

 Loads a functional time course volume from '''volumeFileName'''. You must also specify a '''registrationType''', which should be 0 to find a registration file in the same directory as the data, 1 to use an identity registration, and 2 to specify a file. If 2 is the '''registrationType''', use '''registrationFileName''' to specify the file. The time course graph will be displayed in a separate window.

[[Anchor(LoadGCA)]]
''Load``GCA'' '''''volumeFileName transformFileName'''''

 Loads a GCA volume from ''volumeFileName'' using the transform in '''transformFileName'''.

[[Anchor(LoadGCARenormalization)]]
''Load``GCA``Renormalization'' '''''renormalizationVolumeFileName'''''

 Loads a GCA renormalization volume from '''renormalizationVolumeFileName'''.

[[Anchor(LoadHeadPts)]]
''Load``Head``Pts'' '''''headPointsFileName transformFileName'''''

Loads a head points array from '''headPointsFileName''' using the transform in '''transformFileName'''.

[[Anchor(LoadLabel)]]
''Load``Label'' '''''labelFileName'''''

 Loads a label file from '''labelFileName'''. This will add the voxels in the label file to the selection.

[[Anchor(LoadMainSurface)]]
''Load``Main``Surface'' '''''surface surfaceFileName'''''

 Loads a surface file from '''surfaceFileName'''. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface. Note that this loads the main surface object, and will unload the Original or Pial surface configurations if they exist.

[[Anchor(LoadOriginalSurface)]]
''Load``Original``Surface'' '''''surface surfaceFileName'''''

 Loads the Original vertex configuration from '''surfaceFileName''' into an existing surface. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface. Note that the Main surface (that is, the Main Main or Aux Main) must already be loaded; this just loads in an alternate vertex configuration.

[[Anchor(LoadPialSurface)]]
''Load``Pial``Surface'' '''''surface surfaceFileName'''''

 Loads the Pial vertex configuration from '''surfaceFileName''' into an existing surface. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface. Note that the Main surface (that is, the Main Main or Aux Main) must already be loaded; this just loads in an alternate vertex configuration.

[[Anchor(LoadSegmentationVolume)]]
''Load``Segmentation``Volume'' '''''volume volumeFileName colorTableFileName'''''

 Loads a segmentation volume from '''volumeFileName''' using the color table in '''colorTableFileName'''. volume should be 0 for the Main volume, and 1 for the Aux volume.

[[Anchor(LoadSurfaceAnnotation)]]
''Load``Surface``Annotation'' '''''surface annotationFileName'''''

 Loads a surface annotation file from '''annotationFileName''' into a surface. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface. This will color the vertices and edges of the surface display using the RGB annotation values.

[[Anchor(LoadVolumeDisplayTransform)]]
''Load``Volume``Display``Transform'' '''''volume transformFileName'''''

 Loads a display transform from '''transformFileName''' for an anatomical volume. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume.

[[Anchor(LoadVolume)]]
''Load``Volume'' '''''volumeFileName'''''

 Loads '''volumeFileName''' as the Main volume.

[[Anchor(NewControlPoint)]]
''New``Control``Point''

 Creates a new control point where the cursor is.

[[Anchor(NewSegmentationVolume)]]
''New``Segmentation``Volume'' '''''volume fromAnatomicalVolume colorTableFileName'''''

 Creates a new segmentation volume based on one of the anatomical volumes using the color table in '''colorTableFileName'''. '''volume''' should be 0 for the Main segmentation volume, and 1 for the Aux segmentation volume, and '''fromAnatomicalVolume''' should be 0 for the Main anatomical volume, and 1 for the Aux anatomical volume.

[[Anchor(Overlay_RestoreRegistration)]]
''Overlay_``Restore``Registration''

 Restores the functional overlay registration to the last saved value.

[[Anchor(Overlay_SaveRegistration)]]
''Overlay_``Save``Registration''

 Saves the current overlay registration. Overwrites previous file.

[[Anchor(Overlay_SetCondition)]]
''Overlay_``Set``Condition'' '''''condition'''''

 Sets the functional overlay's current condition. '''condition''' must be with in the valid range of conditions.

[[Anchor(Overlay)]]
''Overlay_``Set``Display``Flag'' '''''flag value'''''

 Sets a display flag for the functional overlay in the current display pane. '''value''' should be 0 or 1. '''flag''' should be one of the following, corresponding to an item in the View, Configure Overlay... dialog box:

 ||0||Truncate Negative Values||
 ||1||Truncate Positive Values||
 ||2||Reverse Phase||
 ||3||Offset Values||
 ||4||Ignore Threshold||
 ||5||Grayscale Overlay||
 ||6||Opaque Overlay||

[[Anchor(Overlay_SetRegistrationToIdentity)]]
''Overlay_``Set``Registration``To``Identity''

  Sets the functional overlay registration to the identity matrix.

[[Anchor(Overlay_SetThreshold)]]
''Overlay_``Set``Threshold'' '''''min mid slope'''''

 Sets the functional overlay threshold. '''min''' and '''mid''' should be valid functional values, and '''slope''' should a positive floating point number.

[[Anchor(Overlay_SetTimePoint)]]
''Overlay_``Set``Time``Point'' '''''timePoint'''''

 Sets the functional overlay's current time point. '''timePoint''' must be with in the valid range of time points

[[Anchor(Overlay_SetVolumeSampleType)]]
''Overlay_``Set``Volume``Sample``Type'' '''''sampleType'''''

 Sets the functional overlay sampling method. '''sampleType''' should be 0 for nearest neighbor sampling and 1 for trilinear sampling.

[[Anchor(QuitMedit)]]
''Quit``Medit''

 Quits the program.

[[Anchor(ReadCursor)]]
 ''Read``Cursor''

 Reads a location from the {{{edit.dat}}} file and sets the cursor to that location.

[[Anchor(ReadVoxelLabels)]]
''Read``Voxel``Labels'' '''''voxelLabelVolume1FileName voxelLabelVolume2FileName'''''

 Reads VLI volumes from '''voxelLabelVolume1FileName''' and '''voxelLabelVolume2FileName'''.

[[Anchor(RecomputeSegmentation)]]
''Recompute``Segmentation'' '''''volume'''''

 Recomputes the Main or Aux segmentation volume based on the Main anatomical volume, the GCA volume, and the specified segmentation volume and its changed values. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume.

[[Anchor(RedrawAll)]]
''Redraw``All''

 This schedules a redraw of the graphics window which will happen at the next update. It is best suited when a redraw does not need to happen until a series of script commands is finished.

[[Anchor(RedrawScreen)]]
''Redraw``Screen''

 This forces an immediate redraw of the graphics window. This should be used when a script takes multiple screen captures in the middle of a loop.

[[Anchor(RestoreHeadPts)]]
''Restore``Head``Pts''

 Restores the head points transformation to the original matrix.

[[Anchor(RestorePreviousSegmentation)]]
''Restore``Previous``Segmentation'' '''''volume'''''

 Restores a segmentation volume to the state it was in before it was recomputed. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume.

[[Anchor(RestoreVolumeFromSnapshot)]]
''Restore``Volume``From``Snapshot''

 Restores the Main volume to the state it was in when the snapshot was taken.

[[Anchor(RotateHeadPts)]]
''Rotate``Head``Pts'' '''''degrees axis'''''

 Rotates the head points orientation by '''degrees''' degrees over the x, y, or z axis. '''degrees''' can be a floating point number and '''axis''' should be x, y, or z.

[[Anchor(RotateOverlayRegistration)]]
''Rotate``Overlay``Registration'' '''''degrees axis'''''

 Rotates the functional overlay registration by '''degrees''' degrees over the x, y, or z axis. '''degrees''' can be a floating point number and '''axis''' should be x, y, or z.

[[Anchor(RotateVolume)]]
''Rotate``Volume'' '''''axis degrees'''''

 Rotates the Main anatomical volume over the x, y, or z axis by '''degrees''' degrees. '''degrees''' can be a floating point number and '''axis''' should be x, y, or z.

[[Anchor(SaveGCA)]]
''Save``GCA'' '''''volumeFileName'''''

 Saves the GCA volume as '''volumeFileName'''.

[[Anchor(SaveLabel)]]
''Save``Label'' '''''labelFileName'''''

 Saves the current selection as a label file in '''labelFileName'''.

[[Anchor(SaveTIFF)]]
''Save``TIFF'' '''''imageFileName'''''

 Takes a screen shot of the graphics window and saves it as an TIFF file in '''imageFileName'''.

[[Anchor(SaveSegmentationVolume)]]
''Save``Segmentation``Volume'' '''''volume [destinationDirectory]'''''

 Saves the specified segmentation volume in its original location (overwriting the old file), or in a new location if '''destinationDirectory''' is specified. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

[[Anchor(SaveVolume)]]
''Save``Volume'' '''''volume'''''

 Saves the anatomical volume in its original location, overwriting the old file. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

[[Anchor(SaveVolumeAs)]]
''Save``Volume``As'' '''''volume destinationDirectory'''''

 Saves the anatomical volume in '''destinationDirectory'''. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

[[Anchor(ScaleOverlayRegistration)]]
''Scale``Overlay``Registration'' '''''distance axis'''''

 Scales the functional overlay registration by '''distance''' over the x, y, or z axis. '''distance''' can be a floating point number and '''axis''' should be x, y, or z.

[[Anchor(SelectVoxelsByFuncValuecompareType)]]
''Select``Voxels``By``Func``Value'' '''''compareType'''''

 Adds to the selection all contiguous voxels whose functional value pass the comparison with the value under the cursor. '''compareType''' should be one of the following:

 ||0||Greater than or equal to, or less than or equal to: If the value is positive, this will select all voxels whose value are greater than or equal to the value, and if negative, less than or equal to.||
 ||1||Equal to: Values must be equal||
 ||2||Greater than or equal to threshold minimum: This will select all voxels whose values are above the threshold minimum||

[[Anchor(SendCursor)]]
''Send``Cursor''

 Writes the location of the cursor to the {{{edit.dat}}} file, to be shared with tksurfer.

[[Anchor(SetBrushInfo)]]
''Set``Brush``Info'' '''''brush low high new'''''

 Sets information about the anatomical Edit Voxel Tool shape. '''brush''' should be 2 or 3, for the brush associated with button 2 or 3. '''low''', '''high''', and '''new''' should be within the range of voxel values, and set the threshold and new values for the brush.

[[Anchor(SetBrushInfoToDefaults)]]
''Set``Brush``Info``To``Defaults''

 Restores the brush info (see above) to the default values.

[[Anchor(SetBrushShape)]]
''Set``Brush``Shape'' '''''radius shape 3D'''''

 Sets the brush shape, which affects both edit tools and the Select Voxels tool. '''radius''' should be an integer greater than 0. '''shape''' should be 0 for circle, and 1 for square. '''3D''' should be 0 for in-plane edits only, and 1 for three dimensional editing.

[[Anchor(SetBrushTarget)]]
''Set``Brush``Target'' '''''target'''''

 Sets the brush Edit Voxel Tool target. '''target''' should be 0 for the Main volume, and 1 for the Main and Aux volume.

[[Anchor(SetCursor)]]
''Set``Cursor'' '''''coordinateSpace x y z'''''

 Sets the cursor in the volume and moves the current slice to display it. '''coordinateSpace''' should be 0 for volume index space, 1 for RAS world space, and 2 for Talairach space. '''x''', '''y''', and '''z''' can be floating point numbers.

[[Anchor(SetCursorColor)]]
''Set``Cursor``Color'' '''''r g b'''''

 Sets the display color for the cursor. '''r''', '''g''', and '''b''' should be floating point values from 0 to 1.

[[Anchor(SetCursorShape)]]
''Set``Cursor``Shape'' '''''shape'''''

 Sets the display shape for the cursor. '''shape''' should be 0 for crosshair and 1 for diamond.

[[Anchor(SetCursorToCenterOfSelection)]]
''Set``Cursor``To``Center``Of``Selection''

 Sets the cursor location to the center of the current selection, changing the view appropriately.

[[Anchor(SetDTIAlpha)]]
''Set``DTI``Alpha'' '''''alpha'''''

 Sets the opacity alpha for the DTI overlay. '''alpha''' should be a floating point number between 0 and 1.

[[Anchor(SetDisplayConfig)]]
''Set``Display``Config'' '''''numberOfColumns numberOfRows linkPolicy'''''

 Sets the number of rows and columns of display panes in the graphics window. Calling this function will configure the panes in default orientations and slice numbers. '''numberOfCols''' and '''numberOfRows''' should be between 1 and 4. '''linkPolicy''' should be one of the following:

 ||0||None: Normal link policy; cursor actions in other panes don't affect each other.||
 ||1||Cursor: Changing the cursor in one pane will set the cursor in other panes. Zoom levels are linked. Orientation changes are linked. When the display is set to this configuration, all panes are set to different orientations around the cursor.||
 ||2||Slice: Changing the slice number in one view will change all other views by the same amount. Cursor changes are not linked. Zoom levels are linked. Orientation changes are linked. When the display is first set to this configuration, all panes are set to the same orientation but to different slices.||

[[Anchor(SetDisplayFlag)]]
''Set``Display``Flag'' '''''flag value'''''

 Sets a display flag for the current display pane. '''value''' should be 0 or 1. flag should be one of the following, corresponding to an item in the View menu:

 ||1||Aux Volume||
 ||2||Anatomical Volume||
 ||3||Cursor||
 ||4||Main Surface||
 ||5||Original Surface||
 ||6||Pial Surface||
 ||7||Interpolate Surface Vertices||
 ||8||Surface Vertices||
 ||9||Control Points||
 ||10||Selection||
 ||11||Functional Overlay||
 ||12||Functional Color Scale Bar||
 ||13||Mask to Functional Overlay||
 ||14||Histogram Percent Change||
 ||15||Segmentation Volume Overlay||
 ||16||Aux Segmentation Volume||
 ||17||Segmentation Label Volume Count||
 ||18||DTI Overlay||
 ||20||Focus Frame||
 ||21||Undoable Voxels||
 ||22||Axes||
 ||23||Maximum Intensity Porjection||
 ||24||Head Points||
 ||25||Verbose GCA Dump||

[[Anchor(SetFloodSelectParams)]]
''Set``Flood``Select``Params'' '''''3D sourceVolume fuzziness distance'''''

 Sets the parameters for the flood select part of the Select Voxels tool. '''3D''' should be 0 or 1. '''sourceVolume''' should be 0 for the Main anatomical volume, 1 for the Aux anatomical volume, 2 for the Main segmentation volume, and 3 for the Aux segmentation volume. '''fuzziness''' and '''distance''' should be floating point numbers.

[[Anchor(SetFuncOverlayAlpha)]]
''Set``Func``Overlay``Alpha'' '''''alpha'''''

 Sets the opacity alpha for the functional overlay. '''alpha''' should be a floating point number between 0 and 1.

[[Anchor(SetGCADisplayStatus)]]
''Set``GCA``Display``Status'' '''''displayIntermediateResults'''''

 Sets the display status for GCA operations. '''displayIntermediateResults''' should be 0 or 1.

[[Anchor(SetLinkedCursorFlag)]]
''Set``Linked``Cursor``Flag'' '''''linked'''''

 Sets cursor linking on or off. '''linked''' should be 0 or 1.

[[Anchor(SetOrientation)]]
''Set``Orientation'' '''''orientation'''''

 Sets the orientation of the current display pane. '''orientation''' should be 0 for coronal, 1 for horizontal, or 2 for sagittal.

[[Anchor(SetSegBrushInfo)]]
''Set``Seg``Brush``Info'' '''''newValue 3D sourceVolume fuzziness distance'''''

 Sets the parameters for the Edit Segmentation tool, both brush and fill parameters. '''newValue''' should be a valid index in the currently loaded color table. '''3D''' should be 0 or 1. '''sourceVolume''' should be 0 for the Main anatomical volume, 1 for the Aux anatomical volume, 2 for the Main segmentation volume, and 3 for the Aux segmentation volume. '''fuzziness''' and '''distance''' should be floating point numbers.

[[Anchor(SetSegmentationAlpha)]]
''Set``Segmentation``Alpha'' '''''alpha'''''

 Sets the opacity alpha for the segmentation overlay. '''alpha''' should be a floating point number between 0 and 1.

[[Anchor(SetSelectedHeadPointLabel)]]
''Set``Selected``Head``Point``Label'' '''''label'''''

 Sets the label for the currently selected head point. '''label''' should be a string.

[[Anchor(SetSlice)]]
''Set``Slice'' '''''sliceNumber'''''

 Sets the slice number in the currently selected display pane for the anatomical volume. Note that this may trigger updates in other panes due to cursor linking. '''sliceNumber''' should be within the valid range of volume index coordinates.

[[Anchor(SetSurfaceDistanceAtCursor)]]
''Set``Surface``Distance``At``Cursor''

 Copies the current surface distance value into the Main surface vertex nearest the cursor.

[[Anchor(SetSurfaceLineColor)]]
''Set``Surface``Line``Color'' '''''surface set r g b'''''

 Sets the surface line color. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface. '''set''' should be 0 for Main, 1 for Original, and 2 for Pial. '''r''', '''g''', and '''b''' should be floating numbers from 0 to 1.

[[Anchor(SetSurfaceLineWidth)]]
''Set``Surface``Line``Width'' '''''surface set width'''''

 Sets the surface line width. '''surface''' should be 0 for the Main surface, and 1 for the Aux surface. '''set''' should be 0 for Main, 1 for Original, and 2 for Pial. '''width''' should be an integer.

[[Anchor(SetTool)]]
''Set``Tool'' '''''tool'''''

 Sets the currently active tool. '''tool''' should be 0 for Navigate, 1 for Select Voxels, 2 for Edit Voxels, 3 for Edit Segmentation, or 4 for Edit Control Points.

[[Anchor(SetVolumeBrightnessContrast)]]
''Set``Volume``Brightness``Contrast'' '''''volume brightness contrast'''''

 Sets the brightness and contrast values for a volume. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. '''brightness''' should be a floating point number from 0 to 1 (0 is brighter than 1) and '''contrast''' should be a floating point number from 0 to 30.

[[Anchor(SetVolumeColorScale)]]
''Set``Volume``Color``Scale'' '''''volume brightness contrast min max'''''

 Sets the color (grayscale, really) scale for a volume. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. '''brightness''' should be a floating point number from 0 to 1 (0 is brighter than 1) and '''contrast''' should be a floating point number from 0 to 30. '''min''' and '''max''' define the values for black and white and should be valid numbers in the voxel value range.

[[Anchor(SetVolumeMinMax)]]
''Set``Volume``Min``Max'' '''''volume min max'''''

 Sets the color (grayscale, really) scale for a volume. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. '''min''' and '''max''' define the values for black and white and should be valid numbers in the voxel value range.

[[Anchor(SetVolumeResampleMethod)]]
''Set``Volume``Resample``Method'' '''''volume method'''''

 Sets the resampling method for an anatomical volume. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. '''method''' should be 0 for RAS and 1 for slice.

[[Anchor(SetVolumeSampleType)]]
''Set``Volume``Sample``Type'' '''''volume sampleType'''''

 Sets the sampling method for an anatomical volume. '''volume''' should be 0 for the Main volume, and 1 for the Aux volume. '''sampleType''' should be 0 for nearest neighbor, 1 for trilinear, and 2 for sinc.

[[Anchor(SetZoomCenter)]]
''Set``Zoom``Center'' '''''x y z'''''

 Sets the zoom center of the current display pane, changing the visible area without setting the cursor. '''x''', '''y''', and '''z''' should be integers in the anatomical index space.

[[Anchor(SetZoomLevel)]]
''Set``Zoom``Level'' '''''level'''''

 Sets the zoom level of the current display pane. '''level''' should be an integer from 1 to 128.

[[Anchor(ShowNearestInterpolatedMainVertex)]]
''Show``Nearest``Interpolated``Main``Vertex''

 Sets the cursor to the point of the nearest interpolated vertex on the Main surface configuration.

[[Anchor(ShowNearestInterpolatedOriginalVertex)]]
''Show``Nearest``Interpolated``Original``Vertex''

 Sets the cursor to the point of the nearest interpolated vertex on the Original surface configuration.

[[Anchor(ShowNearestInterpolatedPialVertex)]]
''Show``Nearest``Interpolated``Pial``Vertex''

 Sets the cursor to the point of the nearest interpolated vertex on the Pial surface configuration.

[[Anchor(ShowNearestMainVertex)]]
''Show``Nearest``Main``Vertex''

 Sets the cursor to the point of the vertex on the Main surface configuration.

[[Anchor(ShowNearestOriginalVertex)]]
''Show``Nearest``Original``Vertex''

 Sets the cursor to the point of the vertex on the Original surface configuration.

[[Anchor(ShowNearestPialVertex)]]
''Show``Nearest``Pial``Vertex''

 Sets the cursor to the point of the vertex on the Pial surface configuration.

[[Anchor(SmartCutAtCursor)]]
''Smart``Cut``At``Cursor''

 Performs a smart cut operation at the current cursor location.

[[Anchor(SmoothFunctionalOverlay)]]
''Smooth``Functional``Overlay'' '''''sigma'''''

 Smooths the functional overlay volume with given sigma. sigma should be a floating point number.

[[Anchor(SnapshotVolume)]]
''Snapshot``Volume''

 Saves the state of the Main anatomical volume so it can be restored later.

[[Anchor(ThresholdVolume)]]
''Threshold``Volume'' '''''thresholdValue direction newValue'''''

 Performs a thresholding operation on the Main anatomical volume. '''thresholdValue''' is the value above or below which all values will be set to '''newValue''', and both must be valid anatomical values. '''direction''' should be 0 for below, or 1 for above.

[[Anchor(TimeCourse_PrintSelection)]]
''Time``Course_``Print``Selection``RangeToFile'' '''''fileName'''''

 Prints information about the averaged time course values over all time points for the selected voxels to a text file '''fileName'''.

[[Anchor(TimeCourse_SetDisplayFlag)]]
''Time``Course_``Set``Display``Flag'' '''''flag value'''''

 Sets a display flag for the functional time course. '''value''' should be 0 or 1. '''flag''' should be one of the following, corresponding to an item in the View, Configure Time Course... dialog box:

 ||7||Open Graph Window||
 ||8||Offset Values||
 ||9||Show Prestim Offset||

[[Anchor(TimeCourse_SetNumPreStimPoints)]]
''Time``Course_``Set``Num``Pre``Stim``Points'' '''''numPoints'''''

 Sets the number of pre-stim time points in the time course volume to '''numPoints'''.

[[Anchor(TimeCourse_SetTimeResolution)]]
''Time``Course_``Set``Time``Resolution'' '''''resolution'''''

 Sets the time resolution of the time course volume to '''resolution'''.

[[Anchor(TranslateHeadPts)]]
''Translate``Head``Pts'' '''''distance axis'''''

 Translates the head points orientation by '''distance''' units over the x, y, or z axis. '''axis''' can be x, y, or z.

[[Anchor(UndoLastEdit)]]
''Undo``Last``Edit''

 Performs and undo.

[[Anchor(UnloadAllSurfaces)]]
''Unload``All``Surfaces''

 Unloads the Main and Aux surface.

[[Anchor(UnloadGCA)]]
''UnloadGCA''

 Unloads the GCA volume.

[[Anchor(UnloadSurface)]]
''Unload``Surface'' '''''surface'''''

 Unloads a surface. '''surface''' should be 0 for the Main surface, or 1 for the Aux surface.

[[Anchor(UnloadVolume)]]
''Unload``Volume'' '''''volume'''''

 Unloads an anatomical volume. '''volume''' should be 0 for the Main volume, or 1 for the Aux volume.

[[Anchor(UnloadVolumeDisplayTransform)]]
''Unload``Volume``Display``Transform'' '''''volume'''''

 Unloads an anatomical volume display transform. '''volume''' should be 0 for the Main volume's transform, or 1 for the Aux volume's transform.

[[Anchor(WriteControlPointFile)]]
''Write``Control``Point``File''

 Writes the control points to the control.dat file. This is done automatically when adding a new point, but not when removing a point.

[[Anchor(WriteHeadPointsFile)]]
''Write``Head``Points``File''

 Writes the head points file. This overwrites the previous file.

[[Anchor(WriteHeadPointsTransform)]]
''Write``Head``Points``Transform''

 Writes the head points transform file. This overwrites the previous file.

[[Anchor(WriteSurfaceValues)]]
''Write``Surface``Values'' '''''surface valueFileName'''''

 Writes the a surface's vertex values to a value file '''valueFileName'''. '''surface''' should be 0 for the Main surface, or 1 for the Aux surface.
Line 853: Line 641:
=== Viewing Operations ===

[#align_sphere align_sphere]
[#do_lighting_model do_lighting_model]
[#draw_cursor draw_cursor]
[#left_click left_click]
[#make_lateral_view make_lateral_view]
[#move_window move_window]
[#redraw redraw]
[#rotate_brain_x rotate_brain_x]
[#rotate_brain_y rotate_brain_y]
[#rotate_brain_z rotate_brain_z]
[#scale_brain scale_brain]
[#send_current_labels send_current_labels]
[#show_flat_regions show_flat_regions]
[#translate_brain_x translate_brain_x]
[#translate_brain_y translate_brain_y]
[#translate_brain_z translate_brain_z]
[#read_really_matrix read_really_matrix]
[#read_view_matrix read_view_matrix]
[#really_center_brain really_center_brain]
[#really_rotate_brain_x really_rotate_brain_x]
[#really_rotate_brain_y really_rotate_brain_y]
[#really_rotate_brain_z really_rotate_brain_z]
[#really_scale_brain really_scale_brain]
[#really_translate_brain really_translate_brain]
[#resize_brain resize_brain]
[#resize_window resize_window]
[#restore_zero_position restore_zero_position]
[#restore_initial_position restore_initial_position]
[#transform_brain transform_brain]
[#write_view_matrix write_view_matrix]
[#write_really_matrix write_really_matrix]
[#AverageSurfaceVertexPositions AverageSurfaceVertexPositions]

=== Anatomical ===
[#FlipVolume FlipVolume]
[#LoadAuxVolume LoadAuxVolume]
[#LoadVolume LoadVolume]
[#LoadVolumeDisplayTransform LoadVolumeDisplayTransform]
[#RestoreVolumeFromSnapshot RestoreVolumeFromSnapshot]
[#RotateVolume RotateVolume]
[#SaveVolume SaveVolume]
[#SaveVolumeAs SaveVolumeAs]
[#SetVolumeBrightnessContrast SetVolumeBrightnessContrast]
[#SetVolumeColorScale SetVolumeColorScale]
[#SetVolumeMinMax SetVolumeMinMax]
[#SetVolumeResampleMethod SetVolumeResampleMethod]
[#SetVolumeSampleType SetVolumeSampleType]
[#SmartCutAtCursor SmartCutAtCursor]
[#SnapshotVolume SnapshotVolume]
[#ThresholdVolume ThresholdVolume]
[#UndoLastEdit UndoLastEdit]
[#UnloadVolume UnloadVolume]
[#UnloadVolumeDisplayTransform UnloadVolumeDisplayTransform]
=== DTI ===
[#LoadDTIVolumes LoadDTIVolumes]
[#SetDTIAlpha SetDTIAlpha]
[#Editing Editing]
[#ClearUndoVolume ClearUndoVolume]
[#FlipVolume FlipVolume]
[#RestoreVolumeFromSnapshot RestoreVolumeFromSnapshot]
[#RotateVolume RotateVolume]
[#SetBrushInfo SetBrushInfo]
[#SetBrushInfoToDefaults SetBrushInfoToDefaults]
[#SetBrushShape SetBrushShape]
[#SetBrushTarget SetBrushTarget]
[#SetSegBrushInfo SetSegBrushInfo]
[#SetTool SetTool]
[#SmartCutAtCursor SmartCutAtCursor]
[#SnapshotVolume SnapshotVolume]
[#ThresholdVolume ThresholdVolume]
[#UndoLastEdit UndoLastEdit]
=== Functional ===
[#GraphSelectedRegion GraphSelectedRegion]
[#LoadFunctionalOverlay LoadFunctionalOverlay]
[#LoadFunctionalTimeCourse LoadFunctionalTimeCourse]
[#Overlay_RestoreRegistration Overlay_RestoreRegistration]
[#Overlay_SaveRegistration Overlay_SaveRegistration]
[#Overlay_SetCondition Overlay_SetCondition]
[#Overlay_SetDisplayFlag Overlay_SetDisplayFlag]
[#Overlay_SetRegistrationToIdentity Overlay_SetRegistrationToIdentity]
[#Overlay_SetThreshold Overlay_SetThreshold]
[#Overlay_SetTimePoint Overlay_SetTimePoint]
[#Overlay_SetVolumeSampleType Overlay_SetVolumeSampleType]
[#RotateOverlayRegistration RotateOverlayRegistration]
[#ScaleOverlayRegisgtration ScaleOverlayRegisgtration]
[#SelectVoxelsByFuncValue SelectVoxelsByFuncValue]
[#SetFuncOverlayAlpha SetFuncOverlayAlpha]
[#SmoothFunctionalOverlay SmoothFunctionalOverlay]
[#TimeCourse_PrintSelectionRangeToFile TimeCourse_PrintSelectionRangeToFile]
[#TimeCourse_SetDisplayFlag TimeCourse_SetDisplayFlag]
[#TimeCourse_SetNumPreStimPoints TimeCourse_SetNumPreStimPoints]
[#TimeCourse_SetTimeResolution TimeCourse_SetTimeResolution]
=== Control Points ===
[#NewControlPoint NewControlPoint]
[#WriteControlPointFile WriteControlPointFile]
=== GCA ===
[#LoadGCA LoadGCA]
[#LoadGCARenormalization LoadGCARenormalization]
[#SaveGCA SaveGCA]
[#SetGCADisplayStatus SetGCADisplayStatus]
[#UnloadGCA UnloadGCA]
=== Head Points ===
[#LoadHeadPts LoadHeadPts]
[#RestoreHeadPts RestoreHeadPts]
[#RotateHeadPts RotateHeadPts]
[#SetSelectedHeadPointLabel SetSelectedHeadPointLabel]
[#TranslateHeadPts TranslateHeadPts]
[#TranslateOverlayRegisgtration TranslateOverlayRegisgtration]
[#WriteHeadPointsFile WriteHeadPointsFile]
[#WriteHeadPointsTransform WriteHeadPointsTransform]
Line 888: Line 721:

[#func_load_timecourse func_load_timecourse]
[#func_load_timecourse_offset func_load_timecourse_offset]
[#labl_export_annotation labl_export_annotation]
[#labl_import_annotation labl_import_annotation]
[#labl_load labl_load]
[#labl_load_color_table labl_load_color_table]
[#labl_save labl_save]
[#labl_save_all labl_save_all]
[#read_annotations read_annotations]
[#read_binary_curv read_binary_curv]
[#read_binary_decimation read_binary_decimation]
[#read_binary_dipoles read_binary_dipoles]
[#read_binary_sulc read_binary_sulc]
[#read_binary_surf read_binary_surf]
[#read_binary_values read_binary_values]
[#read_binary_values_frame read_binary_values_frame]
[#read_binary_patch read_binary_patch]
[#read_canon_vertex_coordinates read_canon_vertex_coordinates]
[#read_curv_to_val read_curv_to_val]
[#read_fieldsign read_fieldsign]
[#read_fsmask read_fsmask]
[#read_imag_vals read_imag_vals]
[#read_labeled_vertices read_labeled_vertices]
[#read_orig_vertex_coordinates read_orig_vertex_coordinates]
[#read_pial_vertex_coordinates read_pial_vertex_coordinates]
[#read_surface_vertex_set read_surface_vertex_set]
[#read_white_vertex_coordinates read_white_vertex_coordinates]
[#sclv_load_label_value_file sclv_load_label_value_file]
[#sclv_read_bfile_values sclv_read_bfile_values]
[#sclv_read_binary_values sclv_read_binary_values]
[#sclv_read_binary_values_frame sclv_read_binary_values_frame]
[#sclv_read_from_dotw sclv_read_from_dotw]
[#sclv_read_from_volume sclv_read_from_volume]
[#sclv_write_dotw sclv_write_dotw]
[#write_binary_curv write_binary_curv]
[#write_binary_dipoles write_binary_dipoles]
[#write_binary_patch write_binary_patch]
[#write_binary_surface write_binary_surface]
[#write_binary_sulc write_binary_sulc]
[#write_fieldsign write_fieldsign]
[#write_fsmask write_fsmask]
[#write_labeled_vertices write_labeled_vertices]
[#write_vrml write_vrml]

=== Curvature Operations ===

[#clear_curvature clear_curvature]
[#compute_curvature compute_curvature]
[#curv_to_val curv_to_val]
[#fill_flood_from_cursor fill_flood_from_cursor]
[#mark_contiguous_vertices_with_similar_curvature mark_contiguous_vertices_with_similar_curvature]
[#smooth_curv smooth_curv]
[#val_to_curv val_to_curv]

=== Overlay Operations ===

[#curv_to_val curv_to_val]
[#f_to_t f_to_t]
[#fill_flood_from_cursor fill_flood_from_cursor]
[#label_to_stat label_to_stat]
[#mark_contiguous_vertices_over_thresh mark_contiguous_vertices_over_thresh]
[#sclv_copy_all_view_settings_from_current_field sclv_copy_all_view_settings_from_current_field]
[#sclv_copy_view_settings_from_current_field sclv_copy_view_settings_from_current_field]
[#sclv_copy_view_settings_from_field sclv_copy_view_settings_from_field]
[#sclv_get_normalized_color_for_value sclv_get_normalized_color_for_value]
[#sclv_load_label_value_file sclv_load_label_value_file]
[#sclv_read_bfile_values sclv_read_bfile_values]
[#sclv_read_binary_values sclv_read_binary_values]
[#sclv_read_binary_values_frame sclv_read_binary_values_frame]
[#sclv_read_from_dotw sclv_read_from_dotw]
[#sclv_read_from_volume sclv_read_from_volume]
[#sclv_send_current_field_info sclv_send_current_field_info]
[#sclv_send_histogram sclv_send_histogram]
[#sclv_set_current_field sclv_set_current_field]
[#sclv_set_current_threshold_from_percentile sclv_set_current_threshold_from_percentile]
[#sclv_set_current_threshold_using_fdr sclv_set_current_threshold_using_fdr]
[#sclv_set_current_timepoint sclv_set_current_timepoint]
[#sclv_set_overlay_alpha sclv_set_overlay_alpha]
[#sclv_smooth sclv_smooth]
[#sclv_write_dotw sclv_write_dotw]
[#stat_to_val stat_to_val]
[#swap_val_val2 swap_val_val2]
[#val_to_curv val_to_curv]
[#val_to_stat val_to_stat]

=== Vertex Operations ===

[#fill_flood_from_cursor fill_flood_from_cursor]
[#find_orig_vertex_coordinates find_orig_vertex_coordinates]
[#fix_nonzero_vals fix_nonzero_vals]
[#flip_normals flip_normals]
[#invert_face invert_face]
[#invert_surface invert_surface]
[#invert_vertex invert_vertex]
[#read_canon_vertex_coordinates read_canon_vertex_coordinates]
[#read_orig_vertex_coordinates read_orig_vertex_coordinates]
[#read_pial_vertex_coordinates read_pial_vertex_coordinates]
[#read_surface_vertex_set read_surface_vertex_set]
[#read_white_vertex_coordinates read_white_vertex_coordinates]
[#set_current_vertex_set set_current_vertex_set]
[#show_surf show_surf]
[#shrink shrink]
[#swap_vertex_fields swap_vertex_fields]

=== Cursor Operations ===

[#draw_cursor draw_cursor]
[#resend_to_subject resend_to_subject]
[#select_orig_vertex_coordinates select_orig_vertex_coordinates]
[#select_talairach_point select_talairach_point]
[#select_vertex_by_vno select_vertex_by_vno]
[#send_spherical_point send_spherical_point]
[#send_to_subject send_to_subject]

=== Ripping and Cutting Operations ===

[#clear_ripflags clear_ripflags]
[#cut_line cut_line]
[#cut_plane cut_plane]
[#dilate_ripped dilate_ripped]
[#restore_ripflags restore_ripflags]
[#rip_all_vertices_except_contiguous_upripped rip_all_vertices_except_contiguous_upripped]
[#undo_last_action undo_last_action]

=== Reporting Information ===

[#dump_vertex dump_vertex]
[#get_selected_path_vnos get_selected_path_vnos]
[#labl_print_list labl_print_list]
[#labl_print_table labl_print_table]
[#plot_curv plot_curv]

=== Screen Shots ===

[#save_rgb save_rgb]
[#save_rgb_cmp_frame save_rgb_cmp_frame]
[#save_tiff save_tiff]

=== Marking Operations ===

[#clear_all_vertex_marks clear_all_vertex_marks]
[#clear_vertex_marks clear_vertex_marks]
[#close_marked_vertices close_marked_vertices]
[#get_selected_path_vnos get_selected_path_vnos]
[#labl_mark_vertices labl_mark_vertices]
[#labl_new_from_marked_vertices labl_new_from_marked_vertices]
[#mark_annotation mark_annotation]
[#mark_contiguous_vertices_over_thresh mark_contiguous_vertices_over_thresh]
[#mark_contiguous_vertices_with_similar_curvature mark_contiguous_vertices_with_similar_curvature]
[#mark_face mark_face]
[#mark_faces mark_faces]
[#mark_vertex mark_vertex]
[#rip_all_vertices_except_contiguous_upripped rip_all_vertices_except_contiguous_upripped]
[#val_to_mark val_to_mark]

=== Label Operations ===

[#label_to_stat label_to_stat]
[#labl_dilate labl_dilate]
[#labl_erode labl_erode]
[#labl_export_annotation labl_export_annotation]
[#labl_import_annotation labl_import_annotation]
[#labl_load labl_load]
[#labl_load_color_table labl_load_color_table]
[#labl_mark_vertices labl_mark_vertices]
[#labl_new_from_marked_vertices labl_new_from_marked_vertices]
[#labl_print_list labl_print_list]
[#labl_print_table labl_print_table]
[#labl_remove labl_remove]
[#labl_remove_all labl_remove_all]
[#labl_save labl_save]
[#labl_save_all labl_save_all]
[#labl_select labl_select]
[#labl_set_color labl_set_color]
[#labl_set_info labl_set_info]
[#labl_set_name_from_table labl_set_name_from_table]
[#labl_select_label_by_vno labl_select_label_by_vno]
[#mask_label mask_label]
[#send_current_labels send_current_labels]

=== Time Courses ===

[#func_clear_selection func_clear_selection]
[#func_graph_timecourse_selection func_graph_timecourse_selection]
[#func_load_timecourse func_load_timecourse]
[#func_load_timecourse_offset func_load_timecourse_offset]
[#func_print_timecourse_selection func_print_timecourse_selection]
[#func_select_label func_select_label]
[#func_select_marked_vertices func_select_marked_vertices]

=== Paths ===

[#path_new_path_from_marked_vertices path_new_path_from_marked_vertices]
[#path_remove_selected_path path_remove_selected_path]
[#path_select path_select]


== Unsupported Functions ==

[[Anchor(add_subject_to_average_curvim)]]
''add_subject_to_average_curvim'' '''''subjectName morphSubdirectory'''''

[[Anchor(clear_all_vertex_cursor)]]
''clear_all_vertex_cursor''

[[Anchor(compute_angles)]]
''compute_angles''

[[Anchor(compute_CMF)]]
''compute_CMF''

[[Anchor(compute_cortical_thickness)]]
''compute_cortical_thickness''

[[Anchor(compute_fieldsign)]]
''compute_fieldsign''

[[Anchor(compute_pval_fwd)]]
''compute_pval_fwd'' '''''pvalThreshold'''''

 '''pvalThreshold''' is a floating point number.

[[Anchor(compute_pval_inv)]]
''compute_pval_inv''

[[Anchor(compute_select_fwd)]]
''compute_select_fwd'' '''''maximumDistance'''''

'''maximumDistance''' is a floating point number in millimeters.

[[Anchor(compute_timecourses)]]
''compute_timecourses''

[[Anchor(curv_shrink_to_fill)]]
''curv_shrink_to_fill'' '''''numberOfSteps'''''

[[Anchor(curv_to_curvim)]]
''curv_to_curvim''

[[Anchor(curvim_to_second_surface)]]
''curvim_to_second_surface''

[[Anchor(curvim_to_surface)]]
''curvim_to_surface''

[[Anchor(deconvolve_weights)]]
''deconvolve_weights'' '''''weightFileName scaleFileName'''''

[[Anchor(draw_all_cursor)]]
''draw_all_cursor''

[[Anchor(draw_all_vertex_cursor)]]
''draw_all_vertex_cursor''

[[Anchor(draw_curvature_line)]]
''draw_curvature_line''

[[Anchor(draw_fundus)]]
''draw_fundus''

[[Anchor(draw_radius)]]
''draw_radius''

[[Anchor(draw_theta)]]
''draw_theta''

[[Anchor(draw_vector)]]
''draw_vector'' '''''fileName'''''

 Reads an x/y vector from '''fileName''' and draws it to the screen.

[[Anchor(ellipsoid_morph)]]
''ellipsoid_morph'' '''''numberOfSteps rightLeftDistance anteriorPosteriorDistance superiorInferiorDistance'''''

 '''numberOfSteps''' is an integer. All distances are in millimeters and should be millimeters.

[[Anchor(ellipsoid_project)]]
''ellipsoid_project'' '''''rightLeftDistance anteriorPosteriorDistance superiorInferiorDistance'''''

  All distances are in millimeters and should be millimeters.

[[Anchor(ellipsoid_shrink)]]
''ellipsoid_shrink'' '''''numberOfSteps radius'''''

 '''radius''' is in millimeters.

[[Anchor(ellipsoid_shrink_bug)]]
''ellipsoid_shrink_bug'' '''''numberOfSteps radius length'''''

 '''radius''' and '''length''' is in millimeters.

[[Anchor(f_to_p)]]
''f_to_p'' '''''DOFnumerator DOFdenominator'''''

[[Anchor(flatten)]]
''flatten''

 Reads the file name from '''subjtmpdir'''.

[[Anchor(fill_second_surface)]]
''fill_second_surface''

[[Anchor(filter_recs)]]
''filter_recs''

[[Anchor(load_gcsa)]]
''load_gcsa'' '''''fileName'''''

[[Anchor(load_vals_from_sol)]]
''load_vals_from_sol'' '''''tmid dt condition'''''

 '''tmid''' is the midpoint, '''dt''' is the delta to go on either side, and '''condition''' is the condition to use.

[[Anchor(load_var_from_sol)]]
''load_var_from_sol'' '''''condition'''''

 '''condition''' is an integer.

[[Anchor(make_lateral_view_second)]]
''make_lateral_view_second''

[[Anchor(normalize_area)]]
''normalize_area''

[[Anchor(normalize_binary_curv)]]
''normalize_binary_curv''

[[Anchor(normalize_inverse)]]
''normalize_inverse''

[[Anchor(normalize_second_binary_curv)]]
''normalize_second_binary_curv''

[[Anchor(normalize_time_courses)]]
''normalize_time_courses'' '''''type'''''

 '''type''' should be 0 to set all values to 1, 1 for normalizing for baseline noise covariance, 2 for normalizing for white noise, 3 for normalizing by read noise covariance matrix, and 4 for unity gain.

[[Anchor(open_window)]]
''open_window''

[[Anchor(orient_sphere)]]
''orient_sphere''

[[Anchor(plot_all_time_courses)]]
''plot_all_time_courses''

[[Anchor(plot_marked)]]
''plot_marked'' '''''fileName'''''

 Generates a summary file of data from all marked vertices in '''fileName'''.

[[Anchor(put_retinotopy_stats_in_vals)]]
''put_retinotopy_stats_in_vals''

 Calculates retinotopy values at each vertex and stores them in the first overlay layer.

[[Anchor(read_and_color_labeled_vertices)]]
''read_and_color_labeled_vertices'' '''''red green blue'''''

 Sets the meshr,g,b values and calls read_labeled_vertices. The colors are integers from 0-254.

[[Anchor(read_and_smooth_parcellation)]]
''read_and_smooth_parcellation'' '''''parcellationFileName colorTableFileName soapBubbleIterations modeFilterIterations'''''

 Reads a parcellation from '''parcellationFileName''' using '''colorTableFileName''' and performs soap bubble and mode filter on the values.

[[Anchor(read_annotated_image)]]
''read_annotated_image''

 Will read the file from '''annot'''.

[[Anchor(read_curv_images)]]
''read_curv_images''

 Loads files into the curvim array.

[[Anchor(read_disc)]]
''read_disc'' '''''subjectName'''''

[[Anchor(read_iop)]]
''read_iop'' '''''fileName dipoleFileNumber'''''

[[Anchor(read_ncov)]]
''read_ncov'' '''''fileName'''''

[[Anchor(read_parcellation)]]
''read_parcellation'' '''''parcellationFileName colorTableFileName'''''

 Reads and smooths a parcellation file into the annotation field. This is different than importing a parcellation file in as a series of labels; this parcellation goes right into surface value fields.

[[Anchor(read_plot_list)]]
''read_plot_list'' '''''fileName'''''

[[Anchor(read_rec)]]
''read_rec'' '''''fileName'''''

[[Anchor(read_second_binary_curv)]]
''read_second_binary_curv''

 Reads a curvature file into mris2. Reads the file name from '''targcurv'''.

[[Anchor(read_second_binary_surf)]]
''read_second_binary_surf''

 Reads mris2. Reads the file name from '''targsurf'''.

[[Anchor(read_soltimecourse)]]
''read_soltimecourse'' '''''fileName'''''

[[Anchor(read_stds)]]
''read_stds'' '''''conditionNumber'''''

 Reads a series of sigvarCOND-?h.w files and a sigavgCOND.dof file into the val field.

[[Anchor(read_surf)]]
''read_surf'' '''''fileName'''''

 Reads only vertex positions from a file into the main surface, overwriting the original positions.

[[Anchor(read_vertex_list)]]
''read_vertex_list'' '''''fileName'''''

[[Anchor(really_align_brain)]]
''really_align_brain''

 Aligns first surface to second.

[[Anchor(really_center_second_brain)]]
''really_center_second_brain''

 Works on the second mris.

[[Anchor(redraw_second)]]
''redraw_second''

 Draws second surface.

[[Anchor(remove_triangle_links)]]
''remove_triangle_links''

 Calls MRI``Sremove``Triangle``Links.

[[Anchor(restore_surf)]]
''restore_surf''

 Restores the vertex positions in the temp position to the main position.

[[Anchor(save_surf)]]
''save_surf''

 Saves the vertex positions in the main position to the temp position.

[[Anchor(sclv_read_from_dotw_frame)]]
''sclv_read_from_dotw_frame''

 This seems to load in a surface full of values, and then individual values, from a file.

[[Anchor(second_surface_curv_to_curvim)]]
''second_surface_curv_to_curvim''

 Works on mris2.

[[Anchor(shift_values)]]
''shift_values''

 Places the values from the first overlay field into the second.

[[Anchor(smooth_curvim)]]
''smooth_curvim'' '''''numberOfSteps'''''

[[Anchor(smooth_curvim_sparse)]]
''smooth_curvim_sparse'' '''''numberOfSteps'''''

[[Anchor(sphere_shrink)]]
''sphere_shrink'' '''''numberOfSteps radius'''''

 '''radius''' is in millimeters.

[[Anchor(smooth_fs)]]
''smooth_fs'' '''''numberOfSteps'''''

 Smooths the field sign values by '''numberOfSteps''', an integer.

[[Anchor(smooth_val)]]
''smooth_val'' '''''numberOfSteps'''''

 sclv_smooth is used instead.

[[Anchor(smooth_val_sparse)]]
''smooth_val_sparse'' '''''numberOfSteps'''''

[[Anchor(sol_plot)]]
''sol_plot'' '''''timePoint plotType'''''

 Uses the '''dlat''' value in computing the range.

[[Anchor(subsample_dist)]]
''subsample_dist'' '''''spacing'''''

 Used in decimation. Calls MRI``Ssubsample``Dist. '''spacing''' is an integer.

[[Anchor(subsample_orient)]]
''subsample_orient'' '''''spacing'''''

 Used in decimation. '''spacing''' is an integer.

[[Anchor(swap_buffers)]]
''swap_buffers''

[[Anchor(swap_curv)]]
''swap_curv''

 Swaps the curv and curvbak fields.

[[Anchor(swap_stat_val)]]
''swap_stat_val''

 Swaps the values in the first overlay field and the fifth.

[[Anchor(swap_val_val2)]]
''swap_val_val2''

 Swaps the values in the first overlay field and the second.

[[Anchor(swap_values)]]
''swap_values''

 Swaps the values in the first overlay field and the second.

[[Anchor(t_to_p)]]
''t_to_p'' '''''DOF'''''

[[Anchor(to_double_buffer)]]
''to_double_buffer''

[[Anchor(to_single_buffer)]]
''to_single_buffer''

[[Anchor(twocond)]]
''twocond'' '''''condition condition'''''

 Both conditions are integers.

[[Anchor(write_binary_areas)]]
''write_binary_areas''

 Calls MRI``Swrite``Area. Will read the file name from '''area'''.

[[Anchor(write_binary_decimation)]]
''write_binary_decimation''

 Calls MRI``Swrite``Decimation. Will read the file name from '''dec'''.

[[Anchor(write_binary_values)]]
''write_binary_values''

 Calls MRI``Swrite``Values. Will read the file name from '''val'''.

[[Anchor(write_curv_images)]]
''write_curv_images''

 Will read the file name from '''targcurvim'''.

[[Anchor(write_decimation)]]
''write_decimation''

 Will read the file name from '''dec'''.

[[Anchor(write_dipoles)]]
''write_dipoles''

 Will read the file name from '''dip'''.

[[Anchor(write_fill_images)]]
''write_fill_images''

[[Anchor(write_subsample)]]
''write_subsample''

 Writes an ASCII file. Will read the file name from '''fs'''.

=== Index ===

[#add_subject_to_average_curvim add_subject_to_average_curvim]
[#clear_all_vertex_cursor clear_all_vertex_cursor]
[#compute_angles compute_angles]
[#compute_CMF compute_CMF]
[#compute_cortical_thickness compute_cortical_thickness]
[#compute_fieldsign compute_fieldsign]
[#compute_pval_fwd compute_pval_fwd]
[#compute_pval_inv compute_pval_inv]
[#compute_select_fwd compute_select_fwd]
[#compute_timecourses compute_timecourses]
[#curv_shrink_to_fill curv_shrink_to_fill]
[#curv_to_curvim curv_to_curvim]
[#curvim_to_second_surface curvim_to_second_surface]
[#curvim_to_surface curvim_to_surface]
[#deconvolve_weights deconvolve_weights]
[#draw_all_cursor draw_all_cursor]
[#draw_all_vertex_cursor draw_all_vertex_cursor]
[#draw_curvature_line draw_curvature_line]
[#draw_fundus draw_fundus]
[#draw_radius draw_radius]
[#draw_theta draw_theta]
[#draw_vector draw_vector]
[#ellipsoid_morph ellipsoid_morph]
[#ellipsoid_project ellipsoid_project]
[#ellipsoid_shrink ellipsoid_shrink]
[#ellipsoid_shrink_bug ellipsoid_shrink_bug]
[#f_to_p f_to_p]
[#flatten flatten]
[#fill_second_surface fill_second_surface]
[#filter_recs filter_recs]
[#load_gcsa load_gcsa]
[#load_vals_from_sol load_vals_from_sol]
[#load_var_from_sol load_var_from_sol]
[#make_lateral_view_second make_lateral_view_second]
[#normalize_area normalize_area]
[#normalize_binary_curv normalize_binary_curv]
[#normalize_inverse normalize_inverse]
[#normalize_second_binary_curv normalize_second_binary_curv]
[#normalize_time_courses normalize_time_courses]
[#open_window open_window]
[#orient_sphere orient_sphere]
[#plot_all_time_courses plot_all_time_courses]
[#plot_marked plot_marked]
[#put_retinotopy_stats_in_vals put_retinotopy_stats_in_vals]
[#read_and_color_labeled_vertices read_and_color_labeled_vertices]
[#read_and_smooth_parcellation read_and_smooth_parcellation]
[#read_annotated_image read_annotated_image]
[#read_curv_images read_curv_images]
[#read_disc read_disc]
[#read_iop read_iop]
[#read_ncov read_ncov]
[#read_parcellation read_parcellation]
[#read_plot_list read_plot_list]
[#read_rec read_rec]
[#read_second_binary_surf read_second_binary_surf]
[#read_second_binary_curv read_second_binary_curv]
[#read_soltimecourse read_soltimecourse]
[#read_stds read_stds]
[#read_surf read_surf]
[#read_vertex_list read_vertex_list]
[#really_align_brain really_align_brain]
[#really_center_second_brain really_center_second_brain]
[#redraw_second redraw_second]
[#remove_triangle_links remove_triangle_links]
[#restore_surf restore_surf]
[#save_surf save_surf]
[#sclv_read_from_dotw_frame sclv_read_from_dotw_frame]
[#second_surface_curv_to_curvim second_surface_curv_to_curvim]
[#shift_values shift_values]
[#smooth_curvim smooth_curvim]
[#smooth_curvim_sparse smooth_curvim_sparse]
[#sphere_shrink sphere_shrink]
[#smooth_fs smooth_fs]
[#smooth_val smooth_val]
[#smooth_val_sparse smooth_val_sparse]
[#sol_plot sol_plot]
[#subsample_dist subsample_dist]
[#subsample_orient subsample_orient]
[#swap_buffers swap_buffers]
[#swap_curv swap_curv]
[#swap_stat_val swap_stat_val]
[#swap_stat_val2 swap_stat_val2]
[#swap_values swap_values]
[#t_to_p t_to_p]
[#to_single_buffer to_single_buffer]
[#to_double_buffer to_double_buffer]
[#twocond twocond]
[#write_binary_areas write_binary_areas]
[#write_binary_decimation write_binary_decimation]
[#write_binary_values write_binary_values]
[#write_curv_images write_curv_images]
[#write_decimation write_decimation]
[#write_dipoles write_dipoles]
[#write_fill_images write_fill_images]
[#write_subsample write_subsample]
[#LoadAuxVolume LoadAuxVolume]
[#LoadDTIVolumes LoadDTIVolumes]
[#LoadFunctionalOverlay LoadFunctionalOverlay]
[#LoadFunctionalTimeCourse LoadFunctionalTimeCourse]
[#LoadGCA LoadGCA]
[#LoadGCARenormalization LoadGCARenormalization]
[#LoadHeadPts LoadHeadPts]
[#LoadLabel LoadLabel]
[#LoadMainSurface LoadMainSurface]
[#LoadOriginalSurface LoadOriginalSurface]
[#LoadPialSurface LoadPialSurface]
[#LoadSegmentationVolume LoadSegmentationVolume]
[#LoadSurfaceAnnoation LoadSurfaceAnnoation]
[#LoadVolume LoadVolume]
[#LoadVolumeDisplayTransform LoadVolumeDisplayTransform]
[#ReadCursor ReadCursor]
[#ReadVoxelLabels ReadVoxelLabels]
[#SaveGCA SaveGCA]
[#SaveLabel SaveLabel]
[#SaveRGB SaveRGB]
[#SaveSegmentationVolume SaveSegmentationVolume]
[#SaveVolume SaveVolume]
[#SaveVolumeAs SaveVolumeAs]
[#UnloadAllSurfaces UnloadAllSurfaces]
[#UnloadGCA UnloadGCA]
[#UnloadSurface UnloadSurface]
[#UnloadVolume UnloadVolume]
[#UnloadVolumeDisplayTransform UnloadVolumeDisplayTransform]
[#WriteControlPointFile WriteControlPointFile]
[#WriteHeadPointsFile WriteHeadPointsFile]
[#WriteHeadPointsTransform WriteHeadPointsTransform]
[#WriteSurfaceValues WriteSurfaceValues]
=== Misc ===
[#DebugPrint DebugPrint]
[#QuitMedit QuitMedit]
[#SaveRGB SaveRGB]
[#SetTool SetTool]
=== Selection ===
[#ClearSelection ClearSelection]
[#LoadLabel LoadLabel]
[#SaveLabel SaveLabel]
[#SetCursorToCenterOfSelection SetCursorToCenterOfSelection]
[#SetFloodSelectParams SetFloodSelectParams]
=== Surface ===
[#AverageSurfaceVertexPositions AverageSurfaceVertexPositions]
[#GotoMainVertex GotoMainVertex]
[#GotoOriginalVertex GotoOriginalVertex]
[#GotoPialVertex GotoPialVertex]
[#LoadMainSurface LoadMainSurface]
[#LoadOriginalSurface LoadOriginalSurface]
[#LoadPialSurface LoadPialSurface]
[#LoadSurfaceAnnoation LoadSurfaceAnnoation]
[#SetSurfaceDistanceAtCursor SetSurfaceDistanceAtCursor]
[#SetSurfaceLineColor SetSurfaceLineColor]
[#SetSurfaceLineWidth SetSurfaceLineWidth]
[#ShowNearestInterpolatedMainVertex ShowNearestInterpolatedMainVertex]
[#ShowNearestInterpolatedOriginalVertex ShowNearestInterpolatedOriginalVertex]
[#ShowNearestInterpolatedPialVertex ShowNearestInterpolatedPialVertex]
[#ShowNearestMainVertex ShowNearestMainVertex]
[#ShowNearestOriginalVertex ShowNearestOriginalVertex]
[#ShowNearestPialVertex ShowNearestPialVertex]
[#UnloadAllSurfaces UnloadAllSurfaces]
[#UnloadSurface UnloadSurface]
[#WriteSurfaceValues WriteSurfaceValues]
=== Segmentation ===
[#ExportChangedSegmentationVolume ExportChangedSegmentationVolume]
[#GetSubjectDir GetSubjectDir]
[#GetSubjectName GetSubjectName]
[#ImportSurfaceAnnotationToSegmentation ImportSurfaceAnnotationToSegmentation]
[#LoadSegmentationVolume LoadSegmentationVolume]
[#NewSegmentationVolume NewSegmentationVolume]
[#ReadVoxelLabels ReadVoxelLabels]
[#RecomputeSegmentation RecomputeSegmentation]
[#RestorePreviousSegmentation RestorePreviousSegmentation]
[#SaveSegmentationVolume SaveSegmentationVolume]
[#SetSegmentationAlpha SetSegmentationAlpha]
[#UndoLastEdit UndoLastEdit]
=== Viewing ===
[#ReadCursor ReadCursor]
[#RedrawAll RedrawAll]
[#RedrawScreen RedrawScreen]
[#SendCursor SendCursor]
[#SetCursor SetCursor]
[#SetCursorColor SetCursorColor]
[#SetCursorShape SetCursorShape]
[#SetDTIAlpha SetDTIAlpha]
[#SetDisplayConfig SetDisplayConfig]
[#SetDisplayFlag SetDisplayFlag]
[#SetFuncOverlayAlpha SetFuncOverlayAlpha]
[#SetLinkedCursorFlag SetLinkedCursorFlag]
[#SetOrientation SetOrientation]
[#SetSegmentationAlpha SetSegmentationAlpha]
[#SetSlice SetSlice]
[#SetSurfaceLineColor SetSurfaceLineColor]
[#SetSurfaceLineWidth SetSurfaceLineWidth]
[#SetVolumeBrightnessContrast SetVolumeBrightnessContrast]
[#SetVolumeColorScale SetVolumeColorScale]
[#SetVolumeMinMax SetVolumeMinMax]
[#SetVolumeResampleMethod SetVolumeResampleMethod]
[#SetVolumeSampleType SetVolumeSampleType]
[#SetZoomCenter SetZoomCenter]
[#SetZoomLevel SetZoomLevel]
[#ShowNearestInterpolatedMainVertex ShowNearestInterpolatedMainVertex]
[#ShowNearestInterpolatedOriginalVertex ShowNearestInterpolatedOriginalVertex]
[#ShowNearestInterpolatedPialVertex ShowNearestInterpolatedPialVertex]
[#ShowNearestMainVertex ShowNearestMainVertex]
[#ShowNearestOriginalVertex ShowNearestOriginalVertex]
[#ShowNearestPialVertex ShowNearestPialVertex]
[#TimeCourse_SetDisplayFlag TimeCourse_SetDisplayFlag]

Up to TkMeditGuide

Back to [:../TkMeditScripting: TkMeditScripting]

Continue to [:../TkMeditSampleScreenshotScript: TkMeditSampleScreenshotScript]

Scripting

TableOfContents

This section assumes you are familiar with Tcl and how to write basic scripts.

Most of TkMedit's functions have Tcl bindings. As you have probably noticed, the interface is just a Tk/Tix window. You can look at the interface script, TkMedit.tcl, to see how most of the functionality is used. Following is a list of Tcl commands defined by TkMedit. You can use these commands in your own scripts and call them with the -tcl command line option to execute them on startup. TkMedit can run in a kind of batch mode in this fashion, altho it still requires X and has to be able to open its main window.

You can also enter these script commands from the shell that TkMedit was launched in. You can use the Tcl source command to load a script file from the Tcl shell as well.

This list is provided for reference. If you can figure out something that works, great, but it is not officially a feature of TkMedit.

Commands

Functions arguments are listed by their name followed by their arguments. Arguments in square brackets are optional.

Anchor(AverageSurfaceVertexPositions) AverageSurfaceVertexPositions numberOfAverages

  • Averages the vertex positions of the Main surface numberOfAverages times.

Anchor(ClearSelection) ClearSelection

  • Clears the current voxel selection.

Anchor(ClearUndoVolume) ClearUndoVolume

  • Clears the undoable voxels.

Anchor(DebugPring) DebugPrint string

  • Prints string to debugging output (either the xdebug_TkMedit.txt file or the screen).

Anchor(ExportChangedSegmentationVolume) ExportChangedSegmentationVolume volume [destinationDirectory]

  • Saves the segmentation volume in its original location (overwriting the original), or a new location if destinationDirectory is specified. volume should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

Anchor(FlipVolume) FlipVolume xAxis yAxis zAxis

  • Flips the Main anatomical volume over an axis. Specify 0 or 1 for xAxis, yAxis, and zAxis to not flip or flip, respectively, on that axis. Axes are in anatomical index coordinate space.

Anchor(GetSubjectDir) GetSubjectDir volume

  • Returns the subject directory path. volume should be 0 for the Main volume, and 1 for the Aux volume.

Anchor(GetSubjectName) GetSubjectName volume

  • Returns the subject name. volume should be 0 for the Main volume, and 1 for the Aux volume.

Anchor(GotoMainVertex) GotoMainVertex vertexNumber

  • Sets the cursor to the location of the numbered vertex in the Main surface. vertexNumber should be between 0 and the number of vertices in the surface.

Anchor(GotoOriginalVertex) GotoOriginalVertex vertexNumber

  • Sets the cursor to the location of the numbered vertex in the Original surface. vertexNumber should be between 0 and the number of vertices in the surface.

Anchor(GotoPialVertex) GotoPialVertex vertexNumber

  • Sets the cursor to the location of the numbered vertex in the Pial surface. vertexNumber should be between 0 and the number of vertices in the surface.

Anchor(GraphSelectedRegion) GraphSelectedRegion

  • Graphs the average timecourse for the selected voxels.

Anchor(ImportSurfaceAnnotationToSegmentation) ImportSurfaceAnnotationToSegmentation surface annotationFileName colorTableFileName

  • Loads annotationFileName into a surface, creates a new segmentation volume, and goes through the surface, mapping a vertex location to a voxel in the segmentation volume. For each, it looks up a label value from the RGB color stored in the annotation value using colorTableFileName and sets the segmentation value to the label value. surface should be 0 for the Main surface, and 1 for the Aux surface.

Anchor(LoadAuxVolume) LoadAuxVolume volumeFileName

Loads volumeFileName as the Aux volume.

Anchor(LoadDTIVolumes) LoadDTIVolumes vectorVolumeFileName intensityVolumeFileName redAxis greenAxis blueAxis

  • Loads a DTI volume using vectorVolumeFileName as the volume containing the vectors, and intensityVolumeFileName as the volume containing the scaling factor. The former should be a three frame volume and the latter should be a one frame volume. The redAxis, greenAxis, and blueAxis parameters should be x, y, or z, indicating which value in the vector volume corresponds to which color.

Anchor(LoadFunctionalOverlay) LoadFunctionalOverlay volumeFileName registrationType [registrationFileName]

  • Loads a functional overlay volume from volumeFileName. You must also specify a registrationType, which should be 0 to find a registration file in the same directory as the data, 1 to use an identity registration, and 2 to specify a file. If 2 is the registrationType, use registrationFileName to specify the file. The overlay will be displayed in the graphics widnow.

Anchor(LoadFunctionalTimeCourse) LoadFunctionalTimeCourse volumeFileName registrationType [registrationFileName]

  • Loads a functional time course volume from volumeFileName. You must also specify a registrationType, which should be 0 to find a registration file in the same directory as the data, 1 to use an identity registration, and 2 to specify a file. If 2 is the registrationType, use registrationFileName to specify the file. The time course graph will be displayed in a separate window.

Anchor(LoadGCA) LoadGCA volumeFileName transformFileName

  • Loads a GCA volume from volumeFileName using the transform in transformFileName.

Anchor(LoadGCARenormalization) LoadGCARenormalization renormalizationVolumeFileName

  • Loads a GCA renormalization volume from renormalizationVolumeFileName.

Anchor(LoadHeadPts) LoadHeadPts headPointsFileName transformFileName

Loads a head points array from headPointsFileName using the transform in transformFileName.

Anchor(LoadLabel) LoadLabel labelFileName

  • Loads a label file from labelFileName. This will add the voxels in the label file to the selection.

Anchor(LoadMainSurface) LoadMainSurface surface surfaceFileName

  • Loads a surface file from surfaceFileName. surface should be 0 for the Main surface, and 1 for the Aux surface. Note that this loads the main surface object, and will unload the Original or Pial surface configurations if they exist.

Anchor(LoadOriginalSurface) LoadOriginalSurface surface surfaceFileName

  • Loads the Original vertex configuration from surfaceFileName into an existing surface. surface should be 0 for the Main surface, and 1 for the Aux surface. Note that the Main surface (that is, the Main Main or Aux Main) must already be loaded; this just loads in an alternate vertex configuration.

Anchor(LoadPialSurface) LoadPialSurface surface surfaceFileName

  • Loads the Pial vertex configuration from surfaceFileName into an existing surface. surface should be 0 for the Main surface, and 1 for the Aux surface. Note that the Main surface (that is, the Main Main or Aux Main) must already be loaded; this just loads in an alternate vertex configuration.

Anchor(LoadSegmentationVolume) LoadSegmentationVolume volume volumeFileName colorTableFileName

  • Loads a segmentation volume from volumeFileName using the color table in colorTableFileName. volume should be 0 for the Main volume, and 1 for the Aux volume.

Anchor(LoadSurfaceAnnotation) LoadSurfaceAnnotation surface annotationFileName

  • Loads a surface annotation file from annotationFileName into a surface. surface should be 0 for the Main surface, and 1 for the Aux surface. This will color the vertices and edges of the surface display using the RGB annotation values.

Anchor(LoadVolumeDisplayTransform) LoadVolumeDisplayTransform volume transformFileName

  • Loads a display transform from transformFileName for an anatomical volume. volume should be 0 for the Main volume, and 1 for the Aux volume.

Anchor(LoadVolume) LoadVolume volumeFileName

  • Loads volumeFileName as the Main volume.

Anchor(NewControlPoint) NewControlPoint

  • Creates a new control point where the cursor is.

Anchor(NewSegmentationVolume) NewSegmentationVolume volume fromAnatomicalVolume colorTableFileName

  • Creates a new segmentation volume based on one of the anatomical volumes using the color table in colorTableFileName. volume should be 0 for the Main segmentation volume, and 1 for the Aux segmentation volume, and fromAnatomicalVolume should be 0 for the Main anatomical volume, and 1 for the Aux anatomical volume.

Anchor(Overlay_RestoreRegistration) Overlay_RestoreRegistration

  • Restores the functional overlay registration to the last saved value.

Anchor(Overlay_SaveRegistration) Overlay_SaveRegistration

  • Saves the current overlay registration. Overwrites previous file.

Anchor(Overlay_SetCondition) Overlay_SetCondition condition

  • Sets the functional overlay's current condition. condition must be with in the valid range of conditions.

Anchor(Overlay) Overlay_SetDisplayFlag flag value

  • Sets a display flag for the functional overlay in the current display pane. value should be 0 or 1. flag should be one of the following, corresponding to an item in the View, Configure Overlay... dialog box:

    0

    Truncate Negative Values

    1

    Truncate Positive Values

    2

    Reverse Phase

    3

    Offset Values

    4

    Ignore Threshold

    5

    Grayscale Overlay

    6

    Opaque Overlay

Anchor(Overlay_SetRegistrationToIdentity) Overlay_SetRegistrationToIdentity

  • Sets the functional overlay registration to the identity matrix.

Anchor(Overlay_SetThreshold) Overlay_SetThreshold min mid slope

  • Sets the functional overlay threshold. min and mid should be valid functional values, and slope should a positive floating point number.

Anchor(Overlay_SetTimePoint) Overlay_SetTimePoint timePoint

  • Sets the functional overlay's current time point. timePoint must be with in the valid range of time points

Anchor(Overlay_SetVolumeSampleType) Overlay_SetVolumeSampleType sampleType

  • Sets the functional overlay sampling method. sampleType should be 0 for nearest neighbor sampling and 1 for trilinear sampling.

Anchor(QuitMedit) QuitMedit

  • Quits the program.

Anchor(ReadCursor)

  • ReadCursor

    Reads a location from the edit.dat file and sets the cursor to that location.

Anchor(ReadVoxelLabels) ReadVoxelLabels voxelLabelVolume1FileName voxelLabelVolume2FileName

  • Reads VLI volumes from voxelLabelVolume1FileName and voxelLabelVolume2FileName.

Anchor(RecomputeSegmentation) RecomputeSegmentation volume

  • Recomputes the Main or Aux segmentation volume based on the Main anatomical volume, the GCA volume, and the specified segmentation volume and its changed values. volume should be 0 for the Main volume, and 1 for the Aux volume.

Anchor(RedrawAll) RedrawAll

  • This schedules a redraw of the graphics window which will happen at the next update. It is best suited when a redraw does not need to happen until a series of script commands is finished.

Anchor(RedrawScreen) RedrawScreen

  • This forces an immediate redraw of the graphics window. This should be used when a script takes multiple screen captures in the middle of a loop.

Anchor(RestoreHeadPts) RestoreHeadPts

  • Restores the head points transformation to the original matrix.

Anchor(RestorePreviousSegmentation) RestorePreviousSegmentation volume

  • Restores a segmentation volume to the state it was in before it was recomputed. volume should be 0 for the Main volume, and 1 for the Aux volume.

Anchor(RestoreVolumeFromSnapshot) RestoreVolumeFromSnapshot

  • Restores the Main volume to the state it was in when the snapshot was taken.

Anchor(RotateHeadPts) RotateHeadPts degrees axis

  • Rotates the head points orientation by degrees degrees over the x, y, or z axis. degrees can be a floating point number and axis should be x, y, or z.

Anchor(RotateOverlayRegistration) RotateOverlayRegistration degrees axis

  • Rotates the functional overlay registration by degrees degrees over the x, y, or z axis. degrees can be a floating point number and axis should be x, y, or z.

Anchor(RotateVolume) RotateVolume axis degrees

  • Rotates the Main anatomical volume over the x, y, or z axis by degrees degrees. degrees can be a floating point number and axis should be x, y, or z.

Anchor(SaveGCA) SaveGCA volumeFileName

  • Saves the GCA volume as volumeFileName.

Anchor(SaveLabel) SaveLabel labelFileName

  • Saves the current selection as a label file in labelFileName.

Anchor(SaveTIFF) SaveTIFF imageFileName

  • Takes a screen shot of the graphics window and saves it as an TIFF file in imageFileName.

Anchor(SaveSegmentationVolume) SaveSegmentationVolume volume [destinationDirectory]

  • Saves the specified segmentation volume in its original location (overwriting the old file), or in a new location if destinationDirectory is specified. volume should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

Anchor(SaveVolume) SaveVolume volume

  • Saves the anatomical volume in its original location, overwriting the old file. volume should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

Anchor(SaveVolumeAs) SaveVolumeAs volume destinationDirectory

  • Saves the anatomical volume in destinationDirectory. volume should be 0 for the Main volume, and 1 for the Aux volume. The volume will be saved in COR format.

Anchor(ScaleOverlayRegistration) ScaleOverlayRegistration distance axis

  • Scales the functional overlay registration by distance over the x, y, or z axis. distance can be a floating point number and axis should be x, y, or z.

Anchor(SelectVoxelsByFuncValuecompareType) SelectVoxelsByFuncValue compareType

  • Adds to the selection all contiguous voxels whose functional value pass the comparison with the value under the cursor. compareType should be one of the following:

    0

    Greater than or equal to, or less than or equal to: If the value is positive, this will select all voxels whose value are greater than or equal to the value, and if negative, less than or equal to.

    1

    Equal to: Values must be equal

    2

    Greater than or equal to threshold minimum: This will select all voxels whose values are above the threshold minimum

Anchor(SendCursor) SendCursor

  • Writes the location of the cursor to the edit.dat file, to be shared with tksurfer.

Anchor(SetBrushInfo) SetBrushInfo brush low high new

  • Sets information about the anatomical Edit Voxel Tool shape. brush should be 2 or 3, for the brush associated with button 2 or 3. low, high, and new should be within the range of voxel values, and set the threshold and new values for the brush.

Anchor(SetBrushInfoToDefaults) SetBrushInfoToDefaults

  • Restores the brush info (see above) to the default values.

Anchor(SetBrushShape) SetBrushShape radius shape 3D

  • Sets the brush shape, which affects both edit tools and the Select Voxels tool. radius should be an integer greater than 0. shape should be 0 for circle, and 1 for square. 3D should be 0 for in-plane edits only, and 1 for three dimensional editing.

Anchor(SetBrushTarget) SetBrushTarget target

  • Sets the brush Edit Voxel Tool target. target should be 0 for the Main volume, and 1 for the Main and Aux volume.

Anchor(SetCursor) SetCursor coordinateSpace x y z

  • Sets the cursor in the volume and moves the current slice to display it. coordinateSpace should be 0 for volume index space, 1 for RAS world space, and 2 for Talairach space. x, y, and z can be floating point numbers.

Anchor(SetCursorColor) SetCursorColor r g b

  • Sets the display color for the cursor. r, g, and b should be floating point values from 0 to 1.

Anchor(SetCursorShape) SetCursorShape shape

  • Sets the display shape for the cursor. shape should be 0 for crosshair and 1 for diamond.

Anchor(SetCursorToCenterOfSelection) SetCursorToCenterOfSelection

  • Sets the cursor location to the center of the current selection, changing the view appropriately.

Anchor(SetDTIAlpha) SetDTIAlpha alpha

  • Sets the opacity alpha for the DTI overlay. alpha should be a floating point number between 0 and 1.

Anchor(SetDisplayConfig) SetDisplayConfig numberOfColumns numberOfRows linkPolicy

  • Sets the number of rows and columns of display panes in the graphics window. Calling this function will configure the panes in default orientations and slice numbers. numberOfCols and numberOfRows should be between 1 and 4. linkPolicy should be one of the following:

    0

    None: Normal link policy; cursor actions in other panes don't affect each other.

    1

    Cursor: Changing the cursor in one pane will set the cursor in other panes. Zoom levels are linked. Orientation changes are linked. When the display is set to this configuration, all panes are set to different orientations around the cursor.

    2

    Slice: Changing the slice number in one view will change all other views by the same amount. Cursor changes are not linked. Zoom levels are linked. Orientation changes are linked. When the display is first set to this configuration, all panes are set to the same orientation but to different slices.

Anchor(SetDisplayFlag) SetDisplayFlag flag value

  • Sets a display flag for the current display pane. value should be 0 or 1. flag should be one of the following, corresponding to an item in the View menu:

    1

    Aux Volume

    2

    Anatomical Volume

    3

    Cursor

    4

    Main Surface

    5

    Original Surface

    6

    Pial Surface

    7

    Interpolate Surface Vertices

    8

    Surface Vertices

    9

    Control Points

    10

    Selection

    11

    Functional Overlay

    12

    Functional Color Scale Bar

    13

    Mask to Functional Overlay

    14

    Histogram Percent Change

    15

    Segmentation Volume Overlay

    16

    Aux Segmentation Volume

    17

    Segmentation Label Volume Count

    18

    DTI Overlay

    20

    Focus Frame

    21

    Undoable Voxels

    22

    Axes

    23

    Maximum Intensity Porjection

    24

    Head Points

    25

    Verbose GCA Dump

Anchor(SetFloodSelectParams) SetFloodSelectParams 3D sourceVolume fuzziness distance

  • Sets the parameters for the flood select part of the Select Voxels tool. 3D should be 0 or 1. sourceVolume should be 0 for the Main anatomical volume, 1 for the Aux anatomical volume, 2 for the Main segmentation volume, and 3 for the Aux segmentation volume. fuzziness and distance should be floating point numbers.

Anchor(SetFuncOverlayAlpha) SetFuncOverlayAlpha alpha

  • Sets the opacity alpha for the functional overlay. alpha should be a floating point number between 0 and 1.

Anchor(SetGCADisplayStatus) SetGCADisplayStatus displayIntermediateResults

  • Sets the display status for GCA operations. displayIntermediateResults should be 0 or 1.

Anchor(SetLinkedCursorFlag) SetLinkedCursorFlag linked

  • Sets cursor linking on or off. linked should be 0 or 1.

Anchor(SetOrientation) SetOrientation orientation

  • Sets the orientation of the current display pane. orientation should be 0 for coronal, 1 for horizontal, or 2 for sagittal.

Anchor(SetSegBrushInfo) SetSegBrushInfo newValue 3D sourceVolume fuzziness distance

  • Sets the parameters for the Edit Segmentation tool, both brush and fill parameters. newValue should be a valid index in the currently loaded color table. 3D should be 0 or 1. sourceVolume should be 0 for the Main anatomical volume, 1 for the Aux anatomical volume, 2 for the Main segmentation volume, and 3 for the Aux segmentation volume. fuzziness and distance should be floating point numbers.

Anchor(SetSegmentationAlpha) SetSegmentationAlpha alpha

  • Sets the opacity alpha for the segmentation overlay. alpha should be a floating point number between 0 and 1.

Anchor(SetSelectedHeadPointLabel) SetSelectedHeadPointLabel label

  • Sets the label for the currently selected head point. label should be a string.

Anchor(SetSlice) SetSlice sliceNumber

  • Sets the slice number in the currently selected display pane for the anatomical volume. Note that this may trigger updates in other panes due to cursor linking. sliceNumber should be within the valid range of volume index coordinates.

Anchor(SetSurfaceDistanceAtCursor) SetSurfaceDistanceAtCursor

  • Copies the current surface distance value into the Main surface vertex nearest the cursor.

Anchor(SetSurfaceLineColor) SetSurfaceLineColor surface set r g b

  • Sets the surface line color. surface should be 0 for the Main surface, and 1 for the Aux surface. set should be 0 for Main, 1 for Original, and 2 for Pial. r, g, and b should be floating numbers from 0 to 1.

Anchor(SetSurfaceLineWidth) SetSurfaceLineWidth surface set width

  • Sets the surface line width. surface should be 0 for the Main surface, and 1 for the Aux surface. set should be 0 for Main, 1 for Original, and 2 for Pial. width should be an integer.

Anchor(SetTool) SetTool tool

  • Sets the currently active tool. tool should be 0 for Navigate, 1 for Select Voxels, 2 for Edit Voxels, 3 for Edit Segmentation, or 4 for Edit Control Points.

Anchor(SetVolumeBrightnessContrast) SetVolumeBrightnessContrast volume brightness contrast

  • Sets the brightness and contrast values for a volume. volume should be 0 for the Main volume, and 1 for the Aux volume. brightness should be a floating point number from 0 to 1 (0 is brighter than 1) and contrast should be a floating point number from 0 to 30.

Anchor(SetVolumeColorScale) SetVolumeColorScale volume brightness contrast min max

  • Sets the color (grayscale, really) scale for a volume. volume should be 0 for the Main volume, and 1 for the Aux volume. brightness should be a floating point number from 0 to 1 (0 is brighter than 1) and contrast should be a floating point number from 0 to 30. min and max define the values for black and white and should be valid numbers in the voxel value range.

Anchor(SetVolumeMinMax) SetVolumeMinMax volume min max

  • Sets the color (grayscale, really) scale for a volume. volume should be 0 for the Main volume, and 1 for the Aux volume. min and max define the values for black and white and should be valid numbers in the voxel value range.

Anchor(SetVolumeResampleMethod) SetVolumeResampleMethod volume method

  • Sets the resampling method for an anatomical volume. volume should be 0 for the Main volume, and 1 for the Aux volume. method should be 0 for RAS and 1 for slice.

Anchor(SetVolumeSampleType) SetVolumeSampleType volume sampleType

  • Sets the sampling method for an anatomical volume. volume should be 0 for the Main volume, and 1 for the Aux volume. sampleType should be 0 for nearest neighbor, 1 for trilinear, and 2 for sinc.

Anchor(SetZoomCenter) SetZoomCenter x y z

  • Sets the zoom center of the current display pane, changing the visible area without setting the cursor. x, y, and z should be integers in the anatomical index space.

Anchor(SetZoomLevel) SetZoomLevel level

  • Sets the zoom level of the current display pane. level should be an integer from 1 to 128.

Anchor(ShowNearestInterpolatedMainVertex) ShowNearestInterpolatedMainVertex

  • Sets the cursor to the point of the nearest interpolated vertex on the Main surface configuration.

Anchor(ShowNearestInterpolatedOriginalVertex) ShowNearestInterpolatedOriginalVertex

  • Sets the cursor to the point of the nearest interpolated vertex on the Original surface configuration.

Anchor(ShowNearestInterpolatedPialVertex) ShowNearestInterpolatedPialVertex

  • Sets the cursor to the point of the nearest interpolated vertex on the Pial surface configuration.

Anchor(ShowNearestMainVertex) ShowNearestMainVertex

  • Sets the cursor to the point of the vertex on the Main surface configuration.

Anchor(ShowNearestOriginalVertex) ShowNearestOriginalVertex

  • Sets the cursor to the point of the vertex on the Original surface configuration.

Anchor(ShowNearestPialVertex) ShowNearestPialVertex

  • Sets the cursor to the point of the vertex on the Pial surface configuration.

Anchor(SmartCutAtCursor) SmartCutAtCursor

  • Performs a smart cut operation at the current cursor location.

Anchor(SmoothFunctionalOverlay) SmoothFunctionalOverlay sigma

  • Smooths the functional overlay volume with given sigma. sigma should be a floating point number.

Anchor(SnapshotVolume) SnapshotVolume

  • Saves the state of the Main anatomical volume so it can be restored later.

Anchor(ThresholdVolume) ThresholdVolume thresholdValue direction newValue

  • Performs a thresholding operation on the Main anatomical volume. thresholdValue is the value above or below which all values will be set to newValue, and both must be valid anatomical values. direction should be 0 for below, or 1 for above.

Anchor(TimeCourse_PrintSelection) TimeCourse_PrintSelectionRangeToFile fileName

  • Prints information about the averaged time course values over all time points for the selected voxels to a text file fileName.

Anchor(TimeCourse_SetDisplayFlag) TimeCourse_SetDisplayFlag flag value

  • Sets a display flag for the functional time course. value should be 0 or 1. flag should be one of the following, corresponding to an item in the View, Configure Time Course... dialog box:

    7

    Open Graph Window

    8

    Offset Values

    9

    Show Prestim Offset

Anchor(TimeCourse_SetNumPreStimPoints) TimeCourse_SetNumPreStimPoints numPoints

  • Sets the number of pre-stim time points in the time course volume to numPoints.

Anchor(TimeCourse_SetTimeResolution) TimeCourse_SetTimeResolution resolution

  • Sets the time resolution of the time course volume to resolution.

Anchor(TranslateHeadPts) TranslateHeadPts distance axis

  • Translates the head points orientation by distance units over the x, y, or z axis. axis can be x, y, or z.

Anchor(UndoLastEdit) UndoLastEdit

  • Performs and undo.

Anchor(UnloadAllSurfaces) UnloadAllSurfaces

  • Unloads the Main and Aux surface.

Anchor(UnloadGCA) UnloadGCA

  • Unloads the GCA volume.

Anchor(UnloadSurface) UnloadSurface surface

  • Unloads a surface. surface should be 0 for the Main surface, or 1 for the Aux surface.

Anchor(UnloadVolume) UnloadVolume volume

  • Unloads an anatomical volume. volume should be 0 for the Main volume, or 1 for the Aux volume.

Anchor(UnloadVolumeDisplayTransform) UnloadVolumeDisplayTransform volume

  • Unloads an anatomical volume display transform. volume should be 0 for the Main volume's transform, or 1 for the Aux volume's transform.

Anchor(WriteControlPointFile) WriteControlPointFile

  • Writes the control points to the control.dat file. This is done automatically when adding a new point, but not when removing a point.

Anchor(WriteHeadPointsFile) WriteHeadPointsFile

  • Writes the head points file. This overwrites the previous file.

Anchor(WriteHeadPointsTransform) WriteHeadPointsTransform

  • Writes the head points transform file. This overwrites the previous file.

Anchor(WriteSurfaceValues) WriteSurfaceValues surface valueFileName

  • Writes the a surface's vertex values to a value file valueFileName. surface should be 0 for the Main surface, or 1 for the Aux surface.

Index

[#AverageSurfaceVertexPositions AverageSurfaceVertexPositions]

Anatomical

[#FlipVolume FlipVolume] [#LoadAuxVolume LoadAuxVolume] [#LoadVolume LoadVolume] [#LoadVolumeDisplayTransform LoadVolumeDisplayTransform] [#RestoreVolumeFromSnapshot RestoreVolumeFromSnapshot] [#RotateVolume RotateVolume] [#SaveVolume SaveVolume] [#SaveVolumeAs SaveVolumeAs] [#SetVolumeBrightnessContrast SetVolumeBrightnessContrast] [#SetVolumeColorScale SetVolumeColorScale] [#SetVolumeMinMax SetVolumeMinMax] [#SetVolumeResampleMethod SetVolumeResampleMethod] [#SetVolumeSampleType SetVolumeSampleType] [#SmartCutAtCursor SmartCutAtCursor] [#SnapshotVolume SnapshotVolume] [#ThresholdVolume ThresholdVolume] [#UndoLastEdit UndoLastEdit] [#UnloadVolume UnloadVolume] [#UnloadVolumeDisplayTransform UnloadVolumeDisplayTransform]

DTI

[#LoadDTIVolumes LoadDTIVolumes] [#SetDTIAlpha SetDTIAlpha] [#Editing Editing] [#ClearUndoVolume ClearUndoVolume] [#FlipVolume FlipVolume] [#RestoreVolumeFromSnapshot RestoreVolumeFromSnapshot] [#RotateVolume RotateVolume] [#SetBrushInfo SetBrushInfo] [#SetBrushInfoToDefaults SetBrushInfoToDefaults] [#SetBrushShape SetBrushShape] [#SetBrushTarget SetBrushTarget] [#SetSegBrushInfo SetSegBrushInfo] [#SetTool SetTool] [#SmartCutAtCursor SmartCutAtCursor] [#SnapshotVolume SnapshotVolume] [#ThresholdVolume ThresholdVolume] [#UndoLastEdit UndoLastEdit]

Functional

[#GraphSelectedRegion GraphSelectedRegion] [#LoadFunctionalOverlay LoadFunctionalOverlay] [#LoadFunctionalTimeCourse LoadFunctionalTimeCourse] [#Overlay_RestoreRegistration Overlay_RestoreRegistration] [#Overlay_SaveRegistration Overlay_SaveRegistration] [#Overlay_SetCondition Overlay_SetCondition] [#Overlay_SetDisplayFlag Overlay_SetDisplayFlag] [#Overlay_SetRegistrationToIdentity Overlay_SetRegistrationToIdentity] [#Overlay_SetThreshold Overlay_SetThreshold] [#Overlay_SetTimePoint Overlay_SetTimePoint] [#Overlay_SetVolumeSampleType Overlay_SetVolumeSampleType] [#RotateOverlayRegistration RotateOverlayRegistration] [#ScaleOverlayRegisgtration ScaleOverlayRegisgtration] [#SelectVoxelsByFuncValue SelectVoxelsByFuncValue] [#SetFuncOverlayAlpha SetFuncOverlayAlpha] [#SmoothFunctionalOverlay SmoothFunctionalOverlay] [#TimeCourse_PrintSelectionRangeToFile TimeCourse_PrintSelectionRangeToFile] [#TimeCourse_SetDisplayFlag TimeCourse_SetDisplayFlag] [#TimeCourse_SetNumPreStimPoints TimeCourse_SetNumPreStimPoints] [#TimeCourse_SetTimeResolution TimeCourse_SetTimeResolution]

Control Points

[#NewControlPoint NewControlPoint] [#WriteControlPointFile WriteControlPointFile]

GCA

[#LoadGCA LoadGCA] [#LoadGCARenormalization LoadGCARenormalization] [#SaveGCA SaveGCA] [#SetGCADisplayStatus SetGCADisplayStatus] [#UnloadGCA UnloadGCA]

Head Points

[#LoadHeadPts LoadHeadPts] [#RestoreHeadPts RestoreHeadPts] [#RotateHeadPts RotateHeadPts] [#SetSelectedHeadPointLabel SetSelectedHeadPointLabel] [#TranslateHeadPts TranslateHeadPts] [#TranslateOverlayRegisgtration TranslateOverlayRegisgtration] [#WriteHeadPointsFile WriteHeadPointsFile] [#WriteHeadPointsTransform WriteHeadPointsTransform]

I/O

[#LoadAuxVolume LoadAuxVolume] [#LoadDTIVolumes LoadDTIVolumes] [#LoadFunctionalOverlay LoadFunctionalOverlay] [#LoadFunctionalTimeCourse LoadFunctionalTimeCourse] [#LoadGCA LoadGCA] [#LoadGCARenormalization LoadGCARenormalization] [#LoadHeadPts LoadHeadPts] [#LoadLabel LoadLabel] [#LoadMainSurface LoadMainSurface] [#LoadOriginalSurface LoadOriginalSurface] [#LoadPialSurface LoadPialSurface] [#LoadSegmentationVolume LoadSegmentationVolume] [#LoadSurfaceAnnoation LoadSurfaceAnnoation] [#LoadVolume LoadVolume] [#LoadVolumeDisplayTransform LoadVolumeDisplayTransform] [#ReadCursor ReadCursor] [#ReadVoxelLabels ReadVoxelLabels] [#SaveGCA SaveGCA] [#SaveLabel SaveLabel] [#SaveRGB SaveRGB] [#SaveSegmentationVolume SaveSegmentationVolume] [#SaveVolume SaveVolume] [#SaveVolumeAs SaveVolumeAs] [#UnloadAllSurfaces UnloadAllSurfaces] [#UnloadGCA UnloadGCA] [#UnloadSurface UnloadSurface] [#UnloadVolume UnloadVolume] [#UnloadVolumeDisplayTransform UnloadVolumeDisplayTransform] [#WriteControlPointFile WriteControlPointFile] [#WriteHeadPointsFile WriteHeadPointsFile] [#WriteHeadPointsTransform WriteHeadPointsTransform] [#WriteSurfaceValues WriteSurfaceValues]

Misc

[#DebugPrint DebugPrint] [#QuitMedit QuitMedit] [#SaveRGB SaveRGB] [#SetTool SetTool]

Selection

[#ClearSelection ClearSelection] [#LoadLabel LoadLabel] [#SaveLabel SaveLabel] [#SetCursorToCenterOfSelection SetCursorToCenterOfSelection] [#SetFloodSelectParams SetFloodSelectParams]

Surface

[#AverageSurfaceVertexPositions AverageSurfaceVertexPositions] [#GotoMainVertex GotoMainVertex] [#GotoOriginalVertex GotoOriginalVertex] [#GotoPialVertex GotoPialVertex] [#LoadMainSurface LoadMainSurface] [#LoadOriginalSurface LoadOriginalSurface] [#LoadPialSurface LoadPialSurface] [#LoadSurfaceAnnoation LoadSurfaceAnnoation] [#SetSurfaceDistanceAtCursor SetSurfaceDistanceAtCursor] [#SetSurfaceLineColor SetSurfaceLineColor] [#SetSurfaceLineWidth SetSurfaceLineWidth] [#ShowNearestInterpolatedMainVertex ShowNearestInterpolatedMainVertex] [#ShowNearestInterpolatedOriginalVertex ShowNearestInterpolatedOriginalVertex] [#ShowNearestInterpolatedPialVertex ShowNearestInterpolatedPialVertex] [#ShowNearestMainVertex ShowNearestMainVertex] [#ShowNearestOriginalVertex ShowNearestOriginalVertex] [#ShowNearestPialVertex ShowNearestPialVertex] [#UnloadAllSurfaces UnloadAllSurfaces] [#UnloadSurface UnloadSurface] [#WriteSurfaceValues WriteSurfaceValues]

Segmentation

[#ExportChangedSegmentationVolume ExportChangedSegmentationVolume] [#GetSubjectDir GetSubjectDir] [#GetSubjectName GetSubjectName] [#ImportSurfaceAnnotationToSegmentation ImportSurfaceAnnotationToSegmentation] [#LoadSegmentationVolume LoadSegmentationVolume] [#NewSegmentationVolume NewSegmentationVolume] [#ReadVoxelLabels ReadVoxelLabels] [#RecomputeSegmentation RecomputeSegmentation] [#RestorePreviousSegmentation RestorePreviousSegmentation] [#SaveSegmentationVolume SaveSegmentationVolume] [#SetSegmentationAlpha SetSegmentationAlpha] [#UndoLastEdit UndoLastEdit]

Viewing

[#ReadCursor ReadCursor] [#RedrawAll RedrawAll] [#RedrawScreen RedrawScreen] [#SendCursor SendCursor] [#SetCursor SetCursor] [#SetCursorColor SetCursorColor] [#SetCursorShape SetCursorShape] [#SetDTIAlpha SetDTIAlpha] [#SetDisplayConfig SetDisplayConfig] [#SetDisplayFlag SetDisplayFlag] [#SetFuncOverlayAlpha SetFuncOverlayAlpha] [#SetLinkedCursorFlag SetLinkedCursorFlag] [#SetOrientation SetOrientation] [#SetSegmentationAlpha SetSegmentationAlpha] [#SetSlice SetSlice] [#SetSurfaceLineColor SetSurfaceLineColor] [#SetSurfaceLineWidth SetSurfaceLineWidth] [#SetVolumeBrightnessContrast SetVolumeBrightnessContrast] [#SetVolumeColorScale SetVolumeColorScale] [#SetVolumeMinMax SetVolumeMinMax] [#SetVolumeResampleMethod SetVolumeResampleMethod] [#SetVolumeSampleType SetVolumeSampleType] [#SetZoomCenter SetZoomCenter] [#SetZoomLevel SetZoomLevel] [#ShowNearestInterpolatedMainVertex ShowNearestInterpolatedMainVertex] [#ShowNearestInterpolatedOriginalVertex ShowNearestInterpolatedOriginalVertex] [#ShowNearestInterpolatedPialVertex ShowNearestInterpolatedPialVertex] [#ShowNearestMainVertex ShowNearestMainVertex] [#ShowNearestOriginalVertex ShowNearestOriginalVertex] [#ShowNearestPialVertex ShowNearestPialVertex] [#TimeCourse_SetDisplayFlag TimeCourse_SetDisplayFlag]

TkMeditGuide/TkMeditReference/TkMeditScripting (last edited 2010-07-01 18:08:08 by tanha)