[Insight-users] Triangular Pixels

Dženan Zukić dzenanz at gmail.com
Tue Jun 28 07:32:27 EDT 2011


Images are rectangular. If you need some non-rectangular shape, you may
create custom class derived from image, and internally keep collection of
standard images for non-empty areas. If all your images are going to be 2D,
you might consider using sparse matrix class of some library to store your
images. ITK also supports 2D images, but it is designed for 3D images
primarily.

This is really the first time I have heard of triangular pixels. I have
heard of theoretical considerations of hexagonal pixels, but never heard of
them being practically used anywhere. Rectangular pixels are universal.

BW

2011/6/28 hanifa mohamed <hanifa_email at yahoo.com.sg>

> Hi,
>      Actually, I am doing a pre-evaluation study on ITK. So my supervisior
> asked me to look into itk and see whether it could do any interesting
> features.
>
> For the triangular pixels, I am not looking at the visualization part. But
> initializing it in the first place as in itk::Image. Do PointSets and Meshes
> help in any way. I was reading that.
> Btw, SparseImages do have the benefits when dealing with large image sizes
> with a lot of emptiness. :)
> Another question, is it possible to use irregular shapes as your itk::Image
> object. Instead of a regular shape, maybe like this.
> [][]
> [][][][][][][]  where [] is one pixel.
>
> Sorry, if my questions seems a bit weird, but we are just looking at ITK in
> all sorts of angles. :D
>
> So far, I am certainly liking ITK as compared to OpenCV. The Generic
> portion in ITK seems to have winning me over.
>
> Regards
>
> ------------------------------
> *From:* Dženan Zukić <dzenanz at gmail.com>
> *To:* hanifa mohamed <hanifa_email at yahoo.com.sg>
> *Cc:* itk <insight-users at itk.org>
> *Sent:* Tuesday, 28 June 2011 3:33 PM
>
> *Subject:* Re: [Insight-users] Triangular Pixels
>
> typedef itk::Image<unsigned char,2> ImageType; //this is, by definition,
> rectangular pixel image
> but when you show it on screen, instead of painting the pixels as small
> rectangles you can paint them as small triangles. And that depends on which
> visualization package are you using (Qt, VTK, etc). But I have never heard
> of a package that has an option to treat pixels as triangles, so you would
> have to hand code a lot of stuff.
>
> I just checked git source of ITK4, the only mention of sparse there is
> related to sparse matrices.
>
> But if you think you need sparse images AND triangular pixels, I am almost
> sure you are trying to solve something the wrong way.
>
> HTH,
> Dženan
>
> 2011/6/28 hanifa mohamed <hanifa_email at yahoo.com.sg>
>
>  Hi,
> Thanks for the reply.
> " You may visualize it as triangles for some purpose, but then you would
> have to fill the empty space somehow, using black color perhaps."
>
> Sorry , I dont really understand the above statement.
> typedef itk::Image<unsigned char,2> ImageType; //What would I have to
> change here ???
> What do you mean by filling the empty space ?
>
> Do you think support for SparseImages will increase in the near future ?
>
> Regards
>
> ------------------------------
> *From:* Dženan Zukić <dzenanz at gmail.com>
> *To:* hanifa mohamed <hanifa_email at yahoo.com.sg>
> *Cc:* itk <insight-users at itk.org>
> *Sent:* Tuesday, 28 June 2011 12:15 AM
> *Subject:* Re: [Insight-users] Triangular Pixels
>
> In ITK, pixels are defined to be rectangular. It is the only
> representation. You may visualize it as triangles for some purpose, but then
> you would have to fill the empty space somehow, using black color perhaps.
> It is dependent on what you want to achieve.
>
> Sparse images are not currently supported (except maybe for a few isolated
> filters).
>
> HTH,
> Dženan
>
> On Mon, Jun 27, 2011 at 10:18, hanifa mohamed <hanifa_email at yahoo.com.sg>wrote:
>
> Hi all,
>          I was going through itk, and was wondering whether it is possible
> to represent (triangular or any n-shaped polygons) as pixels in itk. The
> Image class has pixels in the default squarish pixel shape.
>
> Firstly, I would like know whether is possible in the first place .
> Secondly, are there any native classes in itk, which can accomplish this ?
> Can anyone guide me in the some sort of direction?
>
> It would be great if someone could also help in this other thread, I posted
> last week.
> http://www.itk.org/pipermail/insight-users/2011-June/041504.html
>
> Thanks in advance again, guys.
>
> Regards
>
>
>
>
> _____________________________________
> 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://www.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-users
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110628/cd430625/attachment-0001.htm>


More information about the Insight-users mailing list