[Insight-developers] Proposal: refactoring of image class hierarchy in ITK v4
Tom Vercauteren
tom.vercauteren at m4x.org
Wed Oct 6 03:25:52 EDT 2010
Hi Cory,
Thanks for bringing this refactoring up.
I agree with others that a refactoring of the image classes needs to
also address the memory containers. As written in the ITKv4 wishlist
http://www.itk.org/Wiki/ITK_Release_4/Wish_List#Image_Representation
I believe that the current assumption of a contiguous memory scenario
for the complete image is too restrictive. For example, if we want to
use SSE operations and easily interface with other libraries such as
opencv, we need to have a container with contiguous memory on a per
line basis only. More precisely, we would require images whose stride
is not equal to their width.
To me, this example is interesting because is fuses the two apparently
distinct needs expressed by Dan Mueller and Daniel Blezek in this
discussion:
- Make sure we ease image import/export with other libraries
- Remove the current memory layout assumption and thus the
GetBufferPointer() function from the base image class
As a side note, to contribute answering to Gaëtan's question on the
existence of "non physically placed images", wouldn't 2D+t images fall
into this category? I haven't followed the current discussions going
on about temporal data
http://www.itk.org/Wiki/ITK_Release_4/Video
http://www.itk.org/Wiki/ITK_Release_4/Video
so this remark might be off topic but it would at least be worth
mentioning whether it is indeed off-topic or not.
Also in some more computer vision related scenarios, it is quite
difficult to set up a meaningful physical embedding. In these
scenarios, just using a unit spacing and a zero origin makes sense and
would allow for an improvement in the performance of some filters as
the functions TransformContinuousIndexToPhysicalPoint and similar
become essentially non-ops.
My two cents,
Tom
On Tue, Oct 5, 2010 at 23:13, Jim Miller <millerjv at ge.com> wrote:
> I am envisioning different PixelContainer types. For contiguous memory
> scenarios, the container could still have a GetBufferPointer() or some other
> method for wrapping preallocated blocks of memory.
> Jim
> On Oct 5, 2010, at 4:53 PM, Daniel Blezek wrote:
>
> Won't removing GetBufferPointer() make it much more difficult to interface
> with VTK and other external systems? I'd hate to have to make a copy of my
> images every time I go in and out of ITK...
>
>
> On 10/5/10 3:43 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>
> Dan,
>
> Jim Miller, the architect of the itkImage classes admits that exposing
>
> GetBufferPointer() was a mistake. This can be corrected in itkV4.
>
> Bill
>
>
> On Tue, Oct 5, 2010 at 4:14 PM, Dan Mueller <dan.muel at gmail.com> wrote:
>
> Hi Cory,
>
> Not sure if the community wants to include/refactor the image classes
>
> proposed here
>
> http://www.insight-journal.org/browse/publication/646
>
> namely
>
> SliceContinguousImage
>
> SingleBitBinaryImage
>
> which would derive from RegularImageBase in your proposed hierarchy.
>
> You have done a comprehensive analysis of where spacing is used; the
>
> addition of the above classes would also require an analysis of the
>
> use of GetBufferPointer(), which will not fall out as easy as
>
> spacing...
>
> Cheers, Dan
>
> On 5 October 2010 18:12, Cory Quammen <cquammen at cs.unc.edu> wrote:
>
> Dear all,
>
> I've drafted a proposal for refactoring the image class hierarchy in
>
> ITK v4, which can be found here:
>
> http://www.itk.org/Wiki/ITK_Release_4/Image_Class_Hierarchy_Refactoring
>
> Please feel free to modify the wiki page to address things I've
>
> overlooked, suggest nomenclature improvements, or correct things I
>
> have gotten wrong.
>
> Thank you,
>
> Cory
>
> --
>
> Cory Quammen
>
> Computer Integrated Systems for Microscopy and Manipulation (CISMM)
>
> Department of Computer Science
>
> University of North Carolina at Chapel Hill
>
> http://www.cs.unc.edu/~cquammen
>
> _______________________________________________
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
>
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
>
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
>
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
>
> http://www.itk.org/mailman/listinfo/insight-developers
>
> _______________________________________________
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
>
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
>
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
>
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
>
> http://www.itk.org/mailman/listinfo/insight-developers
>
> _______________________________________________
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
>
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
>
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
>
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
>
> http://www.itk.org/mailman/listinfo/insight-developers
>
> --
> Daniel Blezek, PhD
> Medical Imaging Informatics Innovation Center
>
> P 127 or (77) 8 8886
> T 507 538 8886
> E blezek.daniel at mayo.edu
>
> Mayo Clinic
> 200 First St. S.W.
> Harwick SL-44
> Rochester, MN 55905
> mayoclinic.org
> "It is more complicated than you think." -- RFC 1925
>
>
> Jim Miller
> Senior Scientist
> GE Research
> Interventional and Therapy
> GE imagination at work
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
More information about the Insight-developers
mailing list