Hello Kumar, <div><br></div><div>you are right, we considered 3D image with a single slice as 2D image because VTK does not separate 2D and 3D (as ITK does). And it thus prevent to overlay a "2D" image with a 3D volume ...</div>
<div><br></div><div>I made a first trial in the new CVS version to take into account your case and separate "true" 2D image from 3D image with a single slice. </div><div><br></div><div>Please tell us if it is now ok for you and be kind to report any newly introduced bug with this attempt...</div>
<div><br></div><div>David</div><div>PS : note that the last CVS version also contains a new attempt to better manage the memory that Simon commit yesterday. VV still contains some uncorrected bugs (for example MIP is not working anymore). Expect some weeks before a more robust version ;)</div>
<div>PS : I send the two images I used to test. Two different mhd headers (2D & 3D) and a single .raw.</div><div><br><br><div class="gmail_quote">On Thu, Oct 21, 2010 at 21:21, Dr. Kumar Rajamani <span dir="ltr"><<a href="mailto:k_rajamani@cb.amrita.edu" target="_blank">k_rajamani@cb.amrita.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Simon<br>
I had a test image of a 3D stack with one image x*y*1<br>
<br>
This was reading inside VV as 2D image in first place<br>
<br>
Then other operations such as overlay was not possible<br>
<br>
</div>I think the error is due to the following function below<br>
<br>
If I made the line if (mVtkImages.size() >= 1)<br>
Then it works<br>
<br>
Warm Regards<br>
<font color="#888888">Kumar<br>
</font><div><div></div><div><br>
<br>
int vvImage::GetNumberOfDimensions() const<br>
{<br>
if (mVtkImages.size()) {<br>
int dimension = 2;<br>
int extent[6];<br>
mVtkImages[0]->GetWholeExtent(extent);<br>
if (extent[5] - extent[4] >= 1)<br>
dimension++;<br>
if (mVtkImages.size() >= 1)<br>
dimension++;<br>
return dimension;<br>
}<br>
return 0;<br>
}<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>David Sarrut, Phd<br>Chargé de recherche CNRS<br>Centre de lutte contre le cancer Léon Bérard<br>28 rue Laënnec, 69373 Lyon cedex 08<br>Laboratoire CREATIS-LRMN UMR CNRS 5220, Inserm U 630<br>
Tel : 04 78 78 51 51 / 06 74 72 05 42<br><a href="http://www.creatis.insa-lyon.fr/rio" target="_blank">http://www.creatis.insa-lyon.fr/rio</a><br>_________________________________<br> "2 + 2 = 5, for extremely large values of 2"<br>
_________________________________<br>
</div>