<DIV>
<DIV>hi,</DIV>
<DIV> </DIV>
<DIV>thanks for your help</DIV>
<DIV> </DIV>
<DIV>can you tell me if this part of code is right or not </DIV>
<DIV> i have wrote this :</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>////////////////////********************** constructImageData***************/////////////////////////////</DIV>
<DIV>void TimacBase::constructImageData(CImageBoxFL *img_box)<BR>{</DIV>
<DIV> imageData->SetScalarTypeToUnsignedChar();<BR> imageData->SetNumberOfScalarComponents(3);<BR> imageData->SetDimensions(16, 16, 16);<BR> imageData->AllocateScalars();</DIV>
<DIV> int i = 0;<BR> int j = 0;<BR> unsigned char r = 0;<BR> unsigned char g = 0;<BR> unsigned char b = 0;<BR> unsigned char *data = (unsigned char *) imageData->GetScalarPointer();</DIV>
<DIV> int k = 0;<BR> for (k= 0; k<16; ++k) <BR> {<BR> data=img_box->tab[k].imgAff->data; // tab is an array og images <BR> }<BR>} <BR><BR><B><I>David Cole <david.cole@kitware.com></I></B> a écrit :</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">If you need a 3d volume of bitmaps that are all the same x,y size, just do the same thing, but add an iteration over the z-dimension. The vtkImageData object supports 3 dimensions. Then, for each distinct value of z, you'll be jamming a separate bitmap into a given z-slice of the vtkImageData.<BR><BR>In the example, change the SetDimensions call to include more than one z value:<BR> imageData->SetDimensions(16, 16, <B>16</B>);<BR><BR>Then add another loop to fill in the z data:<BR> int k = 0;<BR> for (k= 0; k<16; ++k) // as outer loop; i and j loops in here; conecptually, first slice filled is z=0, next z=1 and so on...<BR><BR>Then simply use the imageData object as the input to your algorithm, just like you would have used the output of the BMP reader...<BR><BR><BR>David<BR><BR><BR>
<BLOCKQUOTE cite=mid20050609174215.91108.qmail@web26403.mail.ukl.yahoo.com type="cite">
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"> </BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE><BR><BR><B><I>David Cole <david.cole@kitware.com></I></B> a écrit :
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">If you need a 3d volume of bitmaps that are all the same x,y size, just do the same thing, but add an iteration over the z-dimension. The vtkImageData object supports 3 dimensions. Then, for each distinct value of z, you'll be jamming a separate bitmap into a given z-slice of the vtkImageData.<BR><BR>In the example, change the SetDimensions call to include more than one z value:<BR> imageData->SetDimensions(16, 16, <B>16</B>);<BR><BR>Then add another loop to fill in the z data:<BR> int k = 0;<BR> for (k= 0; k<16; ++k) // as outer loop; i and j loops in here; conecptually, first slice filled is z=0, next z=1 and so on...<BR><BR>Then simply use the imageData object as the input to your algorithm, just like you would have used the output of the BMP reader...<BR><BR><BR>David<BR><BR><BR></BLOCKQUOTE></DIV><p>
                <hr size=1>
<b><font color=#FF0000>Appel audio GRATUIT</font> partout dans le monde</b> avec le nouveau Yahoo! Messenger<br>
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>