<font size="2"><font face="verdana,sans-serif">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.<br>
</font></font><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">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.</font></div>
<div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">BW</font></div><div><font class="Apple-style-span" face="verdana, sans-serif"><br>
</font><div class="gmail_quote">2011/6/28 hanifa mohamed <span dir="ltr"><<a href="mailto:hanifa_email@yahoo.com.sg">hanifa_email@yahoo.com.sg</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:12pt"><div><span>Hi,</span></div><div><span> </span><span> 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.</span></div>
<div><br><span></span></div><div><span>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.</span></div>
<div><span>Btw, SparseImages do have the benefits when dealing with large image sizes with a lot of emptiness. :)</span></div><div><span>Another question, is it possible to use irregular shapes as your itk::Image object. Instead of a regular shape, maybe like this. <br>
</span></div><div><span>[][]</span></div><div><span>[][][][][][][] where [] is one
pixel.</span></div><div><span><br>Sorry, if my questions seems a bit weird, but we are just looking at ITK in all sorts of angles. :D<br></span></div><div><br><span></span></div><div><span>So far, I am certainly liking ITK as compared to OpenCV. The Generic portion in ITK seems to have winning me over.</span></div>
<div><br><span></span></div><div><span>Regards</span></div><div><span></span></div><div><br></div><div style="font-family:verdana,helvetica,sans-serif;font-size:12pt"><div style="font-family:times new roman,new york,times,serif;font-size:12pt">
<font face="Arial" size="2"><div class="im"><hr size="1"><b><span style="font-weight:bold">From:</span></b> Dženan Zukić <<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>><br><b><span style="font-weight:bold">To:</span></b> hanifa mohamed <<a href="mailto:hanifa_email@yahoo.com.sg" target="_blank">hanifa_email@yahoo.com.sg</a>><br>
<b><span style="font-weight:bold">Cc:</span></b> itk <<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>><br></div><b><span style="font-weight:bold">Sent:</span></b> Tuesday, 28 June
2011 3:33 PM<div><div></div><div class="h5"><br><b><span style="font-weight:bold">Subject:</span></b> Re: [Insight-users] Triangular Pixels<br></div></div></font><div><div></div><div class="h5"><br><div><div><span style="border-collapse:collapse;font-family:verdana,helvetica,sans-serif;font-size:medium">typedef itk::Image<unsigned char,2> ImageType; //this is, by definition, rectangular pixel image</span></div>
<div><span style="border-collapse:collapse;font-family:verdana,helvetica,sans-serif;font-size:medium">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.</span></div>
<div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse"><br></span></font></div><div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse">I just checked git source of ITK4, the only mention of sparse there is related to sparse matrices.</span></font></div>
<div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse"><br></span></font></div><div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse">But if you think you need sparse images AND triangular pixels, I am almost sure you are trying to solve something the wrong way.</span></font></div>
<div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse"><br></span></font></div><div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse">HTH,</span></font></div>
<div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse">Dženan</span></font></div>
<div><font face="verdana, helvetica, sans-serif" size="3"><span style="border-collapse:collapse"><br></span></font><div>2011/6/28 hanifa mohamed <span dir="ltr"><<a rel="nofollow" href="mailto:hanifa_email@yahoo.com.sg" target="_blank">hanifa_email@yahoo.com.sg</a>></span><br>
<blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:arial,helvetica,sans-serif;font-size:12pt">
<div style="font-family:verdana,helvetica,sans-serif">
<font size="3"><span>Hi,</span></font></div><div style="font-family:verdana,helvetica,sans-serif"><font size="3"><span>Thanks for the reply.</span></font></div><div><div style="font-family:verdana,helvetica,sans-serif;font-style:italic">
<font size="3"><span>"</span></font><font size="3"><font>
You may visualize it as triangles for some purpose, but then you would
have to fill the empty space somehow, using black color perhaps."</font></font></div><div style="font-family:verdana,helvetica,sans-serif"><font size="3"><br></font></div></div><div style="font-family:verdana,helvetica,sans-serif">
<font size="3"><font>Sorry , I dont really understand the above statement.<br></font></font></div><div style="font-family:verdana,helvetica,sans-serif"><font size="3"><font>typedef itk::Image<unsigned char,2> ImageType; //What would I have to change here ???</font></font></div>
<div style="font-family:verdana,helvetica,sans-serif"><font size="3"><font>What do you mean by filling the empty space ?<br></font></font></div><div style="font-family:verdana,helvetica,sans-serif"><font size="3"><br></font></div>
<div style="font-family:verdana,helvetica,sans-serif"><font size="3">Do you think support for SparseImages will increase in the near future ?</font></div><div style="font-family:verdana,helvetica,sans-serif"><font size="3"><br>
</font></div><div style="font-family:verdana,helvetica,sans-serif"><font size="3"><font>Regards</font></font></div><div><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt"><div style="font-family:times new roman,new york,times,serif;font-size:12pt">
<div><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold">From:</span></b> Dženan Zukić <<a rel="nofollow" href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>><br><b><span style="font-weight:bold">To:</span></b> hanifa mohamed <<a rel="nofollow" href="mailto:hanifa_email@yahoo.com.sg" target="_blank">hanifa_email@yahoo.com.sg</a>><br>
<b><span style="font-weight:bold">Cc:</span></b> itk <<a rel="nofollow" href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>><br><b><span style="font-weight:bold">Sent:</span></b> Tuesday, 28 June 2011 12:15 AM<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [Insight-users] Triangular Pixels<br></font></div><div><div></div><div><br><div><font size="2"><font face="verdana,sans-serif">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.<br>
</font></font><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">Sparse images are not currently supported (except maybe for a few isolated filters).<br>
</font></div><div><div><br></div><div>HTH,</div><div>Dženan</div><div><br></div><div>On Mon, Jun 27, 2011 at 10:18, hanifa mohamed <span dir="ltr"><<a rel="nofollow" href="mailto:hanifa_email@yahoo.com.sg" target="_blank">hanifa_email@yahoo.com.sg</a>></span> wrote:<br>
<blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:arial,helvetica,sans-serif;font-size:12pt">
<div>Hi all,</div>
<div> 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.</div><div>
<br></div><div>Firstly, I would like know whether is possible in the first place .</div><div>Secondly, are there any native classes in itk, which can accomplish this ?<br></div><div>Can anyone guide me in the some sort of direction?</div>
<div><br></div><div>It would be great if someone could also help in this other thread, I posted last week. <a rel="nofollow" href="http://www.itk.org/pipermail/insight-users/2011-June/041504.html" target="_blank">http://www.itk.org/pipermail/insight-users/2011-June/041504.html</a><br>
</div><div><br></div><div>Thanks in advance again, guys.</div><div><br></div><div>Regards</div><div><br></div><div><br></div><div><br></div></div></div><br>_____________________________________<br>
Powered by <a rel="nofollow" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a rel="nofollow" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a rel="nofollow" href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a rel="nofollow" href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>
</div><br><br></div></div></div></div></div></div></blockquote></div><br></div>
</div><br><br></div></div></div></div></div></div></blockquote></div><br></div>