<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Thanks again, David, have a great day!<br>
      <br>
      Best,<br>
      Weiguang<br>
      <br>
      On 29/10/2014 12:21 PM, David Gobbi wrote:<br>
    </div>
    <blockquote
cite="mid:CANwS1=HF=8=7Vb+ptBa_wAXYKJEgYMoEHO0NZjWG1p3skCEMGQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Weiguang,
        <div><br>
        </div>
        <div>There aren't any filters for combining vtkImageStencilData
          (there should be!), so instead you will need to use two
          vtkImageStencil filters in series: one for the first
          vtkImplicitFunctionToImageStencil output, and then another for
          the second.</div>
        <div><br>
        </div>
        <div> - David</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Oct 29, 2014 at 10:09 AM,
          Weiguang Guan <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:guanw@rhpcs.mcmaster.ca" target="_blank">guanw@rhpcs.mcmaster.ca</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div>Hi David,<br>
                <br>
                How to combine the outputs from two
                vtkImplicitFunctionToImageStencil instances as I need to
                use two spheres to define a shell? Thanks.<span class=""><br>
                  <br>
                  Best,<br>
                  Weiguang<br>
                  <br>
                  On 28/10/2014 5:20 PM, David Gobbi wrote:<br>
                </span></div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">Hi Weiguang,
                      <div><br>
                      </div>
                      <div>You definitely want to avoid using
                        vtkClipVolume before volume rendering, because
                        it produces vtkUnstructuredGrid data instead of
                        image data.</div>
                      <div><br>
                      </div>
                      <div>If you need a shell, you can use
                        vtkImageGaussianSource to create an image of a
                        Gaussian, and then threshold it with lower and
                        upper thresholds to create a shell.  A Gaussian
                        has radial symmetry, so thresholding will create
                        a binary image of a spherical shell.   You can
                        then multiply this shell by your image.</div>
                      <div><br>
                      </div>
                      <div>Or, instead of using vtkClipVolume, you can
                        use vtkImplicitFunctionToImageStencil with
                        vtkImageStencil.  The output will be a
                        vtkImageData.  Or, for greater efficiency, use
                        vtkROIStencilSource to create a spherical
                        (ellipsoidal) stencil for vtkImageStencil.</div>
                      <div><br>
                      </div>
                      <div>Or, possibly the easiest "quick fix" would be
                        to convert the vtkUnstructuredGrid that you
                        already have into a vtkImageData by using
                        vtkProbeFilter.  The vtkProbeFilter is a generic
                        filter for copying (or interpolating) scalar
                        data from one kind of data set onto another kind
                        of data set.</div>
                      <div><br>
                      </div>
                      <div> - David</div>
                      <div><br>
                      </div>
                      <div><br>
                        <div class="gmail_extra"><br>
                          <div class="gmail_quote">On Tue, Oct 28, 2014
                            at 2:23 PM, Weiguang Guan <span dir="ltr"><<a
                                moz-do-not-send="true"
                                href="mailto:guanw@rhpcs.mcmaster.ca"
                                target="_blank">guanw@rhpcs.mcmaster.ca</a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex">Hi VTK users,<br>
                              <br>
                              I want to volume render (using 3D texture
                              mapper) a shell with specified thickness.
                              Previously, I used vtkClipVolume twice,
                              one clipped away the inner portion of a
                              regular volume data, the other clipped
                              away outer portion. The only problem is
                              slow rendering speed because the resultant
                              data is no longer a regular volume data.<br>
                              <br>
                              Can anyone suggest a better solution?
                              Would it be faster if I used several
                              spheres with texture mapped on them and
                              alpha-blending? Thanks.<br>
                              <br>
                              Best,<br>
                              Weiguang<br>
                            </blockquote>
                          </div>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>