1

I would like to reconstruct a single (i.e., left) hemisphere, so that it takes less resources to be plotted and less time to compile and eventually simulate. I have configured an AllenStructureLoader and I use it in my PlacemenStrategy. Can I tell the PlacementStrategy to place cells in only 1 of the 2 hemispheres? Would such filter be used in the connectivity as well?

Robin De Schepper
  • 4,942
  • 4
  • 35
  • 56

1 Answers1

1

The AllenStructureLoader loads entire Allen structures and no filtering is available if they belong to structures with the same ID.

For now your best bet would be to subclass the AllenStructureLoader and to override its get_voxelset method. I'm not sure if the Allen Brain Atlas provides hemisphere metadata to do such a filter, but the brain is rather symmetrical, so you may just get away with filtering out the half-width of the total region:

class HemisphereLoader(AllenStructureLoader):
  def get_voxelset(self):
    vs = super().get_voxelset()
    # Take out the voxels of `vs` that you're interested in
    return vs

Alternatively you could use the AllenStructureLoader, or the Allen SDK in a script to load both hemispheres, export it to NRRD, filter the NRRD using your favorite tools, save that file, and load your preprocessed NRRD file with an NrrdLoader:

"partitions": {
  "hemi": {
    "type": "nrrd",
    "source": "my_file.nrrd"
  }
}
Robin De Schepper
  • 4,942
  • 4
  • 35
  • 56