[vtkusers] Color invertion for volume Data

Cory Quammen cquammen at cs.unc.edu
Fri Mar 5 11:13:10 EST 2010


Those lines affect only the data values in your image and will not
cause a crash.

The culprit is more likely that somehow your viewer is making an
illegal memory access error after changing the slice number. What are
you using for your slice viewer? Can you post the relavent parts of
your code? Also post any error messages you see from VTK.

Cory

On Fri, Mar 5, 2010 at 9:51 AM, circass <circass at gmail.com> wrote:
>
> i thought the same thing until i saw my program crashes :)
> i dont know the reason but when i use imageshiftscale and after that set the
> slice number of my viewer, it crashes. i think the reason can be the range
> or something like that.
>
> these are my old codes.
>
>        inverter->SetShift(-255);
>        inverter->SetScale(-1);
>
> with this code i could make the color inversion. i think these lines must be
> changed properly for 3d.
>
>
> Cory Quammen wrote:
>>
>> Circass,
>>
>> vtkImageShiftScale should work fine on 3D images without you having to
>> do anything special.
>>
>> Cory
>>
>> On Fri, Mar 5, 2010 at 8:43 AM, circass <circass at gmail.com> wrote:
>>>
>>> Hi my friends,
>>> i am using vtkImageShiftScale for inverting colors of 2d grayscale
>>> imagedata. but i want to use it for my 3D imagedata too. I couldnt figure
>>> a
>>> way out for making it.
>>> How can i do this ?
>>> Thanx Circass
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Color-invertion-for-volume-Data-tp27794005p27794005.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> --
>> Cory Quammen
>> Center for Computer Integrated Systems for Microscopy and Manipulation
>> (CISMM)
>> Department of Computer Science
>> University of North Carolina at Chapel Hill
>> http://www.cs.unc.edu/~cquammen
>> _______________________________________________
>> 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
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Color-invertion-for-volume-Data-tp27794005p27794895.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
>



-- 
Cory Quammen
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen



More information about the vtkusers mailing list