users > examples artefact in Janelia warped registrat
Showing 1-3 of 3 posts
Display:
Results per page:
Oct 15, 2012  06:10 PM | Torsten Rohlfing
examples artefact in Janelia warped registrat
Greg:



Mask the images.



;)



Seriously - I assume when you say "impossible" you mean -
impossible to do manually with the large number of brains.



So here's what I would do - using a relatively high Jacobian
weight may solve the issue of unreasonable squashing, but will
very likely also affect the alignment of the brain as a whole. BUT
you could use a set of brains (3-5) that do not have the lamina
and compute foreground masks for these (e.g., using CMTK's
"levelset" tool).



Then you align these brains to all other brains using a rather
stiff warp (relatively high Jacobian constraint weight), only to
map their foreground masks into the space of each of the other
brains. Then, in each of the 3500 brains' spaces, you have 3-5
foreground masks, which you can combine via voting (cmtk imagemath
--vote) or shape-based averaging (cmtk sba). This should give you
a reasonable mask for each of your 3500 brains. After applying
these masks, you should be able to register the 3500 brains to
your lamina-free template.



Obviously, there is a computation time penalty from the 3500 x3
(or x5) registrations to create the masks, but you needn't run the
warping with anywhere near as aggressive parameters as for the
animal-to-template warping. You should be able to make do with a
very coarse control point grid, coarse image data, and fairly
large final optimization step size.



Hope all this makes sense.



Best, Torsten



On 10/15/2012 09:20 AM, Dr Gregory Jefferis wrote:

Hi Marta (and in fact mostlyTorsten),

These problems arise from brains where the lamina is still attached and the registration tries to squeeze part or all of it into the main optic lobe. There are a few tricks that we might be able to use to improve things but I would have to talk to Torsten to ask his advice.

@Torsten, we are try to register a large number of brains to a template (a data dump of 3500 brains from the Janelia Farm group that includes Hanchuan Peng). Some of the brains have extra material (called the lamina, the second layer of the visual system after the retina) that has been dissected away from the template brain. This extra material is quite loosely attached to the rest of the brain and is therefore rather variable in position/morphology. We find that in many cases the warping registration tries to squash this extra material into the rest of the brain. Here are some options that I am considering

1) Add non-zero jacobian weight

--jacobian-weight
Weight for Jacobian-based local volume preservation constraint
[Default: 0]

Tried --jacobian-weight 0.1 and it stopped necessary warping in the central brain
Tried --jacobian-weight 0.01 and it didn't make much difference

2) or rigidity-weight

--rigidity-weight
Weight for local rigidity constraint
[Default: 0]
Tried --rigidity-weight 0.1 and it didn't make much difference (but everything took a lot longer to calculate)

3) Check if an option which used to exist:
--rigidity-weight-map
Pixelwise map of weights of rigidity constraint (multiplied by --rigidity-weight value) (default: 0).
could be resurrected.

4) changing the initial affine from 9 to 12 dof and reducing the warping step size to prevent large deformations.

5) Making a new template that includes this material in as canonical a position as possible.

6) Any other suggestions from Torsten (beyond masking the images which would be pretty much impossible!)


G.


Nov 9, 2012  08:11 PM | Greg Jefferis
examples artefact in Janelia warped registrat
Dear Torsten,

First of all thank you very much for taking the time to make such detailed suggestions.

It took us a while to test this out since time has been scare recently and it required some significant adjustments to our pipeline. Anyway, our initial impression was not so good unfortunately. It seemed that masking inevitably resulted in the loss of some real material, producing an incorrect sharp edge in the image data. This edge was then routinely mapped to the edge of the template brain even when this was not supported by the data.

However we did notice another issue that seemed to be an important contributor to our problem. We started the image resolution pyramid at ~ 12x downsampled from the original data. For the warping registration, this smoothing seemed to result in loss of local information that resulted in an increased likelihood for extra material to try to match up with unmatched brain regions. Starting the pyramid at 6x downsampled actually improved things for several test brains. Not sure if this suggests anything else to you that would be worth investigating.

Finally I wondered if the inverse consistent switch would be worth exploring.

Many thanks as ever,

Greg.



Nov 10, 2012  06:11 AM | Torsten Rohlfing
RE: examples artefact in Janelia warped registrat
Greg:

You can try the inverse consistency, but I have never found it much use (at least my implementation).

Another, more radical idea would be to instruct the registration to not consider the masked-out areas at all (rather than consider it zero).

For that, use the --pad-ref and --pad-flt options in the registration tools. Each takes a number, and as a result all pixels in the reference (--pad-ref) and/or floating image (--pad-flt) with this value will be ignored.

If your masked-out pixels are set to zero, you can use "--pad-ref 0" and/or "--pad-flt 0". To make sure not to lose actual zero pixels, I would recommend using a different value for masking, by giving the "convertx" tool "--set-padding VALUE" when you do the masking, and use as "VALUE" some negative value, e.g., -1000. That value should then also be provided to the registration tools for ignoring the masked-out areas.

Note that with --pad-ref or --pad-flt, especially the nonrigid registration has a tendency to make "inconvenient" image regions disappear by moving them out of the foreground. In some cases, that may well turn out to be the entire floating image... still, may be worth a shot, since you've already computed the masks.

TR