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

Error when converting transform formats #17

Open
mhturner opened this issue Jan 7, 2021 · 6 comments
Open

Error when converting transform formats #17

mhturner opened this issue Jan 7, 2021 · 6 comments
Assignees

Comments

@mhturner
Copy link

mhturner commented Jan 7, 2021

Hi - thanks so much for these resources! We're having an issue trying to convert a couple of .h5 transforms to the cmtk format. We tried running the examples, with the sample data, here:

https://github.com/saalfeldlab/template-building/wiki/Usage-examples#converting-transforms

but on a couple different machines (one OSX and one linux) are getting this error:

cat: /bin/gaussDs.cp: No such file or directory
Error: Could not find or load main class io.ConvertAffine
Caused by: java.lang.ClassNotFoundException: io.ConvertAffine

and a similar error for convertDfield

could you help point me in the direction of what might be missing in our installation? I'm not sure what gaussDs.cp is a part of, or where to get it.

@mhturner
Copy link
Author

mhturner commented Jan 9, 2021

For a bit more background on what we're trying to do: we'd ultimately like to transform some images from JRC2010 space to the FlyEM Hemibrain space. Because the only available hemibrain-JRC2018 transform here is in .h5 format we have tried the conversion approach above, so that we can then use cmtk to make these transforms. An alternative approach we have tried is to use your transformImage to directly transform our images using the shared .h5 transforms. However we run into a separate issue using transformImage, which also appears when we use the sample data, in particular we get out of bounds errors like
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 15360 out of bounds for length 15360
and the transformed image that is output is the right size and resolution but full of 0 values.

Either of these routes would work for our purposes. Alternatively, if you already have a .nii version of the JRC2018-FlyEMHemibrain transform that you could post to the templates page we could use cmtk to do the necessary transformations.

@bogovicj
Copy link
Collaborator

Thanks for finding and reporting these.

For the second issue:

However we run into a separate issue using transformImage, which also appears when we use the sample data, in particular we get out of bounds errors ...

You're referring to this example (or similar)

transformImage -i FCWB_small.nrrd \
    -o fcwb-to-jrc18f.nrrd \
    -f JRC2018_FEMALE_small.nrrd \
    -t JRC2018F_FCWB_small.h5 \
    -j 4

found on this page right?

@mhturner
Copy link
Author

Yes - that's right.

@bogovicj
Copy link
Collaborator

I'm going to make a new release soon, will keep you posted here.

@bogovicj
Copy link
Collaborator

Hi @mhturner ,

Unfortunately, a new release will be delayed slightly because I need to wait for a new version of a dependency.

However, you can install the latest version of the code by:

git clone https://github.com/saalfeldlab/template-building.git
cd template-building
mvn clean compile install

then running the transformImage script in jgo should work now. I hope it will also enable you to use the n5 transforms, though if it's not straightforward, I can try to provide an example

Thanks again for reporting this, and your patience.
John

@mhturner
Copy link
Author

Hi @bogovicj,
Thanks for your response and your work on this! I was able to get transformImage working well for some transforms (e.g. the JFRC2 <-> FCWB transformation) but the JFRC2010 -> JRC2018F doesn't seem to be working very well. It produces an image of the right dimensions and resolution, but the transformed image doesn't seem to align well with the JRC2018 template. I'm not totally sure what the issue is but it no longer seems to be with the transformImage script, perhaps there is an issue with that specific transform. We ended up generating our own transform from JFRC2010 -> JRC2018F that I think will work OK for our purposes, and I have used the hemibrain -> JRC2018F transformation (by way of the natverse) to do the comparisons we need. FWIW that transform (hemibrain -> JRC2018F) does look OK. Thanks again!
-Max

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