Comments (7)
Can you provide the images you were using?
2015-06-10 17:14 GMT-04:00 BrysonBR [email protected]:
I just installed ANTsR and the problem I am having is with
abpBrainExtraction.
I enter the following commands in R in terminal:struct<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MPRAGE.nii.gz")
tem<-antsImageRead("/Users/Bryson/Data/ANTsR_test/bet.nii.gz")
temmask<-antsImageRead("/Users/Bryson/Data/ANTsR_test/bet_mask.nii.gz")bm<-abpBrainExtraction(img=struct,tem=tem,temmask=temmask)
And I get the following error:
Problem in arg list
see usage by calling antsApplyTransforms() w/o arguments
Error in thresholdImage(temmaskwarped, 0.5, 1) :
trying to get slot "dimension" from an object of a basic class ("numeric")
with no slotsSo I called antsApplyTransforms() w/o arguments, but it wasn't helpful to
me:antsApplyTransforms()
warpedimg<-antsApplyTransforms( fixed=img1 , moving=img2 ,
transformlist=list("my0GenericAffine.mat","my1Warp.nii.gz") )For full mode: use standard ants call as in antsApplyTransforms full mode
...antsApplyTransforms("-d","2","-i","r64slice.nii.gz","-o","temp.nii.gz","-r","r16slice.nii.gz","-t","./Z0GenericAffine.mat")
for full help:
use .Call( "antsApplyTransforms", .int_antsProcessArguments(
c(list("--help")) ), PACKAGE="ANTsR" );[1] 0
The "img" image is a MPRAGE from the ABIDE dataset.
The "tem" image is the bet brain extracted version of the same image(I
wasn't sure what to put here).
And the "temmask" is the brain mask output from bet.
I've run the example in the manual and it runs fine. Also, I tried running
abpBrainExtraction.R another time, and although it didn't give me good
results (probably from a bad choice of the "tem" image), it did finish
without errors. Any ideas on what I can do?—
Reply to this email directly or view it on GitHub
#54.
from antsr.
for antsApplyTransforms
, try ?antsApplyTransforms
the template should be the whole head, just like the raw T1
the mask should be the template's brain mask
this function is a fast approximation to https://github.com/stnava/ANTs/blob/master/Scripts/antsBrainExtraction.sh which has been evaluated more thoroughly
you might also try getMask
which on occasion can work well despite its simplicity ....
from antsr.
also - just updated the documentation
https://github.com/stnava/ANTsR/blob/master/man/abpBrainExtraction.Rd#L10-L12
from antsr.
Thank you both for your quick responses. The link below has all of the files that I used originally and others which will be explained below.
https://drive.google.com/open?id=0B9oWACI5TJOEfm1KdzAxSG5IdlNZR3QyOEtGa3l2ZEVETHBUQXZyNDJGUGk5YXRNT2N4blk&authuser=0
First, in response to the extended explanation of the tem and temmask variables, I decided to re-run with the following code:
struct<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MP1.nii.gz")
struct<-abpN4(struct)
tem<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MP3.nii.gz")
tem<-abpN4(tem)
temmask<-antsImageRead("/Users/Bryson/Data/ANTsR_test/bet_MP3_mask.nii.gz")bm<-abpBrainExtraction(img=struct,tem=tem,temmask=temmask)
Which resulted in the same error:
Problem in arg list
see usage by calling antsApplyTransforms() w/o arguments
Error in thresholdImage(temmaskwarped, 0.5, 1) :
trying to get slot "dimension" from an object of a basic class ("numeric") with no slots
I also tried getMask, but it did not give me a good result (also in the link).
One more question, how dependent is abpBrainExtraction on the quality of the template's brain extraction?
from antsr.
I'm getting the same issue...it looks like antsRegistration isn't actually
writing out the transforms it's supposed to. From debugging:
Browse[2]> mytx<-antsRegistration( tem, img, typeofTransform = c('SyN'),
-
Browse[2]> file.exists(mytx$invtransforms[1])
initialTransform=initafffn )
[1] FALSE
2015-06-11 11:50 GMT-04:00 BrysonBR [email protected]:
Thank you both for your quick responses. The link below has all of the
files that I used originally and others which will be explained below.First, in response to the extended explanation of the tem and temmask
variables, I decided to re-run with the following code:struct<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MP1.nii.gz")
struct<-abpN4(struct)
tem<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MP3.nii.gz")
tem<-abpN4(tem)
temmask<-antsImageRead("/Users/Bryson/Data/ANTsR_test/bet_MP3_mask.nii.gz")bm<-abpBrainExtraction(img=struct,tem=tem,temmask=temmask)
Which resulted in the same error:
Problem in arg list
see usage by calling antsApplyTransforms() w/o arguments
Error in thresholdImage(temmaskwarped, 0.5, 1) :
trying to get slot "dimension" from an object of a basic class ("numeric")
with no slotsI also tried getMask, but it did not give me a good result (also in the
link).
One more question, how dependent is abpBrainExtraction on the quality of
the template's brain extraction?—
Reply to this email directly or view it on GitHub
#54 (comment).
from antsr.
might try verbose output to get some insight
brian
On Thu, Jun 11, 2015 at 12:22 PM, bkandel [email protected] wrote:
I'm getting the same issue...it looks like antsRegistration isn't actually
writing out the transforms it's supposed to. From debugging:
Browse[2]> mytx<-antsRegistration( tem, img, typeofTransform = c('SyN'),
- initialTransform=initafffn )
Browse[2]> file.exists(mytx$invtransforms[1])
[1] FALSE2015-06-11 11:50 GMT-04:00 BrysonBR [email protected]:
Thank you both for your quick responses. The link below has all of the
files that I used originally and others which will be explained below.First, in response to the extended explanation of the tem and temmask
variables, I decided to re-run with the following code:struct<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MP1.nii.gz")
struct<-abpN4(struct)
tem<-antsImageRead("/Users/Bryson/Data/ANTsR_test/MP3.nii.gz")
tem<-abpN4(tem)temmask<-antsImageRead("/Users/Bryson/Data/ANTsR_test/bet_MP3_mask.nii.gz")
bm<-abpBrainExtraction(img=struct,tem=tem,temmask=temmask)
Which resulted in the same error:
Problem in arg list
see usage by calling antsApplyTransforms() w/o arguments
Error in thresholdImage(temmaskwarped, 0.5, 1) :
trying to get slot "dimension" from an object of a basic class
("numeric")
with no slotsI also tried getMask, but it did not give me a good result (also in the
link).
One more question, how dependent is abpBrainExtraction on the quality of
the template's brain extraction?—
Reply to this email directly or view it on GitHub
#54 (comment).—
Reply to this email directly or view it on GitHub
#54 (comment).
from antsr.
several "interesting" things going on here ...
- you are a victim of this issue which is rooted in ITK
- good news is that issue will be resolved soon thanks to @hjmjohnson finally killing this evil curse
- bad news is the fix is not yet in ....
- more good news is that i added a verbose option to
antsRegistration
in ANTsR to help us debug issues like this more easily - bad news is there was another bug in
antsRegistration
(in ANTs, not ANTsR) which this issue uncovered ... - good news is that bug is fixed ....
- finally - here is a workaround ( command line )
ImageMath 3 MP3close.nii.gz ClosestSimplifiedHeaderMatrix MP3.nii.gz
then do the work on the close version ... make a close version for each image.
from antsr.
Related Issues (20)
- Errors in buliding ANTsR vigniettes HOT 1
- AAL template extends beyond MNI cortical surface HOT 7
- installation problem antsLibs() Makevars:6: *** missing separator. Stop. HOT 5
- Error
- antsMotionCalculation Error HOT 1
- colorbar key for antsrSurf HOT 6
- Installation fail with devtools HOT 5
- details about mnib HOT 1
- Failing on ITK when running LINDA HOT 6
- Proper similarity metric for Affine registration HOT 3
- MVPA using ANTsR?
- ITK bug in createJacobianDeterminantImage after upgrade HOT 14
- aslPerfusion HOT 11
- Installation error on Mac OS 12.6.3 with devtools HOT 11
- R version issues HOT 3
- ITK_GLOBAL_NUMBER_OF_THREADS is ignored HOT 2
- How to pass command line arguments to antsRegistration? HOT 4
- Guidance on Extracting Numeric Values of Gaussian Curvature from Image Class HOT 1
- Resampling an image to source image geometry HOT 2
- Failing on antsRegistration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antsr.