Commit 1265a8ef authored by reichenbach's avatar reichenbach
Browse files

[ADD] Added additional datatypes to the list of types that can be written by the nifti writer.

parent 7be6912b
......@@ -221,11 +221,31 @@ void WMWriteNIfTI::writeToFile()
castData< unsigned char > ( data );
outField->nbyper = 1;
break;
case W_DT_INT8:
outField->datatype = DT_INT8;
castData< char > ( data );
outField->nbyper = 1;
break;
case W_DT_UINT16:
outField->datatype = DT_UINT16;
castData< uint16_t > ( data );
outField->nbyper = 2;
break;
case W_DT_INT16:
outField->datatype = DT_INT16;
castData< int16_t > ( data );
outField->nbyper = 2;
break;
case W_DT_UINT32:
outField->datatype = DT_UINT32;
castData< uint32_t > ( data );
outField->nbyper = 4;
break;
case W_DT_SIGNED_INT:
outField->datatype = DT_SIGNED_INT;
castData< int32_t > ( data );
outField->nbyper = 4;
break;
default:
WAssert( false, "Data set type not yet supported." );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment