Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print help message on -h/--help or when invalid options are passed #111

Open
hanslovsky opened this issue Oct 1, 2018 · 2 comments
Open

Comments

@hanslovsky
Copy link
Contributor

It is unclear how to open a cremi data set in BigCAT from the command line without looking at the source code. In case of failure or -h/--help no help message is printed to assist with what command line arguments/parameters to use.

For example:

$ java -jar $PWD/target/bigcat-0.0.4-SNAPSHOT-jar-with-dependencies.jar -i ~/Downloads/sample_B_padded_20160501.hdf
creating default input trigger config
Opening raw from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening canvas from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Exception in thread "main" java.lang.IllegalArgumentException: dimensions[ 0 ] <= 0
        at net.imglib2.img.cell.CellImgFactory.verifyDimensions(CellImgFactory.java:116)
        at net.imglib2.img.cell.CellImgFactory.createInstance(CellImgFactory.java:205)
        at net.imglib2.img.cell.CellImgFactory.createLongInstance(CellImgFactory.java:177)
        at net.imglib2.img.cell.CellImgFactory.createLongInstance(CellImgFactory.java:62)
        at net.imglib2.type.numeric.integer.LongType.createSuitableNativeImg(LongType.java:81)
        at net.imglib2.img.cell.CellImgFactory.create(CellImgFactory.java:147)
        at bdv.bigcat.BigCat.initCanvas(BigCat.java:204)
        at bdv.bigcat.BigCat.init(BigCat.java:148)
        at bdv.bigcat.BigCat.main(BigCat.java:121)

does not help me in figuring out what parameters to use.

I guessed that I need to add use -l volumes/labels/neuron_ids:

$ java -Xmx16g -jar $PWD/target/bigcat-0.0.4-SNAPSHOT-jar-with-dependencies.jar -i ~/Downloads/sample_B_padded_20160501.hdf -l volumes/labels/neuron_ids
Opening raw from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening canvas from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening labels from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Exception in thread "main" java.lang.IllegalArgumentException: invalid range properties
        at javax.swing.DefaultBoundedRangeModel.<init>(DefaultBoundedRangeModel.java:102)
        at javax.swing.JSlider.<init>(JSlider.java:274)
        at bdv.viewer.ViewerPanel.<init>(ViewerPanel.java:302)
        at bdv.viewer.ViewerFrame.<init>(ViewerFrame.java:94)
        at bdv.BigDataViewer.<init>(BigDataViewer.java:339)
        at bdv.bigcat.ui.Util.createViewer(Util.java:225)
        at bdv.bigcat.BigCat.setupBdv(BigCat.java:309)
        at bdv.bigcat.BigCat.main(BigCat.java:122)

Some progress was made, the error looks different now, but still not there, maybe '-r volumes/raw

java -Xmx16g -jar $PWD/target/bigcat-0.0.4-SNAPSHOT-jar-with-dependencies.jar -i ~/Downloads/sample_B_padded_20160501.hdf -l volumes/labels/neuron_ids -r volumes/raw
creating default input trigger config
Opening raw from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening canvas from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening labels from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
AnnotationsHdf5Store: detected file format 0.2

This works now but a sanity check of the inputs and/or a --help/-h message would have sped up the process significantly.

@axtimwalde
Copy link
Contributor

You are right, but BigCAT is phasing out for Paintera anyways---right?

@hanslovsky
Copy link
Contributor Author

It is but as long as there are no annotations in paintera (and it is unclear to me when they will be there), BigCAT will always be useful. Whenever I try to help people, I have to figure it out again. At least, the readme should have a working exapmle with all the required parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants