Hello
I am trying to use the value outputted by the plugout_drive command GET_DICOM_XYZ. I am running all of the commands in Terminal using tcsh. When I run the command:
plugout_drive -quit -comm 'QUIET_PLUGOUTS' -comm 'GET_DICOM_XYZ'
I get out a response on my Terminal, such as RAI xyz: 0.198189 -44.508759 27.268639. Unfortunately, I have not been able to pipe this output to another command or even save the output within a file. My goal is to have GET_DICOM_XYZ output the current position of the cross-hairs, parse the output into only the x, y, and z coordinates, and then save those coordinates. Normally, I would use a command like this:
set coordx = `echo plugout_drive -quit -comm 'QUIET_PLUGOUTS' -comm 'GET_DICOM_XYZ' | cut -d' ' -f3`
where the stdout from the plugout_drive should be piped to the cut command but instead the response from the plugout_drive is displayed in Terminal and nothing is piped to the cut command. I have also tried to save the output to a file using the command:
plugout_drive -quit -comm 'QUIET_PLUGOUTS' -comm 'GET_DICOM_XYZ' > test.1D
but the newly created test.1D file is empty. I have also tried the script command but the typescript file that is produced once the command is finished contains only the plugout_drive command and does not have the response. I was hoping you would know of a way where I could save the output from GET_DICOM_XYZ as a variable or within a file.
Thank you
Matthew
Edited 1 time(s). Last edit at 06/02/2015 04:50PM by rollom.