<DIV>Hello</DIV>
<DIV>I have posted 4 months ago, a bug concerning vtkImageviewer2, the bug ID is 1641, I was wondering when will it be fixed</DIV>
<DIV>thanks</DIV>
<DIV>Lydia<BR><BR><B><I>lydia safid &lt;safid_lydia@yahoo.fr&gt;</I></B> a écrit :</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<DIV><BR><BR>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<DIV>
<DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<P>Hi Folks!</P>
<P>I already posted a mail concerning this problem but now I am quite sure that the problem is in the class vtkImageViewer2. This class cannot display images when either the width or the height exceeds 512!!</P>
<P>Below&nbsp;is my code, I tried to attach the&nbsp;images but it could not be posted by the mailing list</P>
<P>you will notice the following:</P>
<P>1. With vtkImageViewer2, the display is not corret (the second dimension of the image is 611)</P>
<P>2. If you use vtkImageViewer instead of vtkImageViewer2, it will properly..( Strange! isn't it?)</P>
<P>3. Another remark, if you replace i by 5 for example or any number less than dim[2], and if you set up a breakpoint after viewer-&gt;Render(), you will notive that the first display is done properly, then if you continue inside the "while", the same image will not be displayed properly...</P>
<P>Hope all these information will help&nbsp;you to help me because I spent so many time in debugging my program thinking that the bug was from me.... So, If you already experienced the problem, please let me know about it it is urgent</P>
<P>Thanks in advance</P><FONT color=#0000ff size=2>
<P>#include</FONT><FONT size=2> "vtkStructuredPointsReader.h"</P></FONT><FONT color=#0000ff size=2>
<P>#include</FONT><FONT size=2> "vtkStructuredPoints.h"</P></FONT><FONT color=#0000ff size=2>
<P>#include</FONT><FONT size=2> "vtkImageImport.h"</P></FONT><FONT color=#0000ff size=2>
<P>#include</FONT><FONT size=2> "vtkImageViewer.h"</P></FONT><FONT color=#0000ff size=2>
<P>#include</FONT><FONT size=2> "vtkImageViewer2.h"</FONT></P>
<P><FONT size=2></FONT>&nbsp;</P><FONT color=#0000ff size=2>
<P>void</FONT><FONT size=2> main ()</P>
<P>{</P>
<P>vtkStructuredPointsReader *reader=vtkStructuredPointsReader::New();</P>
<P>reader-&gt;SetFileName("C:/TEMP/MRI.vtk");</P>
<P>reader-&gt;Update();</P>
<P></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> dim[3]; </FONT><FONT color=#0000ff size=2>double</FONT><FONT size=2> spacing [3];</P>
<P>reader-&gt;GetOutput()-&gt;GetDimensions(dim);</P>
<P>reader-&gt;GetOutput()-&gt;GetSpacing(spacing);</P>
<P>vtkStructuredPoints *dcm_volume=vtkStructuredPoints::New();</P>
<P>dcm_volume-&gt;SetDimensions(dim[0],dim[1],dim[2]);</P>
<P>dcm_volume-&gt;SetScalarType(VTK_UNSIGNED_CHAR);</P>
<P>dcm_volume-&gt;SetNumberOfScalarComponents(1);</P>
<P>dcm_volume-&gt;AllocateScalars();</P>
<P>dcm_volume-&gt;DeepCopy(reader-&gt;GetOutput());</P>
<P>vtkImageViewer2 *viewer = vtkImageViewer2::New();</P></FONT><FONT color=#0000ff size=2>
<P>int</FONT><FONT size=2> i=0;</P></FONT><FONT color=#0000ff size=2>
<P>while</FONT><FONT size=2> (i&lt;dim[2])</P>
<P>{</P>
<P></FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> *vol1= </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2>[(dim[0]*dim[1])/</FONT><FONT color=#0000ff size=2>sizeof</FONT><FONT size=2>( </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2>)];</P>
<P>memmove(vol1, (</FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> *)dcm_volume-&gt;GetScalarPointer()+i*(dim[0]*dim[1]),dim[0]*dim[1]);</P>
<P></P>
<P>vtkImageImport *importer_pro=vtkImageImport::New();</P>
<P>importer_pro-&gt;SetWholeExtent(0,dim[0]-1,0,dim[1]-1,1,1);</P>
<P>importer_pro-&gt;SetDataExtent(0,dim[0]-1,0,dim[1]-1,1,1);</P>
<P>importer_pro-&gt;SetDataSpacing(1,1,1);</P>
<P>importer_pro-&gt;SetDataOrigin(0, 0,0);</P>
<P>importer_pro-&gt;SetDataScalarType(VTK_UNSIGNED_CHAR);</P>
<P>importer_pro-&gt;SetNumberOfScalarComponents(1);</P>
<P>importer_pro-&gt;SetImportVoidPointer((</FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> *) vol1);</P>
<P>importer_pro-&gt;Update();</P>
<P></P>
<P>viewer-&gt;SetSize(500,500);</P>
<P>viewer-&gt;SetInput(importer_pro-&gt;GetOutput() );</P>
<P>viewer-&gt;SetZSlice(1);</P>
<P>viewer-&gt;SetColorWindow(255);</P>
<P>viewer-&gt;SetColorLevel(127.5);</P>
<P>viewer-&gt;Render();</P>
<P>i++;</P>
<P></FONT><FONT color=#0000ff size=2>delete</FONT><FONT size=2> [] vol1;</P>
<P>importer_pro-&gt;Delete();</P></FONT>
<P><FONT size=2>}</FONT></P>
<P><FONT size=2>}</P></FONT></BLOCKQUOTE></DIV></DIV>
<P>
<HR SIZE=1>
Découvrez le nouveau Yahoo! Mail : <FONT color=red>250 Mo d'espace</FONT> de stockage pour vos mails !<BR><A href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=25917/*http://fr.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_250/default/*http://fr.promotions.yahoo.com/mail/creer28.html">Créez votre Yahoo! Mail</A><BR><BR>&gt; ATTACHMENT part 2 application/x-zip-compressed name=MRI.zip<BR></BLOCKQUOTE></DIV>
<P>
<HR SIZE=1>
Découvrez le nouveau Yahoo! Mail : <FONT color=red>250 Mo d'espace</FONT> de stockage pour vos mails !<BR><A href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=25917/*http://fr.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_250/default/*http://fr.promotions.yahoo.com/mail/creer28.html">Créez votre Yahoo! Mail</A>_______________________________________________<BR>This is the private VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>Follow this link to subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR></BLOCKQUOTE><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/yahoofr/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>