diff --git a/DWIConvert/DWIConverter.cxx b/DWIConvert/DWIConverter.cxx index d1b3400f7e..3e12b716cb 100644 --- a/DWIConvert/DWIConverter.cxx +++ b/DWIConvert/DWIConverter.cxx @@ -342,8 +342,8 @@ void DWIConverter::ManualWriteNRRDFile( header << "space: " << this->GetNRRDSpaceDefinition() << "" << std::endl; const DWIConverter::RotationMatrixType& NRRDSpaceDirection = this->GetNRRDSpaceDirection(); - header << "sizes: " << this->GetCols() - << " " << this->GetRows() + header << "sizes: " << this->GetRows() + << " " << this->GetCols() << " " << this->GetSlicesPerVolume() << " " << this->GetNVolume() << std::endl; header << "thicknesses: NaN NaN " << DoubleConvert(GetThickness()) << " NaN" << std::endl; diff --git a/DWIConvert/FSLDWIConverter.cxx b/DWIConvert/FSLDWIConverter.cxx index 84bcec00c5..dc8ee229fa 100644 --- a/DWIConvert/FSLDWIConverter.cxx +++ b/DWIConvert/FSLDWIConverter.cxx @@ -31,7 +31,8 @@ FSLDWIConverter::LoadFromDisk() Volume4DType::Pointer inputVol; // string to use as template if no bval or bvec filename is given. - ReadScalarVolume(inputVol, fslNIFTIFile, this->m_allowLossyConversion); + if (ReadScalarVolume(inputVol, fslNIFTIFile, this->m_allowLossyConversion) != EXIT_SUCCESS) + throw; // Reorient from FSL standard format to ITK/Dicom standard format this->m_SlicesPerVolume = inputVol->GetLargestPossibleRegion().GetSize()[2]; this->m_NVolume = inputVol->GetLargestPossibleRegion().GetSize()[3]; diff --git a/DWIConvert/TestSuite/CMakeLists.txt b/DWIConvert/TestSuite/CMakeLists.txt index aaac064b51..ceff19d4f4 100644 --- a/DWIConvert/TestSuite/CMakeLists.txt +++ b/DWIConvert/TestSuite/CMakeLists.txt @@ -480,4 +480,4 @@ ExternalData_Add_Test( ${PROJECT_NAME}FetchData NAME DWIConvertMultiShellFSITe ) AddDataDependency(DWIConvertMultiShellFSITestSmallSize) -ExternalData_Add_Target( ${PROJECT_NAME}FetchData ) # Name of data management target \ No newline at end of file +ExternalData_Add_Target( ${PROJECT_NAME}FetchData ) # Name of data management target diff --git a/DWIConvert/TestSuite/FSLMultiShellDataTest.cmake b/DWIConvert/TestSuite/FSLMultiShellDataTest.cmake index 9870c424ac..5b5b19fc74 100644 --- a/DWIConvert/TestSuite/FSLMultiShellDataTest.cmake +++ b/DWIConvert/TestSuite/FSLMultiShellDataTest.cmake @@ -2,6 +2,7 @@ # first, convert multishell FSL into Nrrd set(command_line ${TEST_PROGRAM} + --allowLossyConversion --inputVolume ${INPUTVOLUME} --outputVolume ${OUTPUTVOLUME} ) @@ -51,4 +52,4 @@ if(TEST_RESULT) "Failed: Recovering bvec or bval files do not match the original FSL file") endif() -message("Passed") \ No newline at end of file +message("Passed")