stdin error in 1dplot


We are running into an issue when running the 3dTqual option, the error is as follows:

Can’t read from -stdin

Our script is:

3dTqual -range -automask rest_fmri_file | 1dplot -one -stdin -png /qualitycontrol/motion/fMRI_tqual

Running the above line was previously producing the plot.png, but an output is no longer being produced and the above error appears.

Any suggestions on how to resolve this? We’d really appreciate your help.

Thanks so much!


Hmmm, OK. I ran the following in the Bootcamp data (AFNI_data6/FT_analysis/FT directory) OK, and got the attached image:

3dTqual -range -automask FT_epi_r1+orig | 1dplot -one -stdin -png NAME

However, if I ran without the extension:

3dTqual -range -automask FT_epi_r1 | 1dplot -one -stdin -png NAME

… then I got the error you are seeing:

*** Can't open dataset FT_epi_r1
** FATAL ERROR: Can't read from stdin!

So, whether your input is NIFTI or BRIK/HEAD format, can you try putting the more complete name: NAME.nii, NAME.nii.gz, NAME+orig, NAME+orig.HEAD, etc.?


Hmmm, I get the same bad behavior. I cannot produce a png file (even with Paul’s command). Maybe that means there is some shell program that is needed that I do not have installed.

Will investigate…

  • rick

Oh, and -jpg works for me. This is specific to -png.

  • rick

Try the following command. If it returns nothing, then you do not have that pnmtopng program installed. It comes with the netpbm package.

which pnmtopng

I should add a test for one of those programs to…

  • rick

Hi Rick and Paul,

Thank you both for trying and replicating the command!

So adding the complete name (NAME.nii, NAME.nii.gz, NAME+orig, NAME+orig.HEAD) was still giving the error, and running the brew install netpbm didn’t install the package for some reason, same thing with updating the binaries.
The command:

/bin/bash -c “$(curl -fsSL”

returns: undefined variable error

Will try the -check_all next. But update, the -jpg function works and produces an output! Thank you for the suggestion, will replace -png with -jpg in the script moving forward.

Your help is much appreciated!