<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hey Cory,<br>
    <br>
    I have some troubles combining vtkImageData with the vtkTable. I
    tried the following:<br>
    <br>
    vtkSmartPointer<vtkImageThreshold> threshold1 =<br>
            vtkSmartPointer<vtkImageThreshold>::New();<br>
    threshold1->SetInputData(con->GetOutput());<br>
    threshold1->ThresholdBetween(lower, upper);<br>
    threshold1->ReplaceInOn();<br>
    threshold1->SetInValue(CLASS_1_VALUE);<br>
    threshold1->Update();<br>
    <br>
    unsigned int numPoints =
    threshold1->GetOutput()->GetNumberOfPoints();<br>
        for (unsigned int dimension = 0; dimension < 3; dimension++)<br>
        {<br>
            std::stringstream colName;<br>
            colName << "dimension" << dimension;<br>
            VTK_PTR_CREATE(vtkIntArray, values);<br>
            values->SetNumberOfComponents(1);<br>
            values->SetName(colName.str().c_str());<br>
            values->SetNumberOfTuples(numPoints);<br>
    <br>
            for(unsigned int pt = 0; pt < numPoints; pt++)<br>
            {<br>
                double point[3];<br>
                double originalPoint[3];<br>
                threshold1->GetOutput()->GetPoint(pt, point);<br>
                data->GetPoint(pt, originalPoint);<br>
                values->SetValue(pt, originalPoint[dimension]);<br>
                bool lg2 = originalPoint[dimension] > lower
    && originalPoint[dimension] < upper;<br>
                if (lg2)<br>
                {<br>
                    cout << "original between, so " <<
    (unsigned int)point[dimension] << endl;<br>
                }<br>
                else<br>
                {<br>
                    cout << "mh " <<
    originalPoint[dimension] << [...] << endl;<br>
                }<br>
            }<br>
            table->AddColumn(values);<br>
        }<br>
    <br>
    Unfortunately, the outputs I get are pretty useless in my scenario:<br>
    <meta name="qrichtext" content="1">
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 279 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 280 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 281 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 282 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 283 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 284 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 285 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 286 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 287 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 288 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 289 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 290 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 291 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 292 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 293 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 294 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 295 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 296 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 297 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 298 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 299 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 300 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 301 lower 970 upper 990</span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#bbbbbb;">mh 302 lower 970 upper 990</span><!--EndFragment--></p>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
    These are just my dimensions, so it repeats the numbers 0 to 519.<br>
    <br>
    VTK_PTR_CREATE(type,name) is defined as vtkSmartPointer<type>
    name = vtkSmartPointer<type>::New();<br>
    <br>
    So obviously, this approach is wrong. The examples, given in the
    wiki, correspond to given data points, not image data. Can you help
    me? I think this class would be great as far as I can tell by using
    vtkChartXY for plotting a histogram.<br>
    <br>
    Greetings<br>
    Imre<br>
    <br>
    <div class="moz-cite-prefix">Am 06.12.2015 um 17:48 schrieb Imre
      Goretzki:<br>
    </div>
    <blockquote cite="mid:566466CE.6090405@gmail.com" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      No I have not. Thank you. If I am having troubles or if that is
      not the plot that I am looking for, I respond again.<br>
      <br>
      <div class="moz-cite-prefix">Am 06.12.2015 um 17:38 schrieb Cory
        Quammen:<br>
      </div>
      <blockquote
