[ITK] [ITK-users] Do any of the mesh file formats store CellData?
Arnaud Gelas
arnaudgelas at gmail.com
Mon Aug 17 08:49:47 EDT 2015
Davis,
Can you write a c++ example (please not a c++-11 one) along with
corresponding cmakelists.txt either on itk wiki examples [1], either on
ITKExamples [2] (see [3] for contributing), please?
Thanks,
Arnaud
[1] http://itk.org/Wiki/ITK/Examples
[2] http://itk.org/ITKExamples/index.html
[3] http://itk.org/ITKExamples/Documentation/Contribute/index.html
On Mon, Aug 17, 2015 at 12:57 PM, DVigneault <davis.vigneault at gmail.com>
wrote:
> All--
>
> I've rebuilt in debug mode and stepped through with gdb. It looks like the
> CellData is being deallocated at the following line in
> itkProcessObject.cxx.
> The comment suggests that this result is expected?
>
> 1684 /**
> 1685 * Prepare all the outputs. This may deallocate previous bulk
> data.
> 1686 */
> 1687 this->PrepareOutputs();
>
> By putting a breakpoint at itkProcessObject.cxx:1687, we can see where the
> pointer is being reset:
>
> $ gdb ./dv-mesh-test
> (gdb) b itkProcessObject.cxx:1687
> (gdb) r
> (gdb) c # First time is due to sphere source
> (gdb) select-frame 3 # Brings us back into itk::MeshFileWriter::Write
> (gdb) p input->GetCellData() # A valid pointer
> (gdb) n # Step over this
> (gdb) p input->GetCellData() # A null pointer
>
> Here's the backtrace at that point:
>
> #0 itk::ProcessObject::UpdateOutputData (this=0x936a30) at
>
> /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkProcessObject.cxx:1695
> #1 0x000000000052f9fd in itk::DataObject::UpdateOutputData (this=0x93b290)
> at
>
> /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkDataObject.cxx:416
> #2 0x000000000052f6af in itk::DataObject::Update (this=0x93b290) at
>
> /local/pemb3433/Developer/ITK/src/Modules/Core/Common/src/itkDataObject.cxx:341
> #3 0x00000000004fb544 in itk::MeshFileWriter<itk::Mesh<float, 3u,
> itk::DefaultStaticMeshTraits<float, 3u, 3u, float, float, float> >
> >::Write (this=0x93ca40)
> at
>
> /local/pemb3433/Developer/ITK/src/Modules/IO/Mesh/include/itkMeshFileWriter.hxx:148
> #4 0x00000000004f9bf1 in itk::MeshFileWriter<itk::Mesh<float, 3u,
> itk::DefaultStaticMeshTraits<float, 3u, 3u, float, float, float> >
> >::Update (this=0x93ca40)
> at
>
> /local/pemb3433/Developer/ITK/src/Modules/IO/Mesh/include/itkMeshFileWriter.h:145
> #5 0x00000000004f8185 in main () at
>
> /local/pemb3433/Developer/Bitbucket/oxford/Stebbing_Method/MeshTest/src/dv-mesh-test.cxx:32
>
> I'm stretching my knowledge both of ITK and gdb here, so please do let me
> know if I'm misinterpreting the output--but it seems to me that the
> CellData
> is being deallocated when itkProcessObject.cxx:1687 is called, and
> therefore
> it (a) isn't being written to file and (b) isn't available after the mesh
> is
> written.
>
> Is this a bug in my code? A bug in ITK? A feature I don't understand?
> Thanks very much in advance for your help!
>
> Best,
>
> --Davis
>
>
>
> --
> View this message in context:
> http://itk-insight-users.2283740.n2.nabble.com/Do-any-of-the-mesh-file-formats-store-CellData-tp7587666p7587689.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150817/916f61ec/attachment-0001.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list