[vtkusers] About Volume Rendering in vtkNightly

Lisa S. Avila lisa.avila at kitware.com
Wed Oct 31 01:51:22 EST 2001


Hello Shade,

Why are you performing an image reslice to rotate your data? There is an image flip filter than can flip your data around if your read it in with the wrong orientation - I think it is probably a bit more efficient than the generic reslice. Otherwise, you should simply rotate your camera around to view it from another angle.

One thing you can do to find out if your reslice is producing data is to do an update then get the scalar range to find out if there is any data in the volume.

Lisa

  ----- Original Message ----- 
  From: Shade 
  To: Lisa S. Avila ; vtkusers at public.kitware.com 
  Sent: Monday, October 29, 2001 8:48 AM
  Subject: Re: [vtkusers] About Volume Rendering in vtkNightly


  Hello Lisa,

      Thank you for your help.
      I don't use the abstract superclass Mapper directly, I use the 
  vtkVolumeTextureMapper2D and vtkVolumeProMapper instead. Today I debug 
  my application again and found the following reason.
      Following is my sample code:
  ======================================================
   vtkStructurePoints pStructuredPointsData = vtkStructurePoints::New();
  ////////////////////////////////////////////////////////////////////
   Read the volume data
  ////////////////////////////////////////////////////////////////////
   vtkTransform *pTransform = NULL;
   pTransform = vtkTransform::New();
  // the next red color sentence is important
   pTransform->RotateX(90);

   // reslice the volume data to rotate it.
   vtkImageReslice *pImageReslice = vtkImageReslice::New();
   pImageReslice->SetInput(pStructuredPointsData);
   pImageReslice->SetResliceTransform(pTransform);

  // Get the volume data after reslice
   vtkImageData *pImageData = m_pImageReslice->GetOutput();
  ////////////////////////////////////////////////////////////////////
    Then set the pImageData as the Volume Mapper(vtkVolumeProMapper, 
  vtkVolumeTextureMapper2D, etc.) input to render it.
  ////////////////////////////////////////////////////////////////////
  ==================================================================
   
      But strange phenomena appear. With the above red color sentence, 
  then the render will display nothing what I mentioned in the last mail; 
  without the red color sentence then everything is OK.
      I don't know whether the vtkTransform has problem or the 
  vtkImageReslice has problem or my rendering methos has problem. 
      Can you give me some advice? Thank you.
   
  Yours,
  Shade
   
  ----- Original Message ----- 
  From: "Lisa S. Avila" <lisa.avila at kitware.com>
  To: "Shade" <shade_cn at yahoo.com>; <vtkusers at public.kitware.com>
  Sent: Monday, October 29, 2001 2:06 PM
  Subject: Re: [vtkusers] About Volume Rendering in vtkNightly


  > Hello Shade,
  > 
  > What mapper are you using? You indicate vtkVolumeMapper in your email, but
  > it is not valid (hopefully not possible!) to use a vtkVolumeMapper for
  > rendering - it is an abstract superclass.
  > 
  > Lisa
  > 
  > ----- Original Message -----
  > From: "Shade" <shade_cn at yahoo.com>
  > To: <vtkusers at public.kitware.com>
  > Sent: Friday, October 26, 2001 10:58 PM
  > Subject: [vtkusers] About Volume Rendering in vtkNightly
  > 
  > 
  > > Dear VTK Users,
  > >
  > >     I download the vtk nightly version of 2001/10/25 and
  > > 2001/10/26, but I can't render anything with Volume Mapper,it
  > > seems the lookup table has no effect to the volume, all the
  > > volume cell color is the background color, so in the render
  > > window, it seems there is nothing. If I use the VTK3.2
  > > Official Release, it is no problem. I can't find the reason,
  > > who can give me some hints, thanks a lot.
  > >
  > > Best Regards,
  > > Shade
  > >
  > >
  > > _______________________________________________
  > > This is the private VTK discussion list.
  > > Please keep messages on-topic. Check the FAQ at:
  > <http://public.kitware.com/cgi-bin/vtkfaq>
  > > Follow this link to subscribe/unsubscribe:
  > > http://public.kitware.com/mailman/listinfo/vtkusers
  > 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20011031/6b7e7474/attachment.htm>


More information about the vtkusers mailing list