[ITK-users] QVtkWidget beginner questions

Ibraheem ibr_ex at yahoo.com
Thu Sep 1 04:20:24 EDT 2016


Many thanks Matt for your response and answers. 

Matt McCormick-3 wrote
>>   1- Is there a way to filter and write all the images at once instead of
>> using the for loop?
> To write to an image series in general, there is an
> itk::ImageSeriesWriter.

I tried this:
          reader->SetFileNames(inputNames->GetInputFileNames() ); // get all
slices
	  reader->Update();
	  // filtering : get threshold
          filterThresh->SetInput( reader->GetOutput() );
	  QString thVals=ui->ThVal->text();
	  int ut= thVals.toInt() ;
 	  filterThresh->ThresholdAbove(ut);
	  filterThresh->SetOutsideValue(0);
          filterThresh->Update();	
	  // Convert to VTK image using ImageToVTKImageFilter
	   vtkImgF->SetInput(filterThresh->GetOutput (sliceID));
but it does not work. With adding sliceID the program crash. Without it, I
get only the first slice. How can i get a specific slice from the filter
output?


Matt McCormick-3 wrote
>>   2- Writing the way I did make the output volume lost some origin
>> information i.e value, 0,0 . What did I do wrong?
> Writing DICOMs (correctly) is currently a very tricky endeavour. There
> are currently some experiments underway to make this easier. However,
> until that time, it is recommended to use another format, like
> MetaImage, for writing files.

I will try this later.


Matt McCormick-3 wrote
>>   3- I read some posts about using QVtkWidget2 and  QVtkWidget3 but I
>> couldn't find them in my vtk build, is there some options I missed when I
>> built vtk?
>>   4- How can I display a specific plane instead of the axial slices e.g.
>> display a coronal slice.
>>   5- How can I get the voxel information when I point in the QVTkWidget?
>> I
>> am not sure if the mapping I used is correct.
> These questions are welcome, but the VTK mailing list is a better
> place to discuss these issues.

You are right. About question four, isn't it possible to create an itk image
from a collected voxels (this is the part I don't know) then convert it to
vtk image like I did in the example?

Best regards!




--
View this message in context: http://itk-users.7.n7.nabble.com/QVtkWidget-beginner-questions-tp37451p37456.html
Sent from the ITK - Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list