cite="mid:CAB5Fpx5dx6T+jiv9VJbUQLRigVT7UboaZ3ERyGKe8pSns9gfgQ@mail.gmail.com"
        type="cite">
        <div dir="ltr">Imre,
          <div><br>
          </div>
          <div>Have you looked at the charting API, e.g., vtkChartXYZ? I
            don't know if that does exactly what you want, but it may be
            more in line with what you are after.</div>
          <div><br>
          </div>
          <div>- Cory</div>
        </div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Sun, Dec 6, 2015 at 6:23 AM, Imre
            Goretzki <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:goretzki.imre@gmail.com" target="_blank">goretzki.imre@gmail.com</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"> Hey guys,<br>
                <br>
                here is a 2D example of what I wanted to do. I think
                data transformation would not be the correct way of
                doing this.
                <div>
                  <div class="h5"><br>
                    <br>
                    <br>
                    <div>Am 05.12.2015 um 09:35 schrieb Imre Goretzki:<br>
                    </div>
                    <blockquote type="cite"> Cory,<br>
                      <br>
                      is it possible to change the tick of the axes?
                      Right know using the transform filter is
                      equivalent to the second image. Unfortunately that
                      is not what I would like to have. I think the best
                      way to do this is to change to tick of the
                      Z-Dimension.<br>
                      <br>
                      The image has the dimensions 520x520x47. So the
                      tick for x and y is 1, for z it should be 47/520.
                      I don't want to change the data.<br>
                      <br>
                      Imre<br>
                      <br>
                      <div>Am 04.12.2015 um 20:56 schrieb Cory Quammen:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">Imre,
                          <div><br>
                          </div>
                          <div>Your best bet is probably to transform
                            the data itself rather than the user
                            transform of the actors.</div>
                          <div><br>
                          </div>
                          <div>vtkSmartPointer<vtkTransformFilter>
                            transformFilter =
                            vtkSmartPointer<vtkTransformFilter>::New();</div>
                          <div>transformFilter->SetTransform(axis);</div>
                          <div>transformFilter->SetInputData(<your
                            input data>);</div>
                          <div><br>
                          </div>
                          <div>HTH,</div>
                          <div>Cory</div>
                        </div>
                        <div class="gmail_extra"><br>
                          <div class="gmail_quote">On Fri, Dec 4, 2015
                            at 1:48 PM, Imre Goretzki <span dir="ltr"><<a
                                moz-do-not-send="true"
                                class="moz-txt-link-abbreviated"
                                href="mailto:goretzki.imre@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:goretzki.imre@gmail.com">goretzki.imre@gmail.com</a></a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex">I have data
                              like this:<br>
                              <a moz-do-not-send="true"
                                href="http://i.imgur.com/CR2O8Ik.png"
                                rel="noreferrer" target="_blank">http://i.imgur.com/CR2O8Ik.png</a><br>
                              and I would like to "stretch" the Z-axis
                              to get more like a cube visualization.<br>
                              <br>
                              I used vtkTransform to transform the axes,
                              but I would change the data if I do this.
                              I hope you understand what I want to do,
                              e.g. is there a possibility to change /
                              stretch the ticks of a specific axis.<br>
                              <br>
                              The vtkTransform plot stretches to much:<br>
                              <a moz-do-not-send="true"
                                href="http://i.imgur.com/DDUW91T.png"
                                rel="noreferrer" target="_blank">http://i.imgur.com/DDUW91T.png</a><br>
                              The data is deformed<br>
                              <br>
                              I use the vtkTransform like this:<br>
                              vtkSmartPointer<vtkTransform> axis =
vtkSmartPointer<vtkTransform>::New();<br>
                              axis->Scale(1,1,10);<br>
                              <br>
                              dataActor->SetUserTransform(axis);<br>
                              outlineActor->SetUserTransform(axis);<br>
                              <br>
                              I tried using the camera with the
                              vtkTransform, but the only thing I got
                              from there, was an empty image or I had to
                              zoom out greatly.<br>
                              <br>
                              For matlab reference, something like this:<br>
                              <a moz-do-not-send="true"
                                href="http://de.mathworks.com/help/matlab/ref/axis.html?refresh=true"
                                rel="noreferrer" target="_blank">http://de.mathworks.com/help/matlab/ref/axis.html?refresh=true</a><br>
                              <br>
                              Would be nice if you could help me<span><font
                                  color="#888888"><br>
                                  <br>
                                  Imre</font></span>
                              <div>
                                <div><br>
                                  <br>
                                  Am 03.12.2015 um 22:20 schrieb Imre
                                  Goretzki:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex"> Hey guys<br>
                                    <br>
                                    i'd like to ask you if there's a
                                    equivalent method for
                                    vtkRenderWindow for equalizing the
                                    axis, just like MATLABs axis equal.
                                    Could vtkAxesActor be helpful?<br>
                                    <br>
                                    I hope you can help<br>
                                    <br>
                                    Thanks<br>
                                    Imre<br>
                                    <br>
                                  </blockquote>
                                  <br>
_______________________________________________<br>
                                  Powered by <a moz-do-not-send="true"
                                    href="http://www.kitware.com"
                                    rel="noreferrer" target="_blank">www.kitware.com</a><br>
                                  <br>
                                  Visit other Kitware open-source
                                  projects at <a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                                  <br>
                                  Please keep messages on-topic and
                                  check the VTK FAQ at: <a
                                    moz-do-not-send="true"
                                    class="moz-txt-link-freetext"
                                    href="http://www.vtk.org/Wiki/VTK_FAQ"><a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a></a><br>
                                  <br>
                                  Search the list archives at: <a
                                    moz-do-not-send="true"
                                    class="moz-txt-link-freetext"
                                    href="http://markmail.org/search/?q=vtkusers"><a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a></a><br>
                                  <br>
                                  Follow this link to
                                  subscribe/unsubscribe:<br>
                                  <a moz-do-not-send="true"
                                    href="http://public.kitware.com/mailman/listinfo/vtkusers"
                                    rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                          <br>
                          <br clear="all">
                          <div><br>
                          </div>
                          -- <br>
                          <div>Cory Quammen<br>
                            R&D Engineer<br>
                            Kitware, Inc.</div>
                        </div>
                      </blockquote>
                      <br>
                    </blockquote>
                    <br>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">Cory Quammen<br>
            R&D Engineer<br>
            Kitware, Inc.</div>
        </div>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>