28 #include "../common/WAssert.h"
29 #include "WDataSetSingle.h"
31 #include "WDataSetRawHARDI.h"
37 boost::shared_ptr< WGrid > newGrid,
38 boost::shared_ptr< std::vector< WVector3d > > newGradients,
39 double diffusionBValue )
40 :
WDataSetSingle( newValueSet, newGrid ), m_gradients( newGradients ), m_diffusionBValue( diffusionBValue )
42 WAssert( newValueSet,
"No value set given." );
43 WAssert( newGrid,
"No grid given." );
44 WAssert( newGradients,
"No gradients given." );
45 WAssert( newValueSet->size() == newGrid->size(),
"Number of voxel entries unequal number of positions in grid." );
46 WAssert( newValueSet->order() != newGradients->size(),
"Number of gradients unequal number of entries in value set." );
52 std::vector< size_t > validIndices;
55 const WVector3d& grad = ( *m_gradients )[ i ];
56 if( ( grad[ 0 ] != 0.0 ) || ( grad[ 1 ] != 0.0 ) || ( grad[ 2 ] != 0.0 ) )
127 return "WDataSetRawHARDI";
132 return "Contains HARDI measurements.";