<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hello Anybody ????<br><br> Please advise.<br><br>Thank you,<br>Emma<br><br> Hello All,<br><br> I am using itk::ShapeLabelObject and it currently sorts the labels based on <br>the size of the object. Probably has an in-built call to <br>itk::relablComponentFilter that does that. Does anyone know how to turn off the <br>sorting. I would like the objects to be displayed as they come. Like in Matlab, <br>it based on Row and columns position of the object. Is it possible to do this ? <br>If so, please enlighten me as well.<br><br>Thank you,<br>Emma<br> <br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma"
size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> "insight-users-request@itk.org" <insight-users-request@itk.org><br><b><span style="font-weight: bold;">To:</span></b> insight-users@itk.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, August 9, 2010 6:02:50 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Insight-users Digest, Vol 76, Issue 22<br></font><br>
Send Insight-users mailing list submissions to<br> <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span> <a target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></span><br>or, via email, send a message with subject or body 'help' to<br> <a ymailto="mailto:insight-users-request@itk.org" href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a><br><br>You can reach the person managing the list at<br> <a ymailto="mailto:insight-users-owner@itk.org" href="mailto:insight-users-owner@itk.org">insight-users-owner@itk.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Insight-users digest..."<br><br><br>Today's
Topics:<br><br> 1. itkShapeLabelObject sorts object by size (Emma Ryan)<br> 2. Re: Problem with passing images to functions (Sergio Vera)<br> 3. What are the differences between GetLargestPossibleRegion and<br> GetRequestedRegion? (Guang Yang)<br> 4. Re: FFTImageFilter (Ming Chao)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sun, 8 Aug 2010 23:20:34 -0700 (PDT)<br>From: Emma Ryan <<a ymailto="mailto:eryanvtk@yahoo.com" href="mailto:eryanvtk@yahoo.com">eryanvtk@yahoo.com</a>><br>Subject: [Insight-users] itkShapeLabelObject sorts object by size<br>To: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Message-ID: <<a ymailto="mailto:186154.78823.qm@web57905.mail.re3.yahoo.com"
href="mailto:186154.78823.qm@web57905.mail.re3.yahoo.com">186154.78823.qm@web57905.mail.re3.yahoo.com</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>Hello All,<br><br> I am using itk::ShapeLabelObject and it currently sorts the labels based on <br>the size of the object. Probably has an in-built call to <br>itk::relablComponentFilter that does that. Does anyone know how to turn off the <br>sorting. I would like the objects to be displayed as they come. Like in Matlab, <br>it based on Row and columns position of the object. Is it possible to do this ? <br>If so, please enlighten me as well.<br><br>Thank you,<br>Emma<br><br><br><br> <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank"
href="http://www.itk.org/pipermail/insight-users/attachments/20100808/52a3507e/attachment-0001.htm">http://www.itk.org/pipermail/insight-users/attachments/20100808/52a3507e/attachment-0001.htm</a>></span><br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 9 Aug 2010 10:34:26 +0200<br>From: Sergio Vera <<a ymailto="mailto:sergio.vera@alma3d.com" href="mailto:sergio.vera@alma3d.com">sergio.vera@alma3d.com</a>><br>Subject: Re: [Insight-users] Problem with passing images to functions<br>To: D?enan Zuki? <<a ymailto="mailto:dzenanz@gmail.com" href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>><br>Cc: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>, habibbaluwala2010 <<a ymailto="mailto:habibbaluwala@gmail.com" href="mailto:habibbaluwala@gmail.com">habibbaluwala@gmail.com</a>><br>Message-ID:<br> <AANLkTi=<a
ymailto="mailto:n2LpfFBOT4bbSsw3bP9NY8ML5oA0RFv309vSb@mail.gmail.com" href="mailto:n2LpfFBOT4bbSsw3bP9NY8ML5oA0RFv309vSb@mail.gmail.com">n2LpfFBOT4bbSsw3bP9NY8ML5oA0RFv309vSb@mail.gmail.com</a>><br>Content-Type: text/plain; charset="utf-8"<br><br>Following advices from Luis Iba?ez in a previous mail of the list, we now<br>use the following rules:<br><br>const ITKImgType *ImgIn when images are input to a method and<br><br>ITKImgType::Pointer &ImgOut when the image will be created inside the<br>function<br><br>regards<br><br>2010/8/6 D?enan Zuki? <<a ymailto="mailto:dzenanz@gmail.com" href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>><br><br>> Use ImageType::Pointer. Here is an example:<br>><br>> void calc2DJointHistogram(VisualizingImageType::Pointer x,<br>> VisualizingImageType::Pointer y, std::string savefilename)<br>> {<br>> ...<br>> }<br>><br>> //calling it<br>> VisualizingImageType::Pointer
lVis, hVis;<br>> ...<br>> hVis=hReader->GetOutput();<br>> calc2DJointHistogram(lVis, hVis, fnNoExt+"_LH.png");<br>><br>> D?enan<br>><br>> On Fri, Aug 6, 2010 at 15:32, habibbaluwala2010 <<a ymailto="mailto:habibbaluwala@gmail.com" href="mailto:habibbaluwala@gmail.com">habibbaluwala@gmail.com</a>>wrote:<br>><br>>><br>>> Hi Everyone,<br>>> I am a biot confused on how can i pass an image with smart<br>>> pointers to an outside function . I basically need this to avoid<br>>> reproducing<br>>> the code again and again and also to avoid composite filters. It would be<br>>> very helpful if you can provide an example which does the job!!! Anyways<br>>> looking forward to your replies.<br>>> --<br>>> View this message in context:<br><span>>> <a target="_blank"
href="http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29356451.html">http://old.nabble.com/Problem-with-passing-images-to-functions-tp29356451p29356451.html</a></span><br>>> Sent from the ITK - Users mailing list archive at <a target="_blank" href="http://Nabble.com">Nabble.com</a>.<br>>><br>>> _____________________________________<br>>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>>><br>>> Visit other Kitware open-source projects at<br><span>>> <a target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br>>><br>>> Kitware offers ITK Training Courses, for more information visit:<br><span>>> <a target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a></span><br>>><br>>> Please
keep messages on-topic and check the ITK FAQ at:<br><span>>> <a target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><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><span>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a></span><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>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4? 1?<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a target="_blank" href="http://www.alma3d.com">www.alma3d.com</a><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank"
href="http://www.itk.org/pipermail/insight-users/attachments/20100809/ec530d11/attachment-0001.htm">http://www.itk.org/pipermail/insight-users/attachments/20100809/ec530d11/attachment-0001.htm</a>></span><br><br>------------------------------<br><br>Message: 3<br>Date: Mon, 9 Aug 2010 11:00:37 +0100<br>From: Guang Yang <<a ymailto="mailto:samggyy@gmail.com" href="mailto:samggyy@gmail.com">samggyy@gmail.com</a>><br>Subject: [Insight-users] What are the differences between<br> GetLargestPossibleRegion and GetRequestedRegion?<br>To: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Message-ID:<br> <AANLkTin7j=x55s2Gau6J1GAfmGjj1K0FwzMSozMEwwH=@mail.gmail.com><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi there,<br><br>I am confusing about using GetLargestPossibleRegion() and<br>GetRequestedRegion(). What are the
differences?<br><br>GetLargestPossibleRegion() is getting all the pixels in the image.<br><br>And GetRequestedRegion() is getting all the none-zero pixels. Is that right?<br><br><br>Cheers,<br>Aaron<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank" href="http://www.itk.org/pipermail/insight-users/attachments/20100809/cf971bf2/attachment-0001.htm">http://www.itk.org/pipermail/insight-users/attachments/20100809/cf971bf2/attachment-0001.htm</a>></span><br><br>------------------------------<br><br>Message: 4<br>Date: Mon, 9 Aug 2010 08:02:43 -0500<br>From: Ming Chao <<a ymailto="mailto:mingchao2005@gmail.com" href="mailto:mingchao2005@gmail.com">mingchao2005@gmail.com</a>><br>Subject: Re: [Insight-users] FFTImageFilter<br>To: "Yu, Yang" <<a ymailto="mailto:yang.yu@philips.com" href="mailto:yang.yu@philips.com">yang.yu@philips.com</a>><br>Cc: Insight Users <<a
ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>Message-ID:<br> <AANLkTinMK6K-0OzxAn+Mx69_bAu1o+<a ymailto="mailto:F5jSLGeq_6KV5i@mail.gmail.com" href="mailto:F5jSLGeq_6KV5i@mail.gmail.com">F5jSLGeq_6KV5i@mail.gmail.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Thanks very much to you all for looking into my "problem". Actually you guys<br>were absolutely correct that there was no "problem" with the sample code. My<br>"problem" was created when I tried to write the output real/imaginary part<br>in a binary file. Sorry for the noise.<br><br>Ming<br><br>On Mon, Aug 9, 2010 at 3:31 AM, Yu, Yang <<a ymailto="mailto:yang.yu@philips.com" href="mailto:yang.yu@philips.com">yang.yu@philips.com</a>> wrote:<br><br>> I copy the code you posted and at least it works fine in my program. I<br>> think you should pay much attention on the realFilter
part. Did you Update<br>> the realFilter?<br>><br>><br>><br>> *From:* <a ymailto="mailto:insight-users-bounces@itk.org" href="mailto:insight-users-bounces@itk.org">insight-users-bounces@itk.org</a> [mailto:<br>> <a ymailto="mailto:insight-users-bounces@itk.org" href="mailto:insight-users-bounces@itk.org">insight-users-bounces@itk.org</a>] *On Behalf Of *Ming Chao<br>> *Sent:* 2010 Aug 05 7:21 PM<br>> *To:* Markus Neuner<br>> *Cc:* Insight Users<br>> *Subject:* Re: [Insight-users] FFTImageFilter<br>><br>><br>><br>> If I changed "WriteImageType" to float/double, the code stopped working b/c<br>> jpeg only accepts unsigned char/int.<br>><br>> On Thu, Aug 5, 2010 at 3:30 AM, Markus Neuner <<a ymailto="mailto:neuner.markus@gmx.net" href="mailto:neuner.markus@gmx.net">neuner.markus@gmx.net</a>><br>> wrote:<br>><br>> I just looked at the code in the example and all seems working (at
leasts<br>> for me).<br>> What do you expect as output?<br>> Change the "WriteImageType" to float or double and try it again.<br>> Open the image with paraview, imagej or any other suited image viewer.<br>> It may be useful to take the log of the real and complex images for a<br>> better contrast.<br>><br>><br>><br>> On 04.08.2010 21:45, Ming Chao wrote:<br>><br>> float<br>><br>> On Wed, Aug 4, 2010 at 2:38 PM, Markus Neuner <<a ymailto="mailto:neuner.markus@gmx.net" href="mailto:neuner.markus@gmx.net">neuner.markus@gmx.net</a>><br>> wrote:<br>><br>> What is the pixel type of "ImageType"?<br>><br>><br>><br>> On 04.08.2010 21:11, Ming Chao wrote:<br>><br>> I checked the complex image FFT created from the input image was fine.<br>> Also I checked the real and imaginary parts in floating point format,<br>> respectively. They both are fine. The problem started to happen
when<br>> rescaling the real/imaginary image into an interger-type image. Here is part<br>> of the rescaling code:<br>><br>><br>><br>> typedef unsigned char WritePixelType;<br>><br>> typedef itk::Image< WritePixelType, Dimension > WriteImageType;<br>><br>><br>><br>> typedef itk::RescaleIntensityImageFilter<ImageType, WriteImageType ><br>> RescaleFilterType;<br>><br>><br>><br>> RescaleFilterType::Pointer intensityRescaler = RescaleFilterType::New();<br>><br>> intensityRescaler->SetOutputMinimum( 0 );<br>><br>> intensityRescaler->SetOutputMaximum( 255 );<br>><br>><br>><br>> intensityRescaler->SetInput( realFilter->GetOutput() );<br>><br>><br>><br>> typedef itk::ImageFileWriter< WriteImageType > WriterType;<br>><br>> WriterType::Pointer writer =
WriterType::New();<br>><br>> writer->SetFileName( argv[2] );<br>><br>> writer->SetInput( intensityRescaler->GetOutput() );<br>><br>><br>><br>> try<br>><br>> {<br>><br>> writer->Update();<br>><br>> }<br>><br>> catch( itk::ExceptionObject & excp )<br>><br>> {<br>><br>> std::cerr << "Error writing the real image: " << std::endl;<br>><br>> std::cerr << excp << std::endl;<br>><br>> return EXIT_FAILURE;<br>><br>> }<br>><br>><br>><br>> typedef itk::ImageRegionConstIterator< WriteImageType ><br>> ConstIteratorType;<br>><br>> WriteImageType::Pointer RealImage = intensityRescaler->GetOutput();<br>><br>> ConstIteratorType in( RealImage, RealImage->GetRequestedRegion()
);<br>><br>><br>><br>> for ( in.GoToBegin(); !in.IsAtEnd(); ++in )<br>><br>> {<br>><br>> std::cout << in.Get() << std::endl;<br>><br>> }<br>><br>><br>><br>><br>><br>> From the output I got all zeros....Apparently something wrong with the<br>> rescaler. Could anybody take a look? Thanks very much,<br>><br>><br>><br>> Ming<br>><br>><br>><br>> On Wed, Aug 4, 2010 at 9:35 AM, Ming Chao <<a ymailto="mailto:mingchao2005@gmail.com" href="mailto:mingchao2005@gmail.com">mingchao2005@gmail.com</a>> wrote:<br>><br>> I tried to run FFTImageFilter.cxx to do an FFT of an image. The input image<br>> is a 512x512, 24 bit thoracic CT image in jpg format. The output of the<br>> example cxx code are the real and imaginary parts of FFT of the input image.<br>> However, when I look at the two output images, they are just uniformly<br>>
grey/black, depending on<br>><br>><br>><br>> intensityRescaler->SetOutputMinimum( 0 );<br>><br>> intensityRescaler->SetOutputMaximum( 255 );<br>><br>><br>><br>> in the code. What did I do wrong? Many thanks,<br>><br>><br>><br>> Ming<br>><br>><br>><br>><br>><br>><br>><br>> _____________________________________<br>><br><span>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a></span><br>><br>><br>><br>> Visit other Kitware open-source projects at<br>><br>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>><br>><br>> Kitware offers ITK Training Courses, for more information visit:<br>><br>> <a href="http://www.kitware.com/products/protraining.html"
target="_blank">http://www.kitware.com/products/protraining.html</a><br>><br>><br>><br>> Please keep messages on-topic and check the ITK FAQ at:<br>><br>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>><br>><br>><br>> Follow this link to subscribe/unsubscribe:<br>><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>><br>><br>><br>> ------------------------------<br>> The information contained in this message may be confidential and legally<br>> protected under applicable law. The message is intended solely for the<br>> addressee(s). If you are not the intended recipient, you are hereby notified<br>> that any use, forwarding, dissemination, or reproduction of this message is<br>> strictly prohibited and may be unlawful. If
you are not the intended<br>> recipient, please contact the sender by return e-mail and destroy all copies<br>> of the original message.<br>><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank" href="http://www.itk.org/pipermail/insight-users/attachments/20100809/aededffa/attachment.htm">http://www.itk.org/pipermail/insight-users/attachments/20100809/aededffa/attachment.htm</a>></span><br><br>------------------------------<br><br>_______________________________________________<br>Insight-users mailing list<br><a ymailto="mailto:Insight-users@itk.org" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><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>End of Insight-users Digest, Vol 76, Issue 22<br>*********************************************<br></div></div>
</div><br>
</body></html>