<div dir="ltr">Hi Andrew,<div><br></div><div>My best guess is that the internal points are there, but ParaView is only showing the surface.  From python you can call GetNumberOfPoints() on the data set to check if the number of points matches what you expect.</div><div><br></div><div> - David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 10:25 AM, Andrew Crozier <span dir="ltr"><<a href="mailto:andrew.crozier@medunigraz.at" target="_blank">andrew.crozier@medunigraz.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    I wrote it out with vtkUnstructuredGridWriter and loaded it up in
    Paraview. Showing it there with a 'Points' or '3D Glyphs'
    representation shows only vertices on the external surface of the
    specified region.<br>
    <br>
    (Python) code I used to generate:<br>
    <br>
    tf = vtk.vtkThreshold()<br>
    tf.SetInput(img)<br>
    tf.ThresholdBetween(1.5,2.5)<br>
    tf.Update()<br>
    op = tf.GetOutput()<br>
    <br>
    writer = vtk.vtkUnstructuredGridWriter()<br>
    writer.SetFileName('thresh.vtk')<br>
    writer.SetInput(op)<br>
    writer.Write()<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Andrew</font></span><div><div class="h5"><br>
    <br>
    <div>On 17/11/14 17:40, David Gobbi wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Andrew,
        <div><br>
        </div>
        <div>It should export all the points in the volume, as long as
          they are within the applied thresholds.  What is your evidence
          that it's only exporting the boundary?</div>
        <div><br>
        </div>
        <div> - David</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Nov 17, 2014 at 9:34 AM, Andrew
          Crozier <span dir="ltr"><<a href="mailto:andrew.crozier@medunigraz.at" target="_blank">andrew.crozier@medunigraz.at</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hi David,<br>
              <br>
              Thanks for the suggestion. I looked at the vtkThreshold
              filer, however it appears to export the boundary of the
              thresholded volume, whereas I require all points inside
              the volume. Have you any idea of how to achieve that?<br>
              <br>
              BW,<br>
              Andrew
              <div>
                <div><br>
                  <br>
                  <div>On 17/11/14 17:16, David Gobbi wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hi Andrew,
                      <div><br>
                      </div>
                      <div>The vtkThreshold filter will extract only the
                        cells with the desired</div>
                      <div>scalar values, and will output them as an
                        unstructured grid.  It</div>
                      <div>isn't exactly what you want because it
                        extracts cells, rather than</div>
                      <div>points, but it might be worth a shot.</div>
                      <div><br>
                      </div>
                      <div> - David</div>
                      <div>
                        <div class="gmail_extra"><br>
                          <div class="gmail_quote">On Mon, Nov 17, 2014
                            at 8:28 AM, Andrew Crozier <span dir="ltr"><<a href="mailto:andrew.crozier@medunigraz.at" target="_blank">andrew.crozier@medunigraz.at</a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
                              <br>
                              I am trying to evaluate the principal
                              components of a strucutre in a 3D volume
                              image, to determine its spatial alignment
                              for use in an automatic processing
                              pipeline.<br>
                              <br>
                              The input is a vtkImageData, with multiple
                              integer values (say, 0, 1, 2 and 3), and I
                              want to perform PCA on the positions of
                              all voxels with value 2, for example.<br>
                              <br>
                              I have looked at vtkPCAAnalysisFilter, and
                              this requires an input of vtkPointSet.
                              vtkImageDataToPointSet converts a
                              vtkImageData to a vtkStructuredGrid,
                              however I expect this to include all
                              points in the original image. At the
                              moment I seem to be missing some way of
                              filtering out the points other than those
                              of value 2.<br>
                              <br>
                              Any help provided for this would be
                              greatly appreciated!<br>
                              <br>
                              Best wishes,<br>
                              Andrew Crozier<br>
                              <br>
                            </blockquote>
                          </div>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
              <span><font color="#888888">
                  <div>-- <br>
                    <hr> <b>Andrew Crozier</b><br>
                    <a href="mailto:andrew.crozier@medunigraz.at" target="_blank">andrew.crozier@medunigraz.at</a><br>
                    <br>
                    Postdoctoral Researcher<br>
                    Institute for Biophysics<br>
                    Medical University of Graz</div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <div>-- <br>
      <hr>
      <b>Andrew Crozier</b><br>
      <a href="mailto:andrew.crozier@medunigraz.at" target="_blank">andrew.crozier@medunigraz.at</a><br>
      <br>
      Postdoctoral Researcher<br>
      Institute for Biophysics<br>
      Medical University of Graz</div>
  </div></div></div>

</blockquote></div><br></div>