#NEWLINE# def test_rgb( ) : #NEWLINE# #INDENT# ( red , green , blue , alpha ) = [ np . random . randn ( * volshape ) for _ in range ( 4 ) ] #NEWLINE# rgb = dataset . VolumeRGB ( red , green , blue , subj , xfmname ) #NEWLINE# assert ( rgb . volume . shape == tuple ( ( ( [ 1 ] + list ( volshape ) ) + [ 4 ] ) ) ) #NEWLINE# assert ( rgb . volume . dtype == np . uint8 ) #NEWLINE# rgba = dataset . VolumeRGB ( red , green , blue , subj , xfmname , alpha = alpha ) #NEWLINE# assert ( rgba . volume . shape == tuple ( ( ( [ 1 ] + list ( volshape ) ) + [ 4 ] ) ) ) #NEWLINE# data = dataset . Volume . random ( subj , xfmname ) #NEWLINE# assert ( data . raw . volume . shape == tuple ( ( ( [ 1 ] + list ( volshape ) ) + [ 4 ] ) ) ) #NEWLINE# data . raw . to_json ( ) #NEWLINE# ( red , green , blue , alpha ) = [ np . random . randn ( nverts ) for _ in range ( 4 ) ] #NEWLINE# rgb = dataset . VertexRGB ( red , green , blue , subj ) #NEWLINE# assert ( rgb . vertices . shape == ( 1 , nverts , 4 ) ) #NEWLINE# assert ( rgb . vertices . dtype == np . uint8 ) #NEWLINE# rgba = dataset . VertexRGB ( red , green , blue , subj , alpha = alpha ) #NEWLINE# assert ( rgba . vertices . shape == ( 1 , nverts , 4 ) ) #NEWLINE# data = dataset . Vertex . random ( subj ) #NEWLINE# assert ( data . raw . vertices . shape == ( 1 , nverts , 4 ) ) #NEWLINE# data . raw . to_json ( )