ANTsX / ANTsRCore

Rcpp bindings for the C++ ANTs library used by the ANTsR package
9 stars 9 forks source link

Obsolete examples? #155

Open dipterix opened 1 year ago

dipterix commented 1 year ago

Describe the bug

ANTsRCore failed R CMD check:

> ### Name: antsImageWrite
> ### Title: Image Write
> ### Aliases: antsImageWrite
> 
> ### ** Examples
> 
> 
> fn <- getANTsRData( "r16" )
> fi <- antsImageRead( fn )
> antsImageWrite( fi , tempfile( fileext = ".nii.gz" ) )
> antsImageWrite( fi , tempfile( fileext = ".mha" ) )
> antsImageWrite( fi , tempfile( fileext = ".nrrd" ) )
> antsImageWrite( antsImageClone( fi, "unsigned int" ) ,
+   tempfile( fileext = ".jpg" )  )
Warning in antsImageWrite(antsImageClone(fi, "unsigned int"), tempfile(fileext = ".jpg")) :
  Writing JPG file, but pixeltype is not unsigned char/int, please runantsImageClone(image, out_pixeltype = 'int')
or
antsImageClone(image, out_pixeltype = 'unsigned char')
Error: Error: /Users/runner/work/dipterix/dipterix/ITKR.Rcheck/00_pkg_src/ITKR/src/itks/Modules/IO/JPEG/src/itkJPEGImageIO.cxx:466:
ITK ERROR: JPEGImageIO(0x7faad1de29f0): JPEG supports unsigned char only

Please see https://github.com/r-universe/dipterix/actions/runs/4256380153/jobs/7430825036#step:7:711

To Reproduce

Run R CMD check

Desktop (please complete the following information):

Maybe the examples are not updated?