[Insight-users] Reading DICOM set and writing jpeg

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Mar 24 13:57:23 EDT 2009


On Tue, Mar 24, 2009 at 6:54 PM, Eduardo - LNCC <camargo at lncc.br> wrote:
> Hi, Mathieu
>
> Is that:
>
>   ImageType2D::Pointer image = ImageType2D::New();
>   image = ExtractFilter->GetOutput();
>
>   typedef itk::MinimumMaximumImageCalculator< ImageType2D > calculatorType;
>   calculatorType::Pointer calculator = calculatorType::New();
>   calculator->SetImage(image);
>   calculator->Compute();
>
>   double min, max;
>   min = calculator->GetMinimum();
>   max = calculator->GetMaximum();
>
>   RescalerType::Pointer rescaleFilter = RescalerType::New();
>   rescaleFilter->SetOutputMinimum( min );
>   rescaleFilter->SetOutputMaximum( max );
>   rescaleFilter->SetInput( ExtractFilter->GetOutput() );
>

Yup, that should work. This is the poor-man histogram algorithm. You
should consider the case where 90% of your data is located at one end
of the scalar range and 10% at the other end ...

2cts
-- 
Mathieu


More information about the Insight-users mailing list