<div class="gmail_quote">I wanted them to be displayed side by side.<div>But please do throw some light on how it can be done in the other two ways as well.. It'll help in the future for my project.</div><div>Thank you in advance.<div>
<div></div><div class="h5"><br><br><div class="gmail_quote">
On Tue, Feb 22, 2011 at 4:59 AM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Niha,<br>
<br>
Do you want to display these two images<br>
<br>
A) Side by Side ?<br>
B) Overlapping with different color channel ?<br>
C) Fused by using Alpha-Blending ? (e.g. transparency) ?<br>
<br>
<br>
Luis<br>
<br>
<br>
------------------------------------<br>
<div><div></div><div>On Mon, Feb 21, 2011 at 5:45 AM, Niha G Beig <<a href="mailto:niha.beig@gmail.com" target="_blank">niha.beig@gmail.com</a>> wrote:<br>
> Hi Luis,<br>
> Thank you for replying to my previous post. It is much appreciated.<br>
> I'm working on Hippocampus Brain Segmentation using ITK and VTK. I'm new to<br>
> these tools and I'm still trying to find my way through it.<br>
><br>
> Now, I have been working with the second manual which tells about ITK+VTK. I<br>
> want to know how we can display both the original image and smoothened image<br>
> together in one VTK window. Is it possible?<br>
> The code builds without any errors but I must going terribly wrong with<br>
> my understanding of the concepts because only one image is being displayed..<br>
> #include "itkImage.h"<br>
> #include "itkImageFileReader.h"<br>
> #include "itkImageToVTKImageFilter.h"<br>
> #include "vtkImageViewer.h"<br>
> #include "vtkRenderWindowInteractor.h"<br>
> #include "itkCurvatureFlowImageFilter.h"<br>
> int main(int argc, char **argv)<br>
> {<br>
> typedef itk::Image<unsigned short,2>ImageType;<br>
> typedef itk::ImageFileReader<ImageType>ReaderType;<br>
> typedef itk::ImageToVTKImageFilter<ImageType>ConnectorType;<br>
> typedef<br>
> itk::CurvatureFlowImageFilter<ImageType,ImageType>SmoothingFilterType;<br>
> ReaderType::Pointer reader=ReaderType::New();<br>
> ConnectorType::Pointer connector=ConnectorType::New();<br>
> SmoothingFilterType::Pointer smoother= SmoothingFilterType::New();<br>
> reader->SetFileName(argv[1]);<br>
> connector->SetInput(reader->GetOutput());<br>
> smoother->SetNumberOfIterations(7);<br>
> smoother->SetTimeStep(0.2);<br>
> vtkImageViewer * viewer= vtkImageViewer::New();<br>
> vtkRenderWindowInteractor * renderWindowInteractor=<br>
> vtkRenderWindowInteractor::New();<br>
> viewer->SetupInteractor(renderWindowInteractor);<br>
> viewer->SetInput(connector->GetOutput());<br>
> viewer->Render();<br>
> viewer->SetColorWindow(255);<br>
> viewer->SetColorLevel(128);<br>
> renderWindowInteractor->Start();<br>
> smoother->SetInput(reader->GetOutput());<br>
> viewer->SetupInteractor(renderWindowInteractor);<br>
> viewer->SetInput(connector->GetOutput());<br>
> viewer->Render();<br>
> viewer->SetColorWindow(255);<br>
> viewer->SetColorLevel(128);<br>
> renderWindowInteractor->Start();<br>
> return 0;<br>
> }<br>
> Looking forward to hear from you.<br>
> Regards,<br>
> Niha<br>
> On Sun, Feb 20, 2011 at 3:30 AM, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>><br>
> wrote:<br>
>><br>
>> Hi Niha,<br>
>><br>
>> You will find the executable in the directory:<br>
>><br>
>> ITK_BINARY_DIR/Release/bin<br>
>><br>
>> or<br>
>><br>
>> ITK_BINARY_DIR/Debug/bin<br>
>><br>
>><br>
>> Depending on the compilation mode that you used (Debug/Release)<br>
>><br>
>><br>
>> Where "ITK_BINARY_DIR" is the directory where you compiled your project.<br>
>><br>
>><br>
>> Note that you can also simply use the "search" function in Windows<br>
>> Explorer,<br>
>><br>
>> or<br>
>><br>
>> you can also, in Visual Studio, right click on the name of the executable<br>
>> project, select "properties", select "configuration properties" select<br>
>> "General" and look at the field "Output Directory".<br>
>><br>
>><br>
>><br>
>> Luis<br>
>><br>
>><br>
>><br>
>> --------------------------------------------------------------<br>
>> On Sat, Feb 19, 2011 at 3:17 AM, Niha <<a href="mailto:niha.beig@gmail.com" target="_blank">niha.beig@gmail.com</a>> wrote:<br>
>> > Erik Türke <erik_tuerke@...> writes:<br>
>> ><br>
>> >><br>
>> >><br>
>> >> Hello!Well, i wanted to work through the "GettingStarted-II.pdf" from<br>
>> >> the<br>
>> > <a href="http://itk.org" target="_blank">itk.org</a> website, to check out the VTK, but i have the following<br>
>> > problem.Visual<br>
>> > Studio C++ 9 is compiling my project without any error. But i cant find<br>
>> > any<br>
>> > executable file in the bin directory.CMakeLists.txt<br>
>> > contains:PROJECT(myProject)FIND_PACKAGE ( ITK)IF ( ITK_FOUND)<br>
>> > INCLUDE(<br>
>> > ${USE_ITK_FILE} )ENDIF( ITK_FOUND)FIND_PACKAGE ( VTK)IF (<br>
>> > VTK_FOUND)INCLUDE(<br>
>> > ${USE_VTK_FILE} )ENDIF(<br>
>> > VTK_FOUND)INCLUDE_DIRECTORIES(${myProject_SOURCE_DIR})ADD_EXECUTABLE(<br>
>> > myProject<br>
>> > myProject.cxx)TARGET_LINK_LIBRARIES (<br>
>> ><br>
>> > myProjectITKBasicFiltersITKCommonITKIOvtkRenderingvtkGraphicsvtkHybridvtkImaging<br>
>> > vtkIOvtkFilteringvtkCommon)and myProject.cxx contains:#include<br>
>> > "itkImage.h"#include "itkImageFileReader.h"#include<br>
>> > "itkImageToVTKImageFilter.h"#include "vtkImageViewer.h"#include<br>
>> > "vtkRenderWindowInteractor.h"intmain( intargc, char **argv) { typedef<br>
>> > itk::Image<unsigned short,2> ImageType; typedef<br>
>> > itk::ImageFileReader<ImageType> ReaderType; typedef<br>
>> > itk::ImageToVTKImageFilter<ImageType> ConnectorType;<br>
>> > ReaderType::Pointerreader= ReaderType::New();<br>
>> > ConnectorType::Pointerconnector= ConnectorType::New();<br>
>> > reader->SetFileName(<br>
>> > argv[1]); connector->SetInput( reader->GetOutput() );<br>
>> > vtkImageViewer*<br>
>> > viewer= vtkImageViewer::New(); vtkRenderWindowInteractor*<br>
>> > renderWindowInteractor= vtkRenderWindowInteractor::New(); viewer-<br>
>> >>SetupInteractor( renderWindowInteractor); viewer->SetInput(<br>
>> >> connector-<br>
>> >>GetOutput() ); viewer->Render(); viewer->SetColorWindow( 255);<br>
>> >> viewer-<br>
>> >>SetColorLevel( 128); renderWindowInteractor->Start(); return<br>
>> >> 0;}Creating<br>
>> > an only ITK project works without any problem.Someone has an<br>
>> > idea??Thanks for<br>
>> > your help.Trete mit Deinem inneren Athleten in Verbindung. Beantworte<br>
>> > die<br>
>> > Fragen!<br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> Insight-users mailing list<br>
>> >> Insight-users@...<br>
>> >> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> >><br>
>> ><br>
>> > I'm facing the same problem now. Did you figure out how its done?<br>
>> > Regards,<br>
>> > Niha<br>
>> ><br>
>> ><br>
>> > _____________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Kitware offers ITK Training Courses, for more information visit:<br>
>> > <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the ITK FAQ at:<br>
>> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> ><br>
><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br>Niha<br><br></div></div>