[Vv] Reg: vvimage reading one slice 3D

David Sarrut David.Sarrut at creatis.insa-lyon.fr
Fri Oct 22 10:49:33 CEST 2010


Hello Kumar,

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 ...

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.

Please tell us if it is now ok for you and be kind to report any newly
introduced bug with this attempt...

David
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 ;)
PS : I send the two images I used to test. Two different mhd headers (2D &
3D) and a single .raw.


On Thu, Oct 21, 2010 at 21:21, Dr. Kumar Rajamani
<k_rajamani at cb.amrita.edu>wrote:

> Hi Simon
> I had a test image of a 3D stack with one image x*y*1
>
> This was reading inside VV as 2D image in first place
>
> Then other operations such as overlay was not possible
>
> I think the error is due to the following function below
>
> If I made the line if (mVtkImages.size() >= 1)
> Then it works
>
> Warm Regards
> Kumar
>
>
> int vvImage::GetNumberOfDimensions() const
> {
>  if (mVtkImages.size()) {
>    int dimension = 2;
>    int extent[6];
>    mVtkImages[0]->GetWholeExtent(extent);
>    if (extent[5] - extent[4] >= 1)
>      dimension++;
>    if (mVtkImages.size() >= 1)
>      dimension++;
>    return dimension;
>  }
>  return 0;
> }
>
>


-- 
David Sarrut, Phd
Chargé de recherche CNRS
Centre de lutte contre le cancer Léon Bérard
28 rue Laënnec, 69373 Lyon cedex 08
Laboratoire CREATIS-LRMN UMR CNRS 5220, Inserm U 630
Tel : 04 78 78 51 51 / 06 74 72 05 42
http://www.creatis.insa-lyon.fr/rio
_________________________________
 "2 + 2 = 5,  for extremely large values of 2"
_________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20101022/0e762d62/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2D3D.tgz
Type: application/x-gzip
Size: 267203 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20101022/0e762d62/attachment.tgz>


More information about the vv mailing list