Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.
COPY REGISTRATION DEFORMATIONS TO DIFFERENT SPHERE wb_command -surface-sphere-project-unproject <sphere-in> - a sphere with the desired output mesh <sphere-project-to> - a sphere that aligns with sphere-in <sphere-unproject-from> - <sphere-project-to> deformed to the desired output space <sphere-out> - output - the output sphere Background: A surface registration starts with an input sphere, and moves its vertices around on the sphere until it matches the template data. This means that the registration deformation is actually represented as the difference between two separate files - the starting sphere, and the registered sphere. Since the starting sphere of the registration may not have vertex correspondence to any other sphere (often, it is a native sphere), it can be inconvenient to manipulate or compare these deformations across subjects, etc. The purpose of this command is to be able to apply these deformations onto a new sphere of the user's choice, to make it easier to compare or manipulate them. Common uses are to concatenate two successive separate registrations (e.g. Human to Chimpanzee, and then Chimpanzee to Macaque) or inversion (for dedrifting or symmetric registration schemes). <sphere-in> must already be considered to be in alignment with one of the two ends of the registration (if your registration is Human to Chimpanzee, <sphere-in> must be in register with either Human or Chimpanzee). The 'project-to' sphere must be the side of the registration that is aligned with <sphere-in> (if your registration is Human to Chimpanzee, and <sphere-in> is aligned with Human, then 'project-to' should be the original Human sphere). The 'unproject-from' sphere must be the remaining sphere of the registration (original vs deformed/registered). The output is as if you had run the same registration with <sphere-in> as the starting sphere, in the direction of deforming the 'project-to' sphere to create the 'unproject-from' sphere. Note that this command cannot check for you what spheres are aligned with other spheres, and using the wrong spheres or in the incorrect order will not necessarily cause an error message. In some cases, it may be useful to use a new, arbitrary sphere as the input, which can be created with the -surface-create-sphere command. Example 1: You have a Human to Chimpanzee registration, and a Chimpanzee to Macaque registration, and want to combine them. If you use the Human sphere registered to Chimpanzee as sphere-in, the Chimpanzee standard sphere as project-to, and the Chimpanzee sphere registered to Macaque as unproject-from, the output will be the Human sphere in register with the Macaque. Example 2: You have a Human to Chimpanzee registration, but what you really want is the inverse, that is, the sphere as if you had run the registration from Chimpanzee to Human. If you use the Chimpanzee standard sphere as sphere-in, the Human sphere registered to Chimpanzee as project-to, and the standard Human sphere as unproject-from, the output will be the Chimpanzee sphere in register with the Human. Technical details: Each vertex of <sphere-in> is projected to a triangle of <sphere-project-to>, and its new position is determined by the position of the corresponding triangle in <sphere-unproject-from>. The output is a sphere with the topology of <sphere-in>, but coordinates shifted by the deformation from <sphere-project-to> to <sphere-unproject-from>. <sphere-project-to> and <sphere-unproject-from> must have the same topology as each other, but <sphere-in> may have any topology.