diff --git a/CMakeLists.txt b/CMakeLists.txt index 500751d..78da16e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ message(STATUS "Looking for packages in : ${CMAKE_PREFIX_PATH}") #VERSIONING set(SIEMENS_TO_ISMRMRD_VERSION_MAJOR 1) set(SIEMENS_TO_ISMRMRD_VERSION_MINOR 2) -set(SIEMENS_TO_ISMRMRD_VERSION_PATCH 8) +set(SIEMENS_TO_ISMRMRD_VERSION_PATCH 9) set(SIEMENS_TO_ISMRMRD_VERSION_STRING ${SIEMENS_TO_ISMRMRD_VERSION_MAJOR}.${SIEMENS_TO_ISMRMRD_VERSION_MINOR}.${SIEMENS_TO_ISMRMRD_VERSION_PATCH}) # Generate the converter_version.h header file diff --git a/main.cpp b/main.cpp index 6cc8c2e..7113eca 100644 --- a/main.cpp +++ b/main.cpp @@ -97,7 +97,7 @@ getTrajectory(const std::vector &wip_double, const Trajectory &traj ISMRMRD::Acquisition getAcquisition(bool flash_pat_ref_scan, const Trajectory &trajectory, long dwell_time_0, long* global_table_pos, long max_channels, - bool isAdjustCoilSens, bool isAdjQuietCoilSens, bool isVB, bool isNX, ISMRMRD::NDArray &traj, + bool isAdjustCoilSens, bool isAdjQuietCoilSens, bool isVB, bool isNX, bool attachTrajectory, ISMRMRD::NDArray &traj, const sScanHeader &scanhead, const std::vector &channels); void readScanHeader(std::ifstream &siemens_dat, bool VBFILE, sMDH &mdh, sScanHeader &scanhead); @@ -453,7 +453,7 @@ int main(int argc, char* argv[]) { bool all_measurements = false; bool multi_meas_file = false; bool skip_syncdata = false; - + bool attachTrajectory = false; bool list = false; std::string to_extract; @@ -468,6 +468,7 @@ int main(int argc, char* argv[]) { ("allMeas,Z", po::value(&all_measurements)->implicit_value(true), "") ("multiMeasFile,M", po::value(&multi_meas_file)->implicit_value(true), "") ("skipSyncData", po::value(&skip_syncdata)->implicit_value(true), "") + ("attachTrajectory", po::value(&attachTrajectory)->implicit_value(true), "") ("pMap,m", po::value(¶mmap_file), "") ("pMapStyle,x", po::value(¶mmap_xsl), "") ("user-map", po::value(&usermap_file), "") @@ -495,6 +496,7 @@ int main(int argc, char* argv[]) { ("allMeas,Z", "") ("multiMeasFile,M", "") ("skipSyncData", "") + ("attachTrajectory", "") ("pMap,m", "") ("pMapStyle,x", "") ("output,o", "") @@ -842,7 +844,8 @@ int main(int argc, char* argv[]) { auto ismrmrd_dataset = boost::make_shared(ismrmrd_file.c_str(), ismrmrd_group.c_str(), true); //If this is a spiral acquisition, we will calculate the trajectory and add it to the individual profilesISMRMRD::NDArray traj; - auto traj = getTrajectory(wip_double, trajectory, dwell_time_0, radial_views); +// auto traj = getTrajectory(wip_double, trajectory, dwell_time_0, radial_views); + ISMRMRD::NDArray traj; uint32_t last_mask = 0; unsigned long int acquisitions = 1; @@ -953,7 +956,7 @@ int main(int argc, char* argv[]) { ismrmrd_dataset->appendAcquisition( getAcquisition(flash_pat_ref_scan, trajectory, dwell_time_0, global_table_pos, max_channels, isAdjustCoilSens, - isAdjQuietCoilSens, isVB, isNX, traj, scanhead, channels)); + isAdjQuietCoilSens, isVB, isNX, attachTrajectory, traj, scanhead, channels)); }//End of the while loop delete [] global_table_pos; @@ -1081,7 +1084,7 @@ void readScanHeader(std::ifstream &siemens_dat, bool VBFILE, sMDH &mdh, sScanHea ISMRMRD::Acquisition getAcquisition(bool flash_pat_ref_scan, const Trajectory &trajectory, long dwell_time_0, long* global_table_pos, long max_channels, - bool isAdjustCoilSens, bool isAdjQuietCoilSens, bool isVB, bool isNX, ISMRMRD::NDArray &traj, + bool isAdjustCoilSens, bool isAdjQuietCoilSens, bool isVB, bool isNX, bool attachTrajectory, ISMRMRD::NDArray &traj, const sScanHeader &scanhead, const std::vector &channels) { ISMRMRD::Acquisition ismrmrd_acq; // The number of samples, channels and trajectory dimensions is set below @@ -1225,7 +1228,7 @@ getAcquisition(bool flash_pat_ref_scan, const Trajectory &trajectory, long dwell ismrmrd_acq.encoding_space_ref() = 1; } - if ((trajectory == Trajectory::TRAJECTORY_SPIRAL) & !(ismrmrd_acq.isFlagSet( + if (attachTrajectory && (trajectory == Trajectory::TRAJECTORY_SPIRAL) & !(ismrmrd_acq.isFlagSet( ISMRMRD::ISMRMRD_ACQ_IS_NOISE_MEASUREMENT))) { //Spiral and not noise, we will add the trajectory to the data // from above we have the following