[vtkusers] test if vtkImageData is blank
Karthik Krishnan
karthik.krishnan at kitware.com
Sun Dec 26 13:15:09 EST 2010
GetScalarRange will re-compute the scalar range only if the image has been
modified. It has time stamps internally to avoid re-computing the scalar
range during every call to GetScalarRange().
The method SetScalarComponentFromDouble does not change the MTime of the
image for efficiency.
Invoke Modified() on the image and then invoke GetScalarRange() and you
should see it update.
--
karthik
On Sun, Dec 26, 2010 at 11:19 PM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:
> I have no idea on the expected behavior... And I'm not much familiar
> with imageData...
>
> Sorry,
>
> Seb
>
> On Sun, Dec 26, 2010 at 6:27 PM, Jonathan Morra <jonmorra at gmail.com>
> wrote:
> > This would appear to work, but after
> > calling .SetScalarComponentFromDouble(x, y, z, 0, 1) the
> > image.GetScalarRange() still returns [0, 0] which, I would assume, it
> > shouldn't. Am I doing something wrong?
> >
> > On Sun, Dec 26, 2010 at 8:47 AM, Sebastien Jourdain
> > <sebastien.jourdain at kitware.com> wrote:
> >>
> >> If you have a scalar range on the data array and if the min/max are
> >> equal to 0, you are done...
> >>
> >> Seb
> >>
> >> On Mon, Dec 20, 2010 at 6:15 PM, Jonathan Morra <jonmorra at gmail.com>
> >> wrote:
> >> > Is there a way to quickly tell if a vtkImageData is blank (contains
> all
> >> > 0's)? I can't iterate the pixels cause I'm in Java and that's too
> slow.
> >> > _______________________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Please keep messages on-topic and check the VTK FAQ at:
> >> > http://www.vtk.org/Wiki/VTK_FAQ
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >> >
> >
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101226/bbcb55c3/attachment.htm>
More information about the vtkusers
mailing list