19 #ifndef __itkDWIReader_hxx 20 #define __itkDWIReader_hxx 23 #include "itkImageFileReader.h" 24 #include "itkImageRegionIteratorWithIndex.h" 31 template <
class TPixelType,
unsigned int VImageDimension>
35 m_NormalizeDWI =
true;
37 m_IsInput4DImage =
true;
38 m_CorrectDWIValues =
true;
39 m_ShowWarnings =
true;
41 m_MaskImage = MaskImageType::New();
42 m_B0Image = B0ImageType::New();
44 m_SamplingSchemeQSpace = SamplingSchemeQSpaceType::New();
47 template <
class TPixelType,
unsigned int VImageDimension>
52 typedef Image<TPixelType,4> DWI4DImageType;
53 typename DWI4DImageType::Pointer dwi4DTempImage;
54 itk::ReadImageInformation<DWI4DImageType>(dataStr, dwi4DTempImage);
55 typename DWI4DImageType::SizeType size = dwi4DTempImage->GetLargestPossibleRegion().GetSize();
56 int numberOfDWI = size[3];
61 typename DWIImageType::Pointer dwiTempImage;
62 itk::ReadImageInformation<DWIImageType>(dataStr, dwiTempImage);
63 numberOfDWI = dwiTempImage->GetNumberOfComponentsPerPixel();
71 template <
class TPixelType,
unsigned int VImageDimension>
80 std::vector<std::vector<std::string> > stringMatrix;
84 std::string dwiPath, dwiFile;
87 std::string dataStr, gradStr, indexStr, bStr;
88 std::vector<std::vector<std::string> > gradStrTempMatrix;
89 std::vector<int> numDWINob0, additionalB0;
90 std::vector<std::vector<double> > bVec;
91 std::vector<std::vector<std::vector<std::string> > > gradStrMatrix;
92 std::vector<std::vector<int> > b0IndexVec;
93 std::vector<std::vector<int> > selectIndexVec;
95 typedef ImageFileReader<DWIImageType> DWIReaderType;
96 typename DWIImageType::Pointer dwiTempImage;
98 typedef Image<TPixelType, 4> DWI4DImageType;
99 typedef ImageFileReader<DWI4DImageType> DWI4DReaderType;
100 typename DWI4DImageType::Pointer dwi4DTempImage;
103 double bThresholdSingleShell = m_SamplingSchemeQSpace->GetBThresholdSingleShell();
106 int numberOfDWIsWithoutB0=0;
108 std::vector<std::string> ossStr;
109 std::string dataStr0;
110 for (
int i = 0; i < stringMatrix.size(); i += 1 )
113 utlGlobalException(stringMatrix[i].size()!=3 && stringMatrix[i].size()!=4,
"wrong size of configuration file");
115 dataStr =
utl::IsFileExist(stringMatrix[i][2]) ? stringMatrix[i][2] : dwiPath+stringMatrix[i][2] ;
116 gradStr =
utl::IsFileExist(stringMatrix[i][1]) ? stringMatrix[i][1] : dwiPath+stringMatrix[i][1] ;
120 dataStr0 =
utl::IsFileExist(stringMatrix[i][2]) ? stringMatrix[i][2] : dwiPath+stringMatrix[i][2];
121 utlGlobalException( !
IsImageEmpty(m_MaskImage) && !itk::VerifyImageSize<MaskImageType>(m_MaskImage, dataStr0,
true),
"wrong size of m_MaskImage and DWI file " << stringMatrix[i][2] <<
". Inconsistent information!");
122 utlGlobalException( !
IsImageEmpty(m_B0Image) && !itk::VerifyImageSize<B0ImageType>(m_B0Image, dataStr0,
true),
"wrong size of b0Image and DWI file " << stringMatrix[i][2] <<
". Inconsistent information! m_B0Image="<<m_B0Image);
123 m_IsInput4DImage = DetermineIsInput4DImage(dataStr0);
130 if (stringMatrix[i].size()==4)
132 indexStr =
utl::IsFileExist(stringMatrix[i][3]) ? stringMatrix[i][3] : dwiPath+stringMatrix[i][3];
133 std::vector<int> tmpVec;
135 selectIndexVec.push_back(tmpVec);
139 std::vector<double> bVecTemp;
142 std::istringstream ( stringMatrix[i][0] ) >> bvalue;
144 bVecTemp.assign(gradStrTempMatrix.size(), bvalue);
148 bStr =
utl::IsFileExist(stringMatrix[i][0]) ? stringMatrix[i][0] : dwiPath+stringMatrix[i][0];
150 utlGlobalException(gradStrTempMatrix.size()!=gradStrTempMatrix.size(),
"wrong size of b values in " << bStr <<
" and gradients in " << gradStr);
152 bVec.push_back(bVecTemp);
154 std::vector<int> b0IndexTemp;
155 for (
int j = 0; j < gradStrTempMatrix.size(); j += 1 )
157 utlGlobalException(gradStrTempMatrix[j].size()!=3,
"wrong size of gradients " << gradStr);
158 if (stringMatrix[i].size()==4 && !
utl::IsInVector(selectIndexVec[i],j))
160 double gradx = utl::ConvertStringToNumber<double>(gradStrTempMatrix[j][0]);
161 double grady = utl::ConvertStringToNumber<double>(gradStrTempMatrix[j][1]);
162 double gradz = utl::ConvertStringToNumber<double>(gradStrTempMatrix[j][2]);
164 bool bIsZero =
std::abs(bVecTemp[j])<(bThresholdSingleShell>0?bThresholdSingleShell:1e-4);
167 if (gradIsZero || bIsZero)
168 b0IndexTemp.push_back(j);
170 utlGlobalException(isB0Set && b0IndexTemp.size()>0,
"Since b0 is mannually set already, the configuration file should not have b0 image");
171 gradStrMatrix.push_back(gradStrTempMatrix);
172 b0IndexVec.push_back(b0IndexTemp);
174 std::ostringstream oss;
176 oss <<
"> b="<< bvalue;
178 oss <<
"> bStr="<< bStr;
179 oss <<
", gradStrTempMatrix.size()=" << gradStrTempMatrix.size() <<
", 4D image = " << dataStr;
180 if (stringMatrix[i].size()==4)
181 oss <<
", index=" << indexStr;
183 ossStr.push_back(oss.str());
187 if (m_IsInput4DImage)
189 itk::ReadImageInformation<DWI4DImageType>(dataStr, dwi4DTempImage);
190 typename DWI4DImageType::SizeType size = dwi4DTempImage->GetLargestPossibleRegion().GetSize();
191 numberOfDWI = size[3];
195 itk::ReadImageInformation<DWIImageType>(dataStr, dwiTempImage);
196 numberOfDWI = dwiTempImage->GetNumberOfComponentsPerPixel();
199 utlGlobalException(numberOfDWI<gradStrTempMatrix.size(),
"The number of gradients in " << gradStr <<
" is "<< gradStrTempMatrix.size() <<
" more than number of DWIs in " << dataStr <<
"="<<numberOfDWI);
200 additionalB0.push_back(numberOfDWI - gradStrTempMatrix.size());
201 if (stringMatrix[i].size()==3)
203 numDWINob0.push_back(gradStrTempMatrix.size() - b0IndexTemp.size());
204 numberOfDWIsWithoutB0 += gradStrTempMatrix.size() - b0IndexTemp.size();
205 numberOfB0 += b0IndexTemp.size() + numberOfDWI - gradStrTempMatrix.size();
209 numDWINob0.push_back(selectIndexVec[i].size() - b0IndexTemp.size());
210 numberOfDWIsWithoutB0 += selectIndexVec[i].size() - b0IndexTemp.size();
211 numberOfB0 += b0IndexTemp.size() + numberOfDWI - gradStrTempMatrix.size();
216 numDWINob0[i] += numDWINob0[i-1];
220 std::cout << numberOfB0 <<
" b0 images, " << numberOfDWIsWithoutB0 <<
" DWIs without b0. "<< std::endl << std::flush;
221 if (this->GetDebug())
225 for (
int jj = 0; jj < b0IndexVec.size(); jj += 1 )
230 typename DWIImageType::Pointer dwiImage = this->GetOutput();
232 MatrixPointer orientationsCartesian = m_SamplingSchemeQSpace->GetOrientationsCartesian();
234 orientationsCartesian->ReSize(numberOfDWIsWithoutB0, 3);
235 typename B0ImageType::IndexType b0Index;
236 typename B0ImageType::PixelType b0Pixel;
238 dwiPixel.SetSize(numberOfDWIsWithoutB0);
239 dwiZeroPixel.SetSize(numberOfDWIsWithoutB0);
240 dwiZeroPixel.Fill(0.0);
242 for (
int i = 0; i < stringMatrix.size(); i += 1 )
244 if (stringMatrix.size()==1)
245 std::cout <<
"loading the " << i+1 <<
"th DWI data from total " << stringMatrix.size() <<
" DWI data" << std::endl;
246 std::cout << ossStr[i] << std::endl << std::flush;
247 dataStr =
utl::IsFileExist(stringMatrix[i][2]) ? stringMatrix[i][2] : dwiPath+stringMatrix[i][2];
251 for (
int j = 0; j < bVec[i].size(); j += 1 )
256 bVector->push_back(bVec[i][j]);
257 double gx = utl::ConvertStringToNumber<double>(gradStrMatrix[i][j][0]);
258 double gy = utl::ConvertStringToNumber<double>(gradStrMatrix[i][j][1]);
259 double gz = utl::ConvertStringToNumber<double>(gradStrMatrix[i][j][2]);
260 double gnorm = std::sqrt(gx*gx+gy*gy+gz*gz);
261 (*orientationsCartesian)(bVector->size()-1,0) = gx/gnorm;
262 (*orientationsCartesian)(bVector->size()-1,1) = gy/gnorm;
263 (*orientationsCartesian)(bVector->size()-1,2) = gz/gnorm;
270 if (m_IsInput4DImage)
272 itk::ReadImage<DWI4DImageType>(dataStr, dwi4DTempImage);
273 typename DWI4DImageType::SizeType size = dwi4DTempImage->GetLargestPossibleRegion().GetSize();
274 numberOfDWI = size[3];
278 itk::ReadImage<DWIImageType>(dataStr, dwiTempImage);
279 numberOfDWI = dwiTempImage->GetNumberOfComponentsPerPixel();
287 m_B0Image = B0ImageType::New();
288 if (m_IsInput4DImage)
289 itk::CopyImageInformation<DWI4DImageType, B0ImageType>( dwi4DTempImage, m_B0Image);
291 itk::CopyImageInformation<DWIImageType, B0ImageType>( dwiTempImage, m_B0Image);
292 m_B0Image->Allocate();
294 m_B0Image->FillBuffer(0);
297 std::cout <<
"b0=1 is used" << std::endl << std::flush;
298 m_B0Image->FillBuffer(1.0);
301 if (m_IsInput4DImage)
302 itk::CopyImageInformation<DWI4DImageType, DWIImageType>( dwi4DTempImage, dwiImage);
304 itk::CopyImageInformation<DWIImageType, DWIImageType>( dwiTempImage, dwiImage);
305 dwiImage->SetNumberOfComponentsPerPixel( numberOfDWIsWithoutB0 );
306 dwiImage->Allocate();
307 dwiImage->FillBuffer(dwiZeroPixel);
311 ImageRegionIteratorWithIndex<B0ImageType> b0It(m_B0Image, m_B0Image->GetLargestPossibleRegion());
312 ImageRegionIteratorWithIndex<DWIImageType> dwiIt(dwiImage, dwiImage->GetLargestPossibleRegion());
313 ImageRegionIteratorWithIndex<MaskImageType> maskIt;
315 maskIt = ImageRegionIteratorWithIndex<MaskImageType>(m_MaskImage, m_MaskImage->GetLargestPossibleRegion());
318 if (m_IsInput4DImage)
320 typename DWI4DImageType::IndexType dwi4DTempIndex;
321 for (b0It.GoToBegin(), dwiIt.GoToBegin(), maskIt.GoToBegin();
323 ++b0It, ++dwiIt, ++maskIt)
327 dwiIt.Set(dwiZeroPixel);
332 b0Index = b0It.GetIndex();
333 if (this->GetDebug())
334 std::cout <<
"index = " << b0Index << std::endl << std::flush;
335 for (
int kk = 0; kk < VImageDimension; kk += 1 )
336 dwi4DTempIndex[kk] = b0Index[kk];
338 std::ostringstream ossWarn, ossWarnTmp;
341 for (
int kk = 0; kk < additionalB0[i]; kk += 1 )
343 dwi4DTempIndex[VImageDimension] = kk;
344 double dwi4DTempPixel = dwi4DTempImage->GetPixel(dwi4DTempIndex);
345 sumPixelb += dwi4DTempPixel*dwi4DTempPixel;
346 if (dwi4DTempPixel<1e-10)
347 ossWarnTmp <<
"zero b0 at "<< dwi4DTempIndex <<
", " <<
"b0=" << dwi4DTempPixel <<
", ";
350 b0Pixel = b0It.Get() + dwi4DTempPixel/((double)numberOfB0);
356 for (
int kk = 0; kk < b0IndexVec[i].size(); kk += 1 )
358 dwi4DTempIndex[VImageDimension] = b0IndexVec[i][kk]+additionalB0[i];
359 double dwi4DTempPixel = dwi4DTempImage->GetPixel(dwi4DTempIndex);
360 sumPixelb += dwi4DTempPixel*dwi4DTempPixel;
361 if (dwi4DTempPixel<1e-10)
362 ossWarnTmp <<
"zero b0 at "<< dwi4DTempIndex <<
", " <<
"b0=" << dwi4DTempPixel <<
", ";
365 b0Pixel = b0It.Get() + dwi4DTempPixel/((double)numberOfB0);
370 if (b0It.Get()<1e-10)
372 dwiIt.Set(dwiZeroPixel);
377 double sumPixeldwi=0;
378 dwiPixel = dwiIt.Get();
380 for (
int kk = additionalB0[i]; kk < numberOfDWI; kk += 1 )
382 if (!
utl::IsInVector(b0IndexVec[i], kk-additionalB0[i]) && ( stringMatrix[i].size()==3 || (stringMatrix[i].size()==4 &&
utl::IsInVector(selectIndexVec[i],kk-additionalB0[i]))) )
384 dwi4DTempIndex[VImageDimension] = kk;
385 double dwi4DTempPixel = dwi4DTempImage->GetPixel(dwi4DTempIndex);
386 sumPixeldwi += dwi4DTempPixel*dwi4DTempPixel;
387 if (dwi4DTempPixel<1e-10)
388 ossWarnTmp <<
"zero dwi at "<< dwi4DTempIndex <<
", ";
389 dwiPixel[jj + (i==0?0:numDWINob0[i-1])] = dwi4DTempPixel;
393 if (ossWarnTmp.str()!=
"" && sumPixelb>0 && sumPixeldwi>0)
394 ossWarn << ossWarnTmp.str();
396 if (m_ShowWarnings && (b0It.Get()>1e-10 || dwiPixel.GetSquaredNorm()>1e-10) && ossWarn.str()!=
"")
399 std::cout <<
"Warning: " << ossWarn.str() << std::endl << std::flush;
402 if (this->GetDebug())
415 ImageRegionIteratorWithIndex<DWIImageType> dwiTempIt(dwiTempImage, dwiTempImage->GetLargestPossibleRegion());
417 for (b0It.GoToBegin(), dwiIt.GoToBegin(), dwiTempIt.GoToBegin(), maskIt.GoToBegin();
419 ++b0It, ++dwiIt, ++dwiTempIt, ++maskIt)
423 dwiIt.Set(dwiZeroPixel);
428 b0Index = b0It.GetIndex();
429 if (this->GetDebug())
430 std::cout <<
"index = " << b0Index << std::endl << std::flush;
432 dwiTempPixel = dwiTempIt.Get();
433 std::ostringstream ossWarn;
435 for (
int kk = 0; kk < additionalB0[i]; kk += 1 )
437 if (dwiTempPixel[kk]<1e-10)
438 ossWarn <<
"zero b0 at ["<< b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
","<<kk <<
"], b0=" << dwiTempPixel[kk] <<
"\n";
441 b0Pixel = b0It.Get() + dwiTempPixel[kk]/((double)numberOfB0);
446 for (
int kk = 0; kk < b0IndexVec[i].size(); kk += 1 )
448 if (dwiTempPixel[kk]<1e-10)
449 ossWarn <<
"zero b0 at ["<< b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
","<<kk <<
"], b0=" << dwiTempPixel[kk] <<
"\n";
452 b0Pixel = b0It.Get() + dwiTempPixel[ b0IndexVec[i][kk]+additionalB0[i] ]/((double)numberOfB0);
457 if (b0It.Get()<1e-10)
459 dwiIt.Set(dwiZeroPixel);
464 dwiPixel = dwiIt.Get();
466 for (
int kk = additionalB0[i]; kk < numberOfDWI; kk += 1 )
468 if (!
utl::IsInVector(b0IndexVec[i], kk-additionalB0[i]) && ( stringMatrix[i].size()==3 || (stringMatrix[i].size()==4 &&
utl::IsInVector(selectIndexVec[i],kk-additionalB0[i]))) )
470 if (dwiTempPixel[kk]<1e-10)
471 ossWarn <<
"zero dwi at ["<< b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
","<<kk <<
"], dwi value=" << dwiTempPixel[kk] <<
"\n";
472 dwiPixel[jj + (i==0?0:numDWINob0[i-1])] = dwiTempPixel[kk];
477 if (m_ShowWarnings && (b0It.Get()>1e-10 && dwiPixel.GetSquaredNorm()>1e-10) && ossWarn.str()!=
"")
480 std::cout <<
"Warning: " << ossWarn.str() << std::endl << std::flush;
483 if (this->GetDebug())
495 m_SamplingSchemeQSpace->SetOrientationsCartesian(orientationsCartesian);
496 m_SamplingSchemeQSpace->SetBVector(bVector);
499 template <
class TPixelType,
unsigned int VImageDimension>
506 typename DWIImageType::Pointer dwiImage = this->GetOutput();
509 utlGlobalException(!(itk::VerifyImageSize<DWIImageType, B0ImageType>(dwiImage, m_B0Image,
true)),
"dwi image and b0 image have different information");
511 ImageRegionIteratorWithIndex<B0ImageType> b0It(m_B0Image, m_B0Image->GetLargestPossibleRegion());
512 ImageRegionIteratorWithIndex<DWIImageType> dwiIt(dwiImage, dwiImage->GetLargestPossibleRegion());
513 ImageRegionIteratorWithIndex<MaskImageType> maskIt;
515 maskIt = ImageRegionIteratorWithIndex<MaskImageType>(this->m_MaskImage, m_MaskImage->GetLargestPossibleRegion());
516 typename B0ImageType::IndexType b0Index;
517 typename B0ImageType::PixelType b0Pixel;
519 int numberOfDWIsWithoutB0 = dwiImage->GetNumberOfComponentsPerPixel();
520 dwiPixel.SetSize(numberOfDWIsWithoutB0);
521 for (b0It.GoToBegin(), dwiIt.GoToBegin(), maskIt.GoToBegin();
523 ++b0It, ++dwiIt, ++maskIt)
527 b0Pixel = b0It.Get();
530 dwiPixel = dwiIt.Get();
536 dwiPixel = dwiIt.Get();
537 if (dwiPixel.GetSquaredNorm()<1e-10)
543 b0Index = b0It.GetIndex();
545 for (
int j = 0; j < numberOfDWIsWithoutB0; j += 1 )
547 if (dwiPixel[j]<=0.99*b0Pixel && dwiPixel[j]>=1e-8*b0Pixel && dwiPixel[j]>maxData)
548 maxData = dwiPixel[j];
549 if (dwiPixel[j]<=0.99*b0Pixel && dwiPixel[j]>=1e-8*b0Pixel && dwiPixel[j]<minData)
550 minData = dwiPixel[j];
553 if (maxData < minData)
555 if (this->GetDebug())
557 std::cout <<
"Logical ERROR: ("<<b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
"), all dwi values are not in [0, 0.99]*b0. " << std::endl << std::flush;
559 dwiPixel = dwiIt.Get();
566 for (
int j = 0; j < numberOfDWIsWithoutB0; j += 1 )
568 if (dwiPixel[j]>=(1+1e-8)*b0Pixel)
570 if (this->GetDebug())
572 std::cout <<
"Logical ERROR in itk::DWIReader, dwi("<<b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
","<<j<<
")=" << dwiPixel[j] <<
" > " <<
"b0("<<b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
")=" << b0Pixel
573 <<
" Thus we force data["<<j<<
"]="<< maxData <<
", which is the maximal value of the other dwi values."<< std::endl;
575 dwiPixel[j] = maxData;
577 if (dwiPixel[j]<=1e-8*b0Pixel)
579 if (this->GetDebug())
581 std::cout <<
"Logical ERROR in itk::DWIReader, dwi("<<b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
","<<j<<
")=" << dwiPixel[j] <<
" < " <<
"b0("<<b0Index[0]<<
","<<b0Index[1]<<
","<<b0Index[2]<<
")=" << b0Pixel
582 <<
" Thus we force data["<<j<<
"]="<< minData <<
", which is the minimal value of the other dwi values."<< std::endl;
584 dwiPixel[j] = minData;
593 template <
class TPixelType,
unsigned int VImageDimension>
600 typename DWIImageType::Pointer dwiImage = this->GetOutput();
603 utlGlobalException(!(itk::VerifyImageSize<DWIImageType, B0ImageType>(dwiImage, m_B0Image,
true)),
"dwi image and b0 image have different information");
605 ImageRegionIterator<B0ImageType> b0It(m_B0Image, m_B0Image->GetLargestPossibleRegion());
606 ImageRegionIterator<DWIImageType> dwiIt(dwiImage, dwiImage->GetLargestPossibleRegion());
607 typename B0ImageType::PixelType b0Pixel;
609 dwiPixel.SetSize(dwiImage->GetNumberOfComponentsPerPixel());
611 for (b0It.GoToBegin(), dwiIt.GoToBegin();
615 b0Pixel = b0It.Get();
618 dwiPixel = dwiIt.Get();
625 template <
class TPixelType,
unsigned int VImageDimension>
630 if (m_ConfigurationFile!=
"")
631 ReadFromConfigurationFile(m_ConfigurationFile);
635 if (m_SamplingSchemeQSpace->GetBThresholdSingleShell()>0)
636 m_SamplingSchemeQSpace->CorrectBValues();
639 if (m_CorrectDWIValues)
647 template <
class TPixelType,
unsigned int VImageDimension>
652 Superclass::PrintSelf(os, indent);
653 PrintVar3(
true, m_IsInput4DImage, m_NormalizeDWI, m_CorrectDWIValues, os<<indent );
654 PrintVar1(
true, m_ConfigurationFile, os<<indent);
655 os << indent <<
"m_SamplingSchemeQSpace = " << m_SamplingSchemeQSpace << std::endl << std::flush;
657 os << indent <<
"m_MaskImage = " << m_MaskImage << std::endl << std::flush;
659 os << indent <<
"m_B0Image = " << m_B0Image << std::endl << std::flush;
#define PrintVar1(cond, var, os)
helper functions specifically used in dmritool
bool IsNumber(const std::string &input)
bool IsImageEmpty(const SmartPointer< ImageType > &image)
DWIImageType::PixelType PixelType
bool IsFileExist(const std::string &file)
void ReadLinesFirstlineCheck(const std::string &filename, std::vector< std::vector< std::string > > &strVec, const char *cc=" ")
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
const T & max(const T &a, const T &b)
Return the maximum between a and b.
void PrintVariableLengthVector(const VariableLengthVector< T >vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
utl_shared_ptr< STDVectorType > STDVectorPointer
T abs(const T x)
template version of the fabs function
#define utlGlobalException(cond, expout)
bool VerifyImageInformation(const SmartPointer< Image1Type > &image1, const SmartPointer< Image2Type > &image2, const bool isMinimalDimension=false)
void ReadFromConfigurationFile(const std::string &file)
virtual void GenerateData() ITK_OVERRIDE
static bool DetermineIsInput4DImage(const std::string &dataStr)
#define utlPrintVar(cond,...)
void ReadVector(const std::string &vectorStr, std::vector< T > &vec, const char *cc=" ")
void PrintVector(const std::vector< T > &vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout, bool showStats=true)
DWIImageType::IndexType IndexType
bool IsInVector(const VectorType &vec, const int size, const T &num, const double eps=1e-10)
#define PrintVar3(cond, var1, var2, var3, os)
#define utlShowPosition(cond)
void GetPath(const std::string &fileNameAbsolute, std::string &path, std::string &file)
utl_shared_ptr< MatrixType > MatrixPointer