Skip to content

Commit

Permalink
Dicom sort (#10)
Browse files Browse the repository at this point in the history
* Sort by image number for #9
* Disable ccache
  • Loading branch information
bathomas authored May 10, 2018
1 parent 97aad49 commit 8efc8d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
18 changes: 4 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ language: generic

sudo: true

cache:
- directories:
- $HOME/glog-build
- $HOME/googletest-build
- $HOME/ITK-BUILD
- $HOME/ITK-INSTALL
- $HOME/ANTS-BUILD

addons:
apt:
sources:
Expand All @@ -23,7 +15,6 @@ addons:
- libboost-all-dev
- libgtest-dev
- libdcmtk2-dev
- ccache
- libgflags-dev
- libgoogle-glog-dev
- wget
Expand All @@ -39,10 +30,9 @@ matrix:
env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5

before_script:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then echo "need cmake 3.2"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew install ccache glog ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then echo "need cmake 3.2"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew install glog ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install dcmtk; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- ls ~
- git clone https://github.com/google/glog ~/glog
- if [ ! -e ~/glog-build/install_manifest.txt ]; then
Expand All @@ -64,9 +54,9 @@ before_script:
- sudo make install #step 1 to here
- git clone --branch=v3.1.1 https://github.com/nlohmann/json.git ~/json
- cd ~/json
- cmake -DBUILD_TESTING=OFF .
- cmake -DBUILD_TESTING=OFF .
- make -j2
- sudo make install #step 2 to here
- sudo make install
- cd ~
- git clone --branch=v2.2.0 https://github.com/ANTsX/ANTs.git ~/ANTs
- if [ ! -e ~/ANTS-BUILD/ANTS-build ]; then
Expand Down
14 changes: 9 additions & 5 deletions src/ExtractDicomImages.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,22 @@ std::vector<nlohmann::json> StudyTree::GetInstanceList(const std::string &series
}

std::vector<boost::filesystem::path> StudyTree::GetSeriesFileList(const std::string &seriesUID){

std::vector<boost::filesystem::path> outList;

const int totalNoSlices = GetNoOfImages(seriesUID);
DLOG(INFO) << totalNoSlices << " in " << seriesUID;

std::vector<boost::filesystem::path> outList(totalNoSlices);

for (auto const& i: _instanceList){
if (i["SeriesUID"] == seriesUID){
std::string path = i["FilePath"];
//DLOG(INFO) << "\t : " << path;
outList.push_back(path);
int n = i["ImageNo"];
DLOG(INFO) << "Image no. " << n << "\t : " << path;
outList[n-1]=path;
}
}

return outList;
return outList;
}


Expand Down

0 comments on commit 8efc8d7

Please # to comment.