<div>Hi Luis,</div>
<div>My previous question about adding more subgreions onto the new image is quite trivial. sorry for the noise.</div>
<div>Ming<br><br> </div>
<div><span class="gmail_quote">On 1/13/06, <b class="gmail_sendername">Ming Chao</b> <<a href="mailto:mingchao2005@gmail.com">mingchao2005@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi Luis,</div>
<div> </div>
<div>Thanks very much for your excellent answers. Actually Andinet provided me a similar answer yesterday already. Here I encountered another question though. Since I need to create this spatial object with more than one regions in the new image, how do I add thse subregions to the new image. I tried to add them one by one but at the end of the day, only the last one was added.
<br> <br> Iterator it( image, insideRegion );<br> it.GoToBegin();<br> <br> while( !it.IsAtEnd() )<br> {<br> it.Set( itk::NumericTraits< PixelType >::max() );<br> ++it;<br> }</div>
<div> </div>
<div>Here insideRegion is just a single region. Thanks for any hints.</div><span class="sg">
<div> </div>
<div>Ming<br> </div></span>
<div><span class="e" id="q_108c52fadf7f5d05_2">
<div><span class="gmail_quote">On 1/13/06, <b class="gmail_sendername">Luis Ibanez</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Hi Ming,<br><br>Thanks for adding a couple of details to the<br>description of the problem that you are facing.
<br><br><br>Please read the ITK Software Guide<br><br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a>
<br><br><br>In particular the chapter on "Image Registration". <br><br>and section: 8.11.3<br><br> "Registration using masks constructed<br> with Spatial objects"<br><br>in pdf-pages 464-466.<br>
<br>The source code of the example is in<br><br> Examples/<br> Registration/ <br> ImageRegistration12.cxx<br><br><br>You will find that it is possible to use a binary<br>Mask on top of the Fixed Image, and in that way,
<br>to restrict the computation of the Metric to use<br>only the pixels from the FixedImage that are under <br>the ON pixels in the Mask.<br><br>If you define the binary mask to have ON pixels<br>only on top of the two regions that you want to use
<br>from your image, then the registration process will<br>be equivalent sot using just those two regions. <br><br>Note that this is not the fastest possible approach.<br>In particular if your fixed image is large, and the
<br>two regions are relatively small. If computation<br>time is an issue, please let us know and we could <br>suggest you other options. Note that the advantage<br>with using the Mask is that you can do it right now<br>
without having to modify ITK code in any way.<br><br><br> Regards,<br><br><br><br> Luis<br><br><br><br>--------------------<br>Ming Chao wrote:<br>> Hi Luis,<br>><br>> Yes, it is actually registration. Basically I want to find the
<br>> corresponding two regions in the 2nd image. I think one solution might<br>> be to create a new image which contains only the two regions from the<br>> 1st image and then do registration (mapping) to find the corresponding
<br>> two regions in the 2nd image. Does that sound reasonable?<br>> Thanks,<br>> Ming<br>><br>><br>><br>> On 1/12/06, *Luis Ibanez* <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:luis.ibanez@kitware.com" target="_blank">
luis.ibanez@kitware.com</a><br>> <mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com </a>>> wrote:<br>><br>><br>
> Hi Ming,<br>><br>> When you say "mapping" do you mean "registration" ?<br>><br>> or do you mean "copy/pasting" image regions ? <br>><br>><br>> Please be more generous on the description of your problem,
<br>><br>><br>> Thanks<br>><br>><br>> Luis<br>><br>><br>> ----------------<br>> Ming Chao wrote: <br>> > Hi,<br>> ><br>> > I have a question about mapping of two regions from one image to
<br>> a 2nd<br>> > image simultaneously. It is fairly straightforward to map the two <br>> > regions one by one, but how do I map them at the same time?<br>> ><br>> > Many thanks for any hints in advance,
<br>> > Ming<br>> ><br>> ><br>> > <br>> ><br>> ------------------------------------------------------------------------<br>> ><br>> > _______________________________________________
<br>> > Insight-users mailing list <br>> > <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Insight-users@itk.org" target="_blank">Insight-users@itk.org</a> <mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Insight-users@itk.org" target="_blank">
Insight-users@itk.org</a>><br>> > <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users
</a><br>><br>><br><br></blockquote></div><br></span></div></blockquote></div><br>