Skip to content

Obsolete examples? #155

@dipterix

Description

@dipterix

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):

  • OS: OSX

Maybe the examples are not updated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions