Skip to content

Commit

Permalink
Merge pull request #3 in INF/allensdk from PRODDEV-133 to dev
Browse files Browse the repository at this point in the history
* commit '3de6c93acf246a2e915ba00b9df569a3ea83ad73':
  PRODDEV-133: fixing commit message
  PRODDEV-113: moving structure masks
  • Loading branch information
David Feng committed Jan 17, 2017
2 parents 5843987 + 3de6c93 commit 4507513
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [0.12.x] - TBD

### Fixed

- MouseConnectivityCache's manifest now uses CCF-version- and resolution-specific file names for masks. The masks now live inside the CCF version directory.

## [0.12.4] - 2016-10-28

### Fixed
Expand Down
11 changes: 6 additions & 5 deletions allensdk/core/mouse_connectivity_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,10 @@ def get_structure_mask(self, structure_id, file_name=None, annotation_file_name=
it will be read from this file. If file_name is None, the
file_name will be pulled out of the manifest. Default is None.
"""

file_name = self.get_cache_path(
file_name, self.STRUCTURE_MASK_KEY, structure_id)
file_name, self.STRUCTURE_MASK_KEY, self.ccf_version,
self.resolution, structure_id)

if os.path.exists(file_name):
return nrrd.read(file_name)
Expand Down Expand Up @@ -756,8 +757,8 @@ def build_manifest(self, file_name):
typename='file')

manifest_builder.add_path(self.STRUCTURE_MASK_KEY,
'structure_masks/structure_%d.nrrd',
parent_key='BASEDIR',
'structure_masks/resolution_%d/structure_%d.nrrd',
parent_key=self.CCF_VERSION_KEY,
typename='file')

manifest_builder.write_json_file(file_name)
manifest_builder.write_json_file(file_name)

0 comments on commit 4507513

Please sign in to comment.