# CSJ2K.j2k.roi.encoder.ROIScaler.parseROIs

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_roi_encoder_ROIScaler_parseROIs_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.parseROIs*">parseROIs Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_roi_encoder_ROIScaler_parseROIs_" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.parseROIs*"></a>
<h4 id="CSJ2K_j2k_roi_encoder_ROIScaler_parseROIs_System_String_System_Int32_System_Collections_Generic_List_System_Object__" data-uid="CSJ2K.j2k.roi.encoder.ROIScaler.parseROIs(System.String,System.Int32,System.Collections.Generic.List{System.Object})">parseROIs(string, int, List&lt;object&gt;)</h4>
<div class="markdown level1 summary"><p>This function parses the values given for the ROIs with the argument
-Rroi. Currently only circular and rectangular ROIs are supported.</p>
<pre><code>       &lt;p&gt;A rectangular ROI is indicated by a 'R' followed the coordinates for
       the upper left corner of the ROI and then its width and height.&lt;/p&gt;&lt;p&gt;A circular ROI is indicated by a 'C' followed by the coordinates of
       the circle center and then the radius.&lt;/p&gt;&lt;p&gt;Before the R and C values, the component that are affected by the
       ROI are indicated.&lt;/p&gt;
</code></pre>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected static List&lt;object&gt; parseROIs(string roiopt, int nc, List&lt;object&gt; roiVector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Shared Function parseROIs(roiopt As String, nc As Integer, roiVector As List(Of Object)) As List(Of Object)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">roiopt</span></td>
      <td><p>The info on the ROIs</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">nc</span></td>
      <td><p>number of components</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">roiVector</span></td>
      <td><p>The vcector containing the ROI parsed from the cmd line</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><p>The ROIs specified in roiopt</p>
</td>
    </tr>
  </tbody>
</table>
</div>
