[vtkusers] 回复:RE: vtkimageactor's SetZSlice

455535440 455535440 at qq.com
Thu Dec 29 11:00:19 EST 2011


I used the method SetDisplayExtent(ext [0], ext [1], ext [2], ext [3],  z, z) as you said,it did worked! but there still have a problem,
 if the z in the method more than 10, the vtkimageactor can't show the picture,this is so strange,did any met it?
                                   yours 
                                     roy
  
  ------------------ 原始邮件 ------------------
  发件人: "Marcelino Rodriguez Cancio"<marcelinorc at uclv.edu.cu>;
 发送时间: 2011年12月27日(星期二) 凌晨1:16
 收件人: "455535440"<455535440 at qq.com>; 
 
 主题: RE: [vtkusers] vtkimageactor's SetZSlice

  
  
You must not get the Extent From the Actor->DisplayExtent but from the vtkImageData->GetWholeExtent() method instead.
 
 
 
Like this:
 
 
 
void SetZSlice(int z) 
 
{
 
 
 
vtkImageData * img = jpgreader-> GetOutputDataObject(0)
 
double * ext = img->GetWholeExtent();
 
this->SetDisplayExtent(ext [0], ext [1], ext [2], ext [3],  z, z);
 
 
 
}
 
 
 
Cheers
 
Marcelino
 
 
   
De: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] En nombre de 455535440
Enviado el: domingo, 25 de diciembre de 2011 10:30 a.m.
Para: vtkusers
Asunto: [vtkusers] vtkimageactor's SetZSlice


 
 
  
merry christmas everybody.

  
I met a problem of vtkimageactor,I used jpegreader to read 12 pictures ,then used vtkimageactor to show it,one of these jpegs was rendered.then i wanted to show another pictures ,So I called SetZSlice but it didn't work. I watch the souce of the method like below:

  
void SetZSlice(int z) 

  
{this->SetDisplayExtent(
    this->DisplayExtent[0], this->DisplayExtent[1],
    this->DisplayExtent[2], this->DisplayExtent[3], z, z);}

  
then I debug the program,the vtkimageactor's DisplayExtent is an array of 6 int ,valus -1,0,0,0,0,0, this is strange .Then I watch the vtkImageData which vtkimageactoe setinput,there is an arry named extent in it values 0 383 0 383 0 11, I think this means the picture data is saved,but why the method didn't work?

  
I google this problem and find some people met the same problem,but there is no solution. Anyone can help us?

 
 
  
 
 
- XIII Simposio Internacional sobre Pensamiento Latinoamericano, del 26 al 27 de junio de 2012. Universidad Central “Marta Abreu” de Las Villas, Santa Clara, Cuba. http://www.uclv.edu.cu/13simp-pensamiento-latinoamericano
-Universidad Central "Marta Abreu" de Las Villas. http://www.uclv.edu.cu
-Participe en Universidad 2012, del 13 al 17 de febrero de 2012. Habana.Cuba. http://www.congresouniversidad.cu
-Consulte la enciclopedia colaborativa cubana. http://www.ecured.cu/




 
 - XIII Simposio Internacional sobre Pensamiento Latinoamericano, del 26 al 27 de junio de 2012. Universidad Central “Marta Abreu” de Las Villas, Santa Clara, Cuba. http://www.uclv.edu.cu/13simp-pensamiento-latinoamericano
-Universidad Central "Marta Abreu" de Las Villas. http://www.uclv.edu.cu
-Participe en Universidad 2012, del 13 al 17 de febrero de 2012. Habana.Cuba. http://www.congresouniversidad.cu
-Consulte la enciclopedia colaborativa cubana. http://www.ecured.cu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111230/2ff7f2d0/attachment.htm>


More information about the vtkusers mailing list