64 lines
2.8 KiB
Diff
64 lines
2.8 KiB
Diff
|
From bbd60f634cdcdfbbb3eb8f3b6d00f366d9f34bf9 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
|
||
|
Date: Thu, 18 Oct 2018 11:21:05 +1300
|
||
|
Subject: [PATCH] Basic compatibility between for AString built with either
|
||
|
glib ustring or QString
|
||
|
|
||
|
---
|
||
|
src/flameo/gsa.cc | 4 ++--
|
||
|
src/melodic/meldata.cc | 2 +-
|
||
|
src/melodic/meldata.h | 2 +-
|
||
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/src/flameo/gsa.cc b/src/flameo/gsa.cc
|
||
|
index 6a477f9..0860d46 100644
|
||
|
--- a/src/flameo/gsa.cc
|
||
|
+++ b/src/flameo/gsa.cc
|
||
|
@@ -74,7 +74,7 @@ namespace GSA {
|
||
|
sourceType=mode;
|
||
|
if ( sourceType.compare("CIFTI") == 0 ) {
|
||
|
cifti::CiftiFile inputCifti;
|
||
|
- inputCifti.openFile(fslbasename(filename)+".nii");
|
||
|
+ inputCifti.openFile((fslbasename(filename)+".nii").c_str());
|
||
|
ciftiExemplar=inputCifti.getCiftiXML();
|
||
|
cerr << "ndim " << ciftiExemplar.getNumberOfDimensions() << endl;
|
||
|
cerr << "type1 " << ciftiExemplar.getMappingType(0) << endl;
|
||
|
@@ -194,7 +194,7 @@ namespace GSA {
|
||
|
scalarsMap.setLength(data.Nrows());
|
||
|
ciftiExemplar.setMap(0, scalarsMap);
|
||
|
CiftiFile outputFile;
|
||
|
- outputFile.setWritingFile(fslbasename(filename)+extension+".nii");//sets up on-disk writing with default writing version
|
||
|
+ outputFile.setWritingFile((fslbasename(filename)+extension+".nii").c_str());//sets up on-disk writing with default writing version
|
||
|
outputFile.setCiftiXML(ciftiExemplar,false);
|
||
|
vector<float> scratchRow(data.Nrows());//read/write a row at a time
|
||
|
for (int64_t row=0;row<data.Ncols();row++) {
|
||
|
diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
|
||
|
index f310dc7..5e9bc18 100644
|
||
|
--- a/src/melodic/meldata.cc
|
||
|
+++ b/src/melodic/meldata.cc
|
||
|
@@ -118,7 +118,7 @@ namespace Melodic{
|
||
|
tmpData = RawData.matrix(Mask);
|
||
|
memmsg(" after reshape ");
|
||
|
} else { //Read in Cifti
|
||
|
- inputCifti.openFile(fname+".nii");
|
||
|
+ inputCifti.openFile((fname+".nii").c_str());
|
||
|
const vector<int64_t>& dims = inputCifti.getDimensions();
|
||
|
tmpData.ReSize(dims[0],dims[1]); //swapped compared to cifti
|
||
|
vector<float> scratchRow(dims[0]);//read/write a row at a time
|
||
|
diff --git a/src/melodic/meldata.h b/src/melodic/meldata.h
|
||
|
index 1e1adfc..d898152 100644
|
||
|
--- a/src/melodic/meldata.h
|
||
|
+++ b/src/melodic/meldata.h
|
||
|
@@ -109,7 +109,7 @@ namespace Melodic{
|
||
|
message(" " << logger.appendDir(fname) << endl);
|
||
|
} else { //Process CIFTI save ICs as float
|
||
|
cifti::CiftiFile outputFile;
|
||
|
- outputFile.setWritingFile(logger.appendDir(fname)+".nii");//sets up on-disk writing with default writing version
|
||
|
+ outputFile.setWritingFile((logger.appendDir(fname)+".nii").c_str());//sets up on-disk writing with default writing version
|
||
|
cifti::CiftiXML xml(inputCifti.getCiftiXML());
|
||
|
cifti::CiftiScalarsMap scalarsMap;
|
||
|
std::vector<char> foo = xml.writeXMLToVector();
|
||
|
--
|
||
|
2.18.1
|
||
|
|