[ITK-users] Export specific frame/slice of multiframe dicom file: ExtractSliceImageFilter?

Marcos fotosentido at gmail.com
Tue Sep 1 03:45:00 EDT 2015


Hi,

the input of vtkJPEGWriter:

template<class T>

void Exporter::exportImage(QString fileName, QVTKWidget *widget)

{

vtkWindowToImageFilter* filter = vtkWindowToImageFilter::New();

filter->SetInput(widget->GetRenderWindow());


vtkSmartPointer<T> writer = vtkSmartPointer<T>::New();

writer->SetFileName(fileName.toStdString().c_str());

writer->SetInputConnection(filter->GetOutputPort());


writer->Write();

}


T can be an vtkJPEGWriter, vtkPNGWriter, etc.

I set the slice with vtkImageViewer2::GetSlice()

But this depends on the vtk renderwindow, and its size,...


That's why I need to do it with ITK, unless I can export the original
frame with VTK.


Thank you.


2015-09-01 1:16 GMT+02:00 Siavash Khallaghi <siavashk at ece.ubc.ca>:

> Hi Marcos,
>
> How do you set the input of your vtkJPEGWriter?
>
> Siavash
>
>
>
> --
> View this message in context:
> http://itk-users.7.n7.nabble.com/ITK-users-Export-specific-frame-slice-of-multiframe-dicom-file-ExtractSliceImageFilter-tp36081p36084.html
> Sent from the ITK - 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
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150901/45c6a25d/attachment.html>


More information about the Insight-users mailing list