[MINC-users] Usage of mincconcat

Andrew Wood andrew at biospective.com
Thu Sep 5 12:04:26 EDT 2013


Jason's Python solution is quite attractive to me, because my "processing
step" is a Python script. I should be able to adapt that and embed it right
in the processing routine. My motivation for tiling/concating was driven by
having images that are too big to fit in memory, so I don't think the issue
is completely solved. I can extract the tiles as pyminc hyperslabs, but am
I able to write back the processed hyperslabs without loading the entire
destination image?

That is, am I right that this loads vol's entire data block, despite only
needing to modify part of it?:
    vol.data[i,:,:] = myslab

Thanks,
Andrew


On Thu, Sep 5, 2013 at 8:58 AM, Andrew Janke <a.janke at gmail.com> wrote:

> On 5 September 2013 22:50, Andrew Wood <andrew at biospective.com> wrote:
> > Thanks for that. What I've actually done is split a large image into
> tiles
> > or cubes for processing. Now that I've got processed hyperslabs, I'm
> > stitching them back together. From what you described, I'll have to
> reshape
> > the slabs for concatting into rows, then reshape the rows for concatting
> > into slices, then reshape the slices for concatting back to the full
> volume.
> >
> > I suppose there's no way to stitch them without taking a big reshaping
> I/O
> > hit?
>
> This is only the case if you are concatenating along a dimension that
> is already in the file(s). If when you reshape you do this:
>
>    mincreshape -dimrange yspace=100,0  3d.mnc y-100.mnc
>
> to pull out y slice #100 you will remove the y dimension.
>
> Then you can concat with:
>
>    mincconcat -concay_dimension yspace y-100.mnc ....  3d.mnc
>
> Note that in the above you will have to manually store the starts,
> steps and direction cosines.
>
> Or, just bash the volume back together ignoring start/step/etc and use
> minccopy to overwrite the data in a copy of the original file.
>
>
> a
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list