[vtkusers] usage of vtkImageMapToWindowLevelColors

Frederik Van Broeckhoven silvester.the.8th at gmail.com
Thu Jun 23 11:34:42 EDT 2005


I know, but that's the problem.
I need my pipeline to perform this operation. It's some preprocessing
for the images from which i'm building a volume-rendering.

F.

On 6/23/05, Cuypers Wouter <Wouter.Cuypers at ua.ac.be> wrote:
> vtkImageViewer also supports these methods, you might use the viewer to learn the level and window parameters that give the best result.
> 
> ________________________________
> 
> Van: vtkusers-bounces+wouter.cuypers=ua.ac.be at vtk.org namens Frederik Van Broeckhoven
> Verzonden: do 6/23/2005 1:10
> Aan: vtkusers at vtk.org
> Onderwerp: [vtkusers] usage of vtkImageMapToWindowLevelColors
> 
> 
> 
> Hi,
> 
> I need a filter in my pipeline to adjust the colorwindow and -level of
> some input image(s).
> My first guess was to use the vtkImageMapToWindowLevelColors, but this
> doesn't give the desired result. Window and level get changed, but the
> resulting image is too dark.
> 
> Here's some code(JAVA) where I initialize the filter:
> 
> ... /* source has type vtkImageData */
> 
> // source has scalar type double
> source.Update();
> // source has scalar type unsigned short
> range = source.GetScalarRange();
> window = range[1] - range[0];
> level = range[0] + (window / 2.0);
> 
> windowLevelMapper = new vtkImageMapToWindowLevelColors();
> windowLevelMapper.SetOutputFormatToLuminance();
> windowLevelMapper.SetInput(source);
> 
> windowLevelMapper.SetWindow(window);
> windowLevelMapper.SetLevel(level);
> ...
> 
> * replacing SetOutputFormatToLuminance() by SetOutputFormatToRGB(),
> gives the same result.
> * using SetOutputFormatToLuminanceAlpha() gives th same result, but
> with green colors.
> * removing SetOutputFormatToLuminance() or replacing by
> SetOutputFormatToRGBA(), gives nothing (black image).
> 
> anybody an idea?
> 
> thx in advance
> S.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> 
>



More information about the vtkusers mailing